Advertisement
Guest User

Untitled

a guest
Apr 24th, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.79 KB | None | 0 0
  1. #ifndef HEADERS_H
  2. #define HEADERS_H 1
  3.  
  4.  
  5. /*********************************/
  6. /*         IP options            */
  7. /*********************************/
  8.  
  9. #define OPT_IP_EOP 0    /* end of options */
  10. #define OPT_IP_NOP 1    /* padding */
  11. #define OPT_IP_RR 7     /* record route */
  12. #define OPT_IP_LSR 3    /* loose source route */
  13.  
  14.  
  15. /* The same format used for RR, LSR & SSR */
  16. struct opt_ip_route {
  17. #if __BYTE_ORDER == __LITTLE_ENDIAN
  18.     u_int8_t option:5;
  19.     u_int8_t class_opt:2; /* Cleared to 0 */
  20.     u_int8_t cpy_flag:1;
  21. #elif __BYTE_ORDER == __BIG_ENDIAN
  22.     u_int8_t cpy_flag:1;
  23.     u_int8_t class_opt:2; /* Cleared to 0 */
  24.     u_int8_t option:5;
  25. #else
  26. # error "Please fix <bits/endian.h>"
  27. #endif
  28.     u_int8_t length;
  29.     u_int8_t ptr;
  30.     /* char data[var] */
  31. };
  32.  
  33.  
  34.  
  35.  
  36. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement