My Project
udp_hdr.h
1 #ifndef UDP_HDR_H
2 #define UDP_HDR_H
3 
8 struct sniff_udp {
9  u_short th_sport; /* source port */
10  u_short th_dport; /* destination port */
11  u_short th_len ;
12  u_short th_sum; /* checksum */
13 };
14 #endif // UDP_HDR_H
The sniff_tcp struct contains the UDP header. We use the first two members to extract the src and dst...
Definition: udp_hdr.h:8