My Project
ethernet_hdr.h
1 #ifndef ETHERNET_HDR_H
2 #define ETHERNET_HDR_H
3 
4 #include <sys/types.h>
5 #include <stdio.h>
6 
7 /* Ethernet addresses are 6 bytes */
8 #define ETHER_ADDR_LEN 6
9 
10 /* Ethernet header */
18  u_char ether_dhost[ETHER_ADDR_LEN];
19  u_char ether_shost[ETHER_ADDR_LEN];
20  u_short ether_type;
21 };
22 
23 
24 #endif // ETHERNET_HDR_H
u_short ether_type
Definition: ethernet_hdr.h:20
The sniff_ethernet struct defines the header of an ethernet frame, and is used to parse the packet re...
Definition: ethernet_hdr.h:17
u_char ether_dhost[ETHER_ADDR_LEN]
Definition: ethernet_hdr.h:18
u_char ether_shost[ETHER_ADDR_LEN]
Definition: ethernet_hdr.h:19