Advertisement
Chaser

Untitled

Jun 26th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1.  
  2. /* Ethernet header */
  3. struct sniff_ethernet {
  4. u_char ether_dhost[ETHER_ADDR_LEN]; /* Destination host address */
  5. u_char ether_shost[ETHER_ADDR_LEN]; /* Source host address */
  6. u_short ether_type; /* IP? ARP? RARP? etc */
  7. };
  8.  
  9. /* IP header */
  10. struct sniff_ip {
  11. u_char ip_vhl; /* version << 4 | header length >> 2 */
  12. u_char ip_tos; /* type of service */
  13. u_short ip_len; /* total length */
  14. u_short ip_id; /* identification */
  15. u_short ip_off; /* fragment offset field */
  16. #define IP_RF 0x8000 /* reserved fragment flag */
  17. #define IP_DF 0x4000 /* dont fragment flag */
  18. #define IP_MF 0x2000 /* more fragments flag */
  19. #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
  20. u_char ip_ttl; /* time to live */
  21. u_char ip_p; /* protocol */
  22. u_short ip_sum; /* checksum */
  23. struct in_addr ip_src,ip_dst; /* source and dest address */
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement