ethernet_hdr.h
#ifndef ETHERNET_HDR_H
#define ETHERNET_HDR_H
#include <sys/types.h>
#include <stdio.h>
/* Ethernet addresses are 6 bytes */
#define ETHER_ADDR_LEN 6
/* Ethernet header */
struct sniff_ethernet {
u_char ether_dhost[ETHER_ADDR_LEN];
u_char ether_shost[ETHER_ADDR_LEN];
u_short ether_type;
};
#endif // ETHERNET_HDR_H
sniff_ethernet::ether_type
u_short ether_type
Definition: ethernet_hdr.h:20
sniff_ethernet
The sniff_ethernet struct defines the header of an ethernet frame, and is used to parse the packet re...
Definition: ethernet_hdr.h:17
sniff_ethernet::ether_dhost
u_char ether_dhost[ETHER_ADDR_LEN]
Definition: ethernet_hdr.h:18
sniff_ethernet::ether_shost
u_char ether_shost[ETHER_ADDR_LEN]
Definition: ethernet_hdr.h:19