#include <net_if.h>
Data Fields | |
nip_phy_if_type_t | type |
Interface type which will be used by ARP for address resolution. | |
nip_net_if_stats_t | stats |
Physical Interface statistics (packet loss, etc). | |
nip_phy_if_flags_t | flags |
Physical Interface Flags. | |
uint8_t | hw_addr [NIP_MAX_HW_ADDR_SIZE] |
Hardware address. | |
uint8_t | hw_brdcst_addr [NIP_MAX_HW_ADDR_SIZE] |
Hardware broadcast address. | |
uint8_t | hw_addr_size |
uint16_t | rx_bytes |
Size of hardware address. | |
uint16_t | rx_pos |
bytes pending to be read from phy memory. | |
uint16_t | tx_bytes |
position in receive packet buffer | |
uint16_t | tx_pos |
bytes still to be sent in current transmission | |
nip_success_t(* | open )(nip_net_if_id_t net_if_id) |
position in transmit packet buffer | |
nip_success_t(* | close )(nip_net_if_id_t net_if_id) |
Stops network interface. | |
nip_error_t(* | hard_send_init )(nip_net_if_id_t net_if_id, void *ll_target_addr, uint16_t type, void *daddr, void *saddr, uint16_t len) |
Builds hardware header and initializes packet transmission. | |
uint16_t(* | hard_send )(nip_net_if_id_t net_if_id, uint8_t *buffer, uint16_t count) |
Transmit count bytes from given buffer. | |
uint16_t(* | hard_read )(nip_net_if_id_t net_if_id, uint8_t *buffer, uint16_t count) |
Read data from interface and copy it into recv_buf. | |
nip_success_t(* | hard_read_init )(nip_net_if_id_t net_if_id) |
Initialize Reading packet from interface. | |
void(* | hard_disp_recv )(void) |
Function to be called by dispatcher to initiate reception of data. |
Some of the properties are in the style of Linux device driver attributes and methods.
Definition at line 292 of file net_if.h.
Interface type which will be used by ARP for address resolution.
Definition at line 294 of file net_if.h.
Referenced by nip_dhcp_disp_check().
uint8_t nip_phy_if_t::hw_addr[NIP_MAX_HW_ADDR_SIZE] |
uint8_t nip_phy_if_t::hw_brdcst_addr[NIP_MAX_HW_ADDR_SIZE] |
uint8_t nip_phy_if_t::hw_addr_size |
uint16_t nip_phy_if_t::rx_bytes |
uint16_t nip_phy_if_t::rx_pos |
uint16_t nip_phy_if_t::tx_bytes |
uint16_t nip_phy_if_t::tx_pos |
nip_success_t(* nip_phy_if_t::open)(nip_net_if_id_t net_if_id) |
position in transmit packet buffer
Opens network interface. The open method should register any system resource it needs (I/O ports, IRQ, etc)
Referenced by init_networking().
nip_success_t(* nip_phy_if_t::close)(nip_net_if_id_t net_if_id) |
Stops network interface.
Reverses anything that's been done at open.
Referenced by init_networking().
nip_error_t(* nip_phy_if_t::hard_send_init)(nip_net_if_id_t net_if_id, void *ll_target_addr, uint16_t type, void *daddr, void *saddr, uint16_t len) |
Builds hardware header and initializes packet transmission.
If daddr is NULL, the destination address should be resolved using the given ll_target_addr. For ethernet devices ARP is being used. Ethernet device drivers can rely on nip_arp_lookup( uint8_t* addr) to be available. If the Address cannot be resolved locally the hardware specific address resolution mechanism should be initiated and the return value set to NIP_RESOLVING_ADDR. It's up to the caller to handle the return value correctly and retry transmission after a reasonable timeout.
Referenced by init_networking().
uint16_t(* nip_phy_if_t::hard_send)(nip_net_if_id_t net_if_id, uint8_t *buffer, uint16_t count) |
Transmit count bytes from given buffer.
Referenced by init_networking().
uint16_t(* nip_phy_if_t::hard_read)(nip_net_if_id_t net_if_id, uint8_t *buffer, uint16_t count) |
Read data from interface and copy it into recv_buf.
If size is 0 the current reception will be terminated, all pending bytes discarded and network interface reset to read next packet.
Referenced by init_networking().
nip_success_t(* nip_phy_if_t::hard_read_init)(nip_net_if_id_t net_if_id) |
Initialize Reading packet from interface.
Referenced by init_networking().
void(* nip_phy_if_t::hard_disp_recv)(void) |
Function to be called by dispatcher to initiate reception of data.