These are the functions required by the PXE standard to support UNDI (Universal Network Device Interface.
This function initializes the UNDI code & data segments. This must be called before any of the other UNDI functions.
pxenv_ret_code_t
pxenv_undi_startup
(struct pxenv_undi_startup_s
undistartup);This is a pointer to a pre-initialized pxenv_undi_startup_s structure.
These are the fields in the pxenv_undi_startup_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_startup_s structure.
typedef struct pxenv_undi_startup_s { pxenv_status_t status; } pxenv_undi_startup_t; |
This function prepares the driver to be unloaded from memory. After this is executed, the UNDI functions won't work.
Note: This cannot be used in protected mode.
pxenv_ret_code_t
pxenv_undi_cleanup
(struct pxenv_undi_cleanup_s
undicleanup);This is a pointer to a pre-initialized pxenv_undi_cleanup_s structure.
These are the fields in the pxenv_undi_cleanup_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_cleanup_s structure.
typedef struct pxenv_undi_cleanup_s { pxenv_status_t status; } pxenv_undi_cleanup_t; |
This function initializes the adaptor with the data as set by the most recent pxenv_undi_startup(). A pxenv_undi_open() must be executed before the adaptor can transmit packets.
pxenv_ret_code_t
pxenv_undi_initialize
(struct pxenv_undi_initialize_s
undiinit);This is a pointer to a pre-initialized pxenv_undi_initialize_s structure.
These are the fields in the pxenv_undi_initialize_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
this is the 32 bit address of the memory copy of the driver module in the protocol.ini file. This used to pass into to the ndis driver.
Reserved by Intel for future use.
These are all the fields of the pxenv_undi_initialize_s structure.
typedef struct pxenv_undi_initialize_s { pxenv_status_t status; u_int32_t protocolini; u_int8_t reserved[8]; } pxenv_undi_initialize_t; |
This function resets the adaptor to the default values as set with pxenv_undi_initialize() function. Unlike the pxenv_undi_initialize() function, this connects the adaptor to the network.
pxenv_ret_code_t
pxenv_undi_reset_nic
(struct pxenv_undi_reset_nic_s
undireset);This is a pointer to a pre-initialized pxenv_undi_reset_nic_s structure.
These are the fields in the pxenv_undi_reset_nic_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
the multicast address is not stored anywhere, so when a client application resets the adaptor, this must be provided.
These are all the fields of the pxenv_undi_reset_nic_s structure.
typedef struct pxenv_undi_reset_nics { pxenv_status_t status; pxenv_undi_mcast_addr_t mcast_buf; } pxenv_undi_reset_nic_t; |
This function resets the adaptor and leaves it in a usable state.
Note: The data passed to the pxenv_undi_startup() function in the pxenv_undi_startup_s structure must be saved for the next call to pxenv_undi_initialize().
pxenv_ret_code_t
pxenv_undi_shutdown
(struct pxenv_undi_shutdown_s
undishut);This is a pointer to a pre-initialized pxenv_undi_shutdown_s structure.
These are the fields in the pxenv_undi_shutdown_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_shutdown_s structure.
typedef struct pxenv_undi_shutdown_s { pxenv_status_t status; } pxenv_undi_shutdown_t; |
This function activates the adaptor so it can accept packets.
pxenv_ret_code_t
pxenv_undi_open
(struct pxenv_undi_open_s
undiopen);This is a pointer to a pre-initialized pxenv_undi_open_s structure.
These are the fields in the pxenv_undi_open_s structure that must be set before calling this function.
this is a NIC specific flag used to pass the open flags from the protocol driver. Can be zero.
one of the FLTR_DIRECTED, FLTR_BRDCST, FLTR_PRMSCS, FLTR_SRC_RTG constants, which can be ORed together.
These are the fields in the pxenv_undi_open_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_open_s structure.
typedef struct pxenv_undi_open_s { pxenv_status_t status; u_int16_t open_flag; u_int16_t pkt_filter; pxenv_undi_mcast_addr_t mcastbuffer; } pxenv_undi_open_t; |
This function disconnects the adaptor from the network. The adaptor must be opened with a call to pxenv_undi_open() before it can be used again.
pxenv_ret_code_t
pxenv_undi_close
(struct pxenv_undi_close_s
undiclose);This is a pointer to a pre-initialized pxenv_undi_close_s structure.
These are the fields in the pxenv_undi_close_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_close_s structure.
typedef struct pxenv_undi_close_s { pxenv_status_t status; } pxenv_undi_close_t; |
This function transmits a packet over the network. An interupt is generated on the transmissions of a packet(s).
pxenv_ret_code_t
pxenv_undi_transmit
(struct pxenv_undi_transmit_s
unditrans);This is a pointer to a pre-initialized pxenv_undi_transmit_s structure.
These are the fields in the pxenv_undi_transmit_s structure that must be set before calling this function.
the protocol of the upper layer that is making this function call. If the upper layer has filled in the media header, this must be zero.
if zero, use the dest_addr. If 1, the NIC supplies the broadcast address.
the hardware address of the destination media in offset:segment format. If this isn't known, this field can be zero, and xmit_flags must be XMT_BROADCAST.
the transmit buffer in offset:segment format.
These are the fields in the pxenv_undi_transmit_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_transmit_s structure.
typedef struct pxenv_undi_transmit_s { pxenv_status_t status; u_int8_t protocol; u_int8_t xmit_flags; segoff16_t dest_addr; segoff16_t tbd_addr; u_int32_t reserved[2]; } pxenv_undi_transmit_t; |
This function changes the list of muticast addresses to the specified list, and resets the adaptor. If there are no multicast addresses, then multicast is disabled.
pxenv_ret_code_t
pxenv_undi_set_mcast_addr
(struct pxenv_undi_set_mcast_addr_s
undimcast);This is a pointer to a pre-initialized pxenv_undi_set_mcast_addr_s structure.
These are the fields in the pxenv_undi_set_mcast_addr_s structure that must be set before calling this function.
the multicast address.
These are the fields in the pxenv_undi_set_mcast_addr_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_set_mcast_addr_s structure.
typedef struct pxenv_undi_set_mcast_addr_s { pxenv_status_t status; pxenv_undi_mcast_addr_t mcast_buffer; } pxenv_undi_set_mcast_addr_t; |
This function sets the MAC address to the specified value, and must be executed before opening the network adaptor with the pxenv_undi_open() function.
pxenv_ret_code_t
pxenv_undi_set_station_addr
(struct pxenv_undi_set_station_addr_s
undistat);This is a pointer to a pre-initialized pxenv_undi_set_station_addr_s structure.
These are the fields in the pxenv_undi_set_station_addr_s structure that must be set before calling this function.
the MAC address to be used.
These are the fields in the pxenv_undi_set_station_addr_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_set_station_addr_s structure.
typedef struct pxenv_undi_set_station_addr_s { pxenv_status_t status; mac_addr_t station_addr; } pxenv_undi_set_station_addr_t; |
This function resets the NIC to use a new filter.
pxenv_ret_code_t
pxenv_undi_set_packet_filter
(struct pxenv_undi_set_packet_filter_s
undifilter);This is a pointer to a pre-initialized pxenv_undi_set_packet_filter_s structure.
These are the fields in the pxenv_undi_set_packet_filter_s structure that must be set before calling this function.
the MAC address to use.
These are the fields in the pxenv_undi_set_packet_filter_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_set_packet_filter_s structure.
typedef struct pxenv_undi_set_station_addr_s { pxenv_status_t status; mac_addr_t station_addr; } pxenv_undi_set_station_addr_t; |
This function copies all the adaptor variables to the input buffer.
pxenv_ret_code_t
pxenv_undi_get_information
(struct pxenv_undi_get_information_s
undiinfo);This is a pointer to a pre-initialized pxenv_undi_get_information_s structure. This fills in all the fields in the pxenv_undi_get_information_t structure.
These are the fields in the pxenv_undi_get_information_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
he base I/O address of the adpator.
the IRQ number of the NIC.
the maxium MTUs.
the protocol type at the hardware level. There is an RFRC1010 for "Assigned Numbers". As this number may not be validated by the application and hence adding new numbers to the list should be fine at any time. The current types are ETHER_TYPE, EXP_ETHER_TYPE, IEEE_TYPE, ARCNET_TYPE.
the length of the hardware address.
the current hardware address.
the permanent hardware address.
the ROM address.
the length of the receive buffer in bytes.
the length of the transmit buffer in bytes.
These are all the fields of the pxenv_undi_get_information_s structure.
typedef struct pxenv_undi_get_information_s { pxenv_status_t status; u_int16_t baseio; u_int16_t irqnum; u_int16_t maxmtu; u_int16_t hwtype; u_int16_t hw_addrlen; u_int8_t current_node_addr[ADDR_LEN]; u_int8_t perm_node_addr[ADDR_LEN]; u_int16_t rom_addr; u_int16_t rxbuflen; u_int16_t txbuflen; } pxenv_undi_get_information_t; |
This function gets the adaptor statistics.
pxenv_ret_code_t
pxenv_undi_get_statistics
(struct pxenv_undi_get_statistics_s
undistats);This is a pointer to a pre-initialized pxenv_undi_get_statistics_t structure. This fills in all the fields in the pxenv_undi_get_statistics_t structure.
These are the fields in the pxenv_undi_get_statistics_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
the count of good transmissions.
the count of good receptions.
the count of frames with CRC errors.
the count of rames discarded.
These are all the fields of the pxenv_undi_get_statistics_s structure.
typedef struct pxenv_undi_get_statistics_s { pxenv_status_t status; u_int32_t tx_good_frames; u_int32_t rx_good_frames; u_int32_t rx_crc_err; u_int32_t rx_discard_err; } pxenv_undi_get_statistics_t; |
This function clears the statistics from the adaptor.
pxenv_ret_code_t
pxenv_undi_clear_statistics
(struct pxenv_undi_clear_statistics_s
undiclrstats);This is a pointer to a pre-initialized pxenv_undi_clear_statistics_s structure.
These are the fields in the pxenv_undi_clear_statistics_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_clear_statistics_s structure.
typedef struct pxenv_undi_clear_statistics_s { pxenv_status_t status; } pxenv_undi_clear_statistics_t; |
This functions starts the run-time diagnostics, typically by running the hardware diagnostics.
pxenv_ret_code_t
pxenv_undi_initiate_diags
(struct pxenv_undi_initiate_diags_s
undidiag);This is a pointer to a pre-initialized pxenv_undi_initiate_diags_s structure.
These are the fields in the pxenv_undi_initiate_diags_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_initiate_diags_s structure.
typedef struct pxenv_undi_initiate_diags_s { pxenv_status_t status; } pxenv_undi_initiate_diags_t; |
This function forces the adaptor to generate and interupt. This is done to simulate and interupt on receiving a packet to clear the adaptor.
pxenv_ret_code_t
pxenv_undi_force_interrupt
(struct pxenv_undi_force_interrupt_s
undiint);This is a pointer to a pre-initialized pxenv_undi_force_interrupt_s structure.
These are the fields in the pxenv_undi_force_interrupt_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
These are all the fields of the pxenv_undi_force_interrupt_s structure.
typedef struct pxenv_undi_force_interrupt_s { pxenv_status_t status; } pxenv_undi_force_interrupt_t; |
This function converts the specified IP multicast address to it's hardware multicast address.
pxenv_ret_code_t
pxenv_undi_get_mcast_addr
(struct pxenv_undi_get_mcast_addr_s
undimcast);This is a pointer to a pre-initialized pxenv_undi_get_mcast_addr_s structure. This sets the MAC field in the pxenv_undi_get_mcast_addr_t structure.
These are the fields in the pxenv_undi_get_mcast_addr_s structure that must be set before calling this function.
the multicast IP number.
These are the fields in the pxenv_undi_get_mcast_addr_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
the hardware multicast address.
These are all the fields of the pxenv_undi_get_mcast_addr_s structure.
typedef struct pxenv_undi_get_mcast_addr_s { pxenv_status_t status; ip4_t ip_ddr; mac_addr_t mcast_addr; } pxenv_undi_get_mcast_addr_t; |
This function retrieves the adaptor specifc info required to identify the adaptor.
Note: pxenv_start_undi(), pxenv_undi_startup(), and pxenv_undi_initialize() must be called before this info is valid.
pxenv_ret_code_t
pxenv_undi_get_nic_type
(struct pxenv_undi_get_nic_type_s
undinic);This is a pointer to a pre-initialized pxenv_undi_get_nic_type_s structure. This sets the NIC type and and the Info fields in the pxenv_undi_get_nic_type_s structure.
These are the fields in the pxenv_undi_get_nic_type_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
the vendor ID.
the device ID.
the base class of the device.
the sub class of the device.
the program interface.
the revision number.
bus device and function numbers.
the sub vendor ID.
the sub device ID.
the EISA device ID.
the base class of the device.
the sub class of the device.
the program interface.
the card selector number.
data structure padding to make this aligned.
These are all the fields of the pxenv_undi_get_nic_type_s structure.
typedef struct pxenv_undi_get_nic_type_s { pxenv_status_t status; u_int8_t nictype; union { struct { u_int16_t vendor_id; u_int16_t dev_id; u_int8_t base_class; u_int8_t sub_class; u_int8_t prog_intf; u_int8_t rev; u_int16_t busdevfunc; u_int16_t subvendor_id; u_int16_t subdevice_id; } pci; struct { u_int32_t eisa_dev_id; u_int8_t base_class; u_int8_t sub_class; u_int8_t prog_intf; u_int16_t cardselnum; u_int8_t reserved; } pnp; } pci_pnp_info; } pxenv_undi_get_nic_type_t; |
This function gets the link level infterface type and the link speed.
Note: pxenv_start_undi(), pxenv_undi_startup(), and pxenv_undi_initialize() must be called before this info is valid. Also the info must be in an NDIS2 format.
pxenv_ret_code_t
pxenv_undi_get_iface_info
(struct pxenv_undi_get_iface_info_s
undiiface);This is a pointer to a pre-initialized pxenv_undi_get_iface_info_s structure.
These are the fields in the pxenv_undi_get_iface_info_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
this is the type of interface in ASCIIZ format.
as defined in the NDIS 2.0x specification.
as defined in the NDIS 2.0x specification.
must be set to all zeros as it's undefined for now.
These are all the fields of the pxenv_undi_get_iface_info_s structure.
typedef struct pxenv_undi_get_iface_info_s { pxenv_status_t status; u_int8_t iface_type[16]; u_int32_t link_speed; u_int32_t service_flags; u_int32_t reserved[4]; } pxenv_undi_get_iface_info_t; |
This function gets the state of the UNDI system.
pxenv_ret_code_t
pxenv_undi_get_state
(struct pxenv_undi_get_state_s
undistate);This is a pointer to a pre-initialized pxenv_undi_get_state_s structure. FIXME: add return params
These are the fields in the pxenv_undi_get_state_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
the state of the UNDI engine.
These are all the fields of the pxenv_undi_get_state_s structure.
typedef struct pxenv_undi_get_state_s { pxenv_status_t status; u_int16_t undi_State; } pxenv_undi_get_state_t; |
This function is the Interupt Service Routine for the UNDI.
pxenv_ret_code_t
pxenv_undi_isr
(struct pxenv_undi_isr_s
undiisr);This is a pointer to a pre-initialized pxenv_undi_isr_s structure. This must fill in the fields in the pxenv_undi_isr_s structure.
These are the fields in the pxenv_undi_isr_s structure that must be set before calling this function.
this is set to one of PXENV_UNDI_ISR_IN_START, PXENV_UNDI_ISR_IN_PROCESS, or PXENV_UNDI_ISR_IN_GET_NEXT.
These are the fields in the pxenv_undi_isr_s structure that get set by this function before returning.
The exit status of this function. This is set to one of the PXENV_STATUS_xxx constants.
this is set to one of the PXENV_UNDI_ISR_OUT_OURS, PXENV_UNDI_USR_OUT_NOT_OURS, PXENV_UNDI_ISR_OUT_DONE, PXENV_UNDI_ISR_OUT_TRANSMIT, PXENV_UNDI_ISR_OUT_RECEIVE, or PXENV_UNDI_ISR_OUT_BUSY.
the length of the buffer in bytes.
the length of the frame in bytes.
the length of the frame header in bytes.
the frame address in offset:segment format.
the type of the protocol. Valid values are PXENV_UNDI_PROTO_IP, PXENV_UNDI_PROTO_ARP, PXENV_UNDI_PROTO_RARP, or any higher value is other.
the type of packet. Valid values are PXENV_PACKET_TYPE_DHCP_DISCOVER, PXENV_PACKET_TYPE_DHCP_ACK, or PXENV_PACKET_TYPE_BINL_REPLY.
These are all the fields of the pxenv_undi_isr_s structure.
typedef struct pxenv_undi_isr_s { pxenv_status_t status; u_int16_t func_flag; u_int16_t buffer_length; u_int16_t frame_length; u_int16_t frame_header_length; segoff16_t frame_addr; u_int8_t prot_type; u_int8_t pkt_type; } pxenv_undi_isr_t; |