Sin descripción

ethernet_hdr.h 708B

123456789101112131415161718192021222324
  1. #ifndef ETHERNET_HDR_H
  2. #define ETHERNET_HDR_H
  3. #include <sys/types.h>
  4. #include <stdio.h>
  5. /* Ethernet addresses are 6 bytes */
  6. #define ETHER_ADDR_LEN 6
  7. /* Ethernet header */
  8. ///
  9. /// \brief The sniff_ethernet struct defines the header of an
  10. /// ethernet frame, and is used to parse the packet received
  11. /// with pcap. Used to extract Ethernet layer information from a
  12. /// packet.
  13. ///
  14. struct sniff_ethernet {
  15. u_char ether_dhost[ETHER_ADDR_LEN]; /**< destination host address / direccion destino */
  16. u_char ether_shost[ETHER_ADDR_LEN]; /**< source host address / direccion fuente */
  17. u_short ether_type; /**< IP? ARP? RARP? etc */
  18. };
  19. #endif // ETHERNET_HDR_H