Source code of Windows XP (NT5)
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.

90 lines
2.7 KiB

  1. #ifndef _UDP_API_H
  2. #define _UDP_API_H
  3. #include "pxe_cmn.h"
  4. /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
  5. /* #defines and constants
  6. */
  7. /* One of the following command op-codes needs to be loaded into the
  8. * op-code register (BX) before making a call a UDP API service.
  9. */
  10. #define PXENV_UDP_OPEN 0x30
  11. #define PXENV_UDP_CLOSE 0x31
  12. #define PXENV_UDP_READ 0x32
  13. #define PXENV_UDP_WRITE 0x33
  14. typedef struct s_PXENV_UDP_OPEN {
  15. UINT16 Status; /* Out: See PXENV_STATUS_xxx */
  16. /* constants. */
  17. UINT8 SrcIp[4]; /* Out: 32-bit IP address of this station. */
  18. } t_PXENV_UDP_OPEN;
  19. typedef struct s_PXENV_UDP_CLOSE {
  20. UINT16 Status; /* Out: See PXENV_STATUS_xxx */
  21. /* constants. */
  22. } t_PXENV_UDP_CLOSE;
  23. typedef struct s_PXENV_UDP_READ {
  24. UINT16 Status; /* Out: See PXENV_STATUS_xxx #defines. */
  25. UINT8 SrcIp[4]; /* Out: See description below */
  26. UINT8 DestIp[4]; /* In/Out: See description below */
  27. UINT16 SrcPort; /* Out: See description below */
  28. UINT16 DestPort; /* In/Out: See description below */
  29. UINT16 BufferSize; /* In: Size of receive buffer. */
  30. /* Out: Length of packet written into */
  31. /* receive buffer. */
  32. UINT16 BufferOffset; /* In: Segment/Selector and offset */
  33. UINT16 BufferSegment; /* of receive buffer. */
  34. } t_PXENV_UDP_READ;
  35. /*
  36. src_ip: (Output)
  37. ======
  38. UDP_READ fills this value on return with the 32-bit IP address
  39. of the sender.
  40. dest_ip: (Input/Output)
  41. =======
  42. If this field is non-zero then UDP_READ will filter the incoming
  43. packets and accept those that are sent to this IP address.
  44. If this field is zero then UDP_READ will accept any incoming
  45. packet and return it's destination IP address in this field.
  46. s_port: (Output)
  47. =======
  48. UDP_READ fills this value on return with the UDP port number
  49. of the sender.
  50. d_port: (Input/Output)
  51. =======
  52. If this field is non-zero then UDP_READ will filter the incoming
  53. packets and accept those that are sent to this UDP port.
  54. If this field is zero then UDP_READ will accept any incoming
  55. packet and return it's destination UDP port in this field.
  56. */
  57. typedef struct s_PXENV_UDP_WRITE {
  58. UINT16 Status; /* Out: See PXENV_STATUS_xxx */
  59. /* constants. */
  60. UINT8 DestIp[4]; /* In: 32-bit server IP address. */
  61. UINT8 GatewayIp[4]; /* In: 32-bit gateway IP address. */
  62. UINT16 SrcPort; /* In: Source UDP port. */
  63. UINT16 DestPort; /* In: Destination UDP port. */
  64. UINT16 BufferSize; /* In: Length of packet in buffer. */
  65. UINT16 BufferOffset; /* In: Segment/Selector and */
  66. UINT16 BufferSegment; /* offset of transmit buffer. */
  67. } t_PXENV_UDP_WRITE;
  68. #endif /* _UDP_API_H */