Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
Common IPv4 and IPv6 code. More...
Go to the source code of this file.
Functions | |
struct netif * | ip_route (ip_addr_t *dest) |
Finds the appropriate network interface for a given IP address. | |
static void | ip_forward (struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) |
Forwards an IP packet. | |
err_t | ip_input (struct pbuf *p, struct netif *inp) |
This function is called by the network interface device driver when an IP packet is received. | |
Variables | |
struct netif * | current_netif |
The interface that provided the packet for the current callback invocation. | |
struct ip_hdr * | current_header |
Header of the input packet currently being processed. | |
ip_addr_t | current_iphdr_src |
Source IP address of current_header. | |
ip_addr_t | current_iphdr_dest |
Destination IP address of current_header. | |
static u16_t | ip_id |
The IP header ID of the next outgoing IP packet. |
Detailed Description
Common IPv4 and IPv6 code.
This is the IPv4 layer implementation for incoming and outgoing IP traffic.
- See also:
- ip_frag.c
Definition in file ip.c.
Function Documentation
Forwards an IP packet.
It finds an appropriate route for the packet, decrements the TTL value of the packet, adjusts the checksum and outputs the packet on the appropriate interface.
- Parameters:
-
p the packet to forward (p->payload points to IP header) iphdr the IP header of the input packet inp the netif on which this packet was received
Finds the appropriate network interface for a given IP address.
It searches the list of network interfaces linearly. A match is found if the masked IP address of the network interface equals the masked IP address given to the function.
- Parameters:
-
dest the destination IP address for which to find the route
- Returns:
- the netif on which to send to reach dest
Variable Documentation
struct ip_hdr* current_header |
struct netif* current_netif |
Generated on Tue Jul 12 2022 11:03:02 by
