ip_hdr.h
#ifndef IP_HDR_H
#define IP_HDR_H
/* IP header */
struct sniff_ip {
u_char ip_vhl;
u_char ip_tos;
u_short ip_len;
u_short ip_id;
u_short ip_off;
#define IP_RF 0x8000
#define IP_DF 0x4000
#define IP_MF 0x2000
#define IP_OFFMASK 0x1fff
u_char ip_ttl;
u_char ip_p;
u_short ip_sum;
struct in_addr ip_src,ip_dst;
};
#define IP_HL(ip) (((ip)->ip_vhl) & 0x0f)
#define IP_V(ip) (((ip)->ip_vhl) >> 4)
#endif // IP_HDR_H
sniff_ip::ip_vhl
u_char ip_vhl
Definition: ip_hdr.h:9
sniff_ip::ip_off
u_short ip_off
Definition: ip_hdr.h:13
sniff_ip::ip_len
u_short ip_len
Definition: ip_hdr.h:11
sniff_ip::ip_tos
u_char ip_tos
Definition: ip_hdr.h:10
sniff_ip::ip_id
u_short ip_id
Definition: ip_hdr.h:12
sniff_ip
The sniff_ip struct defines the packet header of a tcp internet packet. Used to extract IP layer info...
Definition: ip_hdr.h:8