You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dhcppkt.h 768B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _GPXE_DHCPPKT_H
  2. #define _GPXE_DHCPPKT_H
  3. /** @file
  4. *
  5. * DHCP packets
  6. *
  7. */
  8. #include <gpxe/dhcp.h>
  9. #include <gpxe/dhcpopts.h>
  10. /**
  11. * A DHCP packet
  12. *
  13. */
  14. struct dhcp_packet {
  15. /** The DHCP packet contents */
  16. struct dhcphdr *dhcphdr;
  17. /** Maximum length of the DHCP packet buffer */
  18. size_t max_len;
  19. /** Used length of the DHCP packet buffer */
  20. size_t len;
  21. /** DHCP option blocks */
  22. struct dhcp_options options;
  23. };
  24. extern int dhcppkt_store ( struct dhcp_packet *dhcppkt, unsigned int tag,
  25. const void *data, size_t len );
  26. extern int dhcppkt_fetch ( struct dhcp_packet *dhcppkt, unsigned int tag,
  27. void *data, size_t len );
  28. extern void dhcppkt_init ( struct dhcp_packet *dhcppkt,
  29. void *data, size_t len );
  30. #endif /* _GPXE_DHCPPKT_H */