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.

udp.h 694B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _IPXE_UDP_H
  2. #define _IPXE_UDP_H
  3. /** @file
  4. *
  5. * UDP protocol
  6. *
  7. * This file defines the iPXE UDP API.
  8. *
  9. */
  10. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  11. #include <stddef.h>
  12. #include <ipxe/iobuf.h>
  13. #include <ipxe/tcpip.h>
  14. #include <ipxe/if_ether.h>
  15. struct interface;
  16. struct sockaddr;
  17. /**
  18. * UDP constants
  19. */
  20. /**
  21. * A UDP header
  22. */
  23. struct udp_header {
  24. /** Source port */
  25. uint16_t src;
  26. /** Destination port */
  27. uint16_t dest;
  28. /** Length */
  29. uint16_t len;
  30. /** Checksum */
  31. uint16_t chksum;
  32. };
  33. extern int udp_open_promisc ( struct interface *xfer );
  34. extern int udp_open ( struct interface *xfer, struct sockaddr *peer,
  35. struct sockaddr *local );
  36. #endif /* _IPXE_UDP_H */