Network Interface Driver Interface Definitions.
All network drivers must have the following basic VFS structure The root of the driver will only contain files that are named from zero upwards that represent the present network adapters that this driver controls. All VFS nodes must implement eTplDrv_IOCtl with DRV_IOCTL_TYPE returning DRV_TYPE_NETWORK. The adapter nodes must also implement eTplNetwork_IOCtl fully (unless it is noted in the eTplNetwork_IOCtl documentation that a call is optional)
When an adapter file is read from, the driver will block the reading thread until a packet arrives (if there is not already an unhandled packet in the queue) this will then be read into the destination buffer. If the packet does not fit in the buffer, the end of it is discarded. Likewise, if the packet does not completely fill the buffer, the call will still read to the buffer and then return the size of the packet.
When an adapter is written to, the data written is encoded as a packet and sent, if the data is not the correct size to be sent (if the packet is too small, or if it is too large) -1 should be returned and the packet will not be sent.
Go to the source code of this file.
Defines | |
#define | DRV_NETWORK_IOCTLNAMES "get_mac_addr" |
IOCtl name strings for use with eTplDrv_IOCtl.DRV_IOCTL_LOOKUP. | |
Enumerations | |
enum | eTplNetwork_IOCtl { NET_IOCTL_GETMAC = 4 } |
Common Network IOCtl Calls. More... |
enum eTplNetwork_IOCtl |