|
| void | etharp_tmr (void) |
| ssize_t | etharp_find_addr (struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr **eth_ret, const ip4_addr_t **ip_ret) |
| int | etharp_get_entry (size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret) |
| err_t | etharp_output (struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) |
| err_t | etharp_query (struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) |
| err_t | etharp_request (struct netif *netif, const ip4_addr_t *ipaddr) |
| void | etharp_cleanup_netif (struct netif *netif) |
| err_t | etharp_acd_probe (struct netif *netif, const ip4_addr_t *ipaddr) |
| err_t | etharp_acd_announce (struct netif *netif, const ip4_addr_t *ipaddr) |
| void | etharp_input (struct pbuf *p, struct netif *netif) |
Ethernet output function - handles OUTGOING ethernet level traffic, implements ARP resolving. To be used in most low-level netif implementations
Resolve and fill-in Ethernet address header for outgoing IP packet.
For IP multicast and broadcast, corresponding Ethernet addresses are selected and the packet is transmitted on the link.
For unicast addresses, the packet is submitted to etharp_query(). In case the IP address is outside the local network, the IP address of the gateway is used.
- Parameters
-
| netif | The lwIP network interface which the IP packet will be sent on. |
| q | The pbuf(s) containing the IP packet to be sent. |
| ipaddr | The IP address of the packet destination. |
- Returns
-
Send an ARP request for the given IP address and/or queue a packet.
If the IP address was not yet in the cache, a pending ARP cache entry is added and an ARP request is sent for the given address. The packet is queued on this entry.
If the IP address was already pending in the cache, a new ARP request is sent for the given address. The packet is queued on this entry.
If the IP address was already stable in the cache, and a packet is given, it is directly sent and no ARP request is sent out.
If the IP address was already stable in the cache, and no packet is given, an ARP request is sent out.
- Parameters
-
| netif | The lwIP network interface on which ipaddr must be queried for. |
| ipaddr | The IP address to be resolved. |
| q | If non-NULL, a pbuf that must be delivered to the IP address. q is not freed by this function. |
- Note
- q must only be ONE packet, not a packet queue!
- Returns
- ERR_BUF Could not make room for Ethernet header.
- ERR_MEM Hardware address unknown, and no more ARP entries available to query for address or queue the packet.
- ERR_MEM Could not queue packet due to memory shortage.
- ERR_RTE No route to destination (no gateway to external networks).
- ERR_ARG Non-unicast address given, those will not appear in ARP cache.