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.

115 lines
3.2 KiB

  1. #ifndef _UNDI_API_H
  2. #define _UNDI_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 an UNDI API service.
  9. */
  10. #define PXENV_UNDI_SHUTDOWN 0x05
  11. #define PXENV_UNDI_OPEN 0x06
  12. #define PXENV_UNDI_CLOSE 0x07
  13. #define PXENV_UNDI_SET_PACKET_FILTER 0x0B
  14. #define PXENV_UNDI_GET_NIC_TYPE 0x12
  15. #define PXENV_UNDI_GET_INFORMATION 0x000C
  16. #define ADDR_LEN 16
  17. #define MAXNUM_MCADDR 8
  18. typedef struct s_PXENV_UNDI_MCAST_ADDR {
  19. UINT16 MCastAddrCount;
  20. UINT8 MCastAddr[MAXNUM_MCADDR][ADDR_LEN];
  21. } t_PXENV_UNDI_MCAST_ADDR;
  22. typedef struct s_PXENV_UNDI_SHUTDOWN {
  23. UINT16 Status;
  24. } t_PXENV_UNDI_SHUTDOWN;
  25. typedef struct s_PXENV_UNDI_OPEN {
  26. UINT16 Status;
  27. UINT16 OpenFlag;
  28. UINT16 PktFilter;
  29. t_PXENV_UNDI_MCAST_ADDR McastBuffer;
  30. } t_PXENV_UNDI_OPEN;
  31. #define FLTR_DIRECTED 0x0001
  32. #define FLTR_BRDCST 0x0002
  33. #define FLTR_PRMSCS 0x0004
  34. #define FLTR_SRC_RTG 0x0008
  35. typedef struct s_PXENV_UNDI_SET_PACKET_FILTER {
  36. UINT16 Status;
  37. UINT8 filter;
  38. } t_PXENV_UNDI_SET_PACKET_FILTER;
  39. typedef struct s_PXENV_UNDI_CLOSE {
  40. UINT16 Status;
  41. } t_PXENV_UNDI_CLOSE;
  42. #include <pshpack1.h>
  43. typedef struct s_PXENV_UNDI_GET_NIC_TYPE {
  44. UINT16 Status; /* OUT: See PXENV_STATUS_xxx constants */
  45. UINT8 NicType; /* OUT: 2=PCI, 3=PnP */
  46. union{
  47. struct{
  48. UINT16 Vendor_ID; /* OUT: */
  49. UINT16 Dev_ID; /* OUT: */
  50. UINT8 Base_Class; /* OUT: */
  51. UINT8 Sub_Class; /* OUT: */
  52. UINT8 Prog_Intf; /* OUT: program interface */
  53. UINT8 Rev; /* OUT: Revision number */
  54. UINT16 BusDevFunc; /* OUT: Bus, Device */
  55. UINT32 Subsys_ID; /* OUT: Subsystem ID */
  56. /* & Function numbers */
  57. }pci;
  58. struct{
  59. UINT32 EISA_Dev_ID; /* Out: */
  60. UINT8 Base_Class; /* OUT: */
  61. UINT8 Sub_Class; /* OUT: */
  62. UINT8 Prog_Intf; /* OUT: program interface */
  63. UINT16 CardSelNum; /* OUT: Card Selector Number */
  64. }pnp;
  65. }pci_pnp_info;
  66. } t_PXENV_UNDI_GET_NIC_TYPE;
  67. typedef struct s_PXENV_UNDI_GET_INFORMATION {
  68. UINT16 Status; /* Out: PXENV_STATUS_xxx */
  69. UINT16 BaseIo; /* Out: Adapter's Base IO */
  70. UINT16 IntNumber; /* Out: IRQ number */
  71. UINT16 MaxTranUnit; /* Out: MTU */
  72. UINT16 HwType; /* Out: type of protocol at hardware level */
  73. #define ETHER_TYPE 1
  74. #define EXP_ETHER_TYPE 2
  75. #define IEEE_TYPE 6
  76. #define ARCNET_TYPE 7
  77. /* other numbers can be obtained from rfc1010 for "Assigned
  78. Numbers". This number may not be validated by the application
  79. and hence adding new numbers to the list should be fine at any
  80. time. */
  81. UINT16 HwAddrLen; /* Out: actual length of hardware address */
  82. UINT8 CurrentNodeAddress[ADDR_LEN]; /* Out: Current hardware address*/
  83. UINT8 PermNodeAddress[ADDR_LEN]; /* Out: Permanent hardware address*/
  84. UINT16 ROMAddress; /* Out: ROM address */
  85. UINT16 RxBufCt; /* Out: receive Queue length */
  86. UINT16 TxBufCt; /* Out: Transmit Queue length */
  87. } t_PXENV_UNDI_GET_INFORMATION;
  88. #include <poppack.h>
  89. #endif /* _UNDI_API_H */