選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

udp.h 758B

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