lwIP 2.2.1 Lightweight IP stack

Modules | Macros
IP
APIs » "raw" APIs

## Modules
| IPv4
| IPv6

## Macros
#define | ip_output(p, src, dest, ttl, tos, proto)
#define | ip_output_if(p, src, dest, ttl, tos, proto, netif)
#define | ip_output_if_src(p, src, dest, ttl, tos, proto, netif)
#define | ip_route(src, dest)
#define | ip_netif_get_local_ip(netif, dest)

## Detailed Description

## Macro Definition Documentation

## ◆ ip_netif_get_local_ip

#define ip_netif_get_local_ip | ( |  | netif,
|  |  | dest
| ) |  |

Value:
(IP_IS_V6(dest) ? \
ip6_netif_get_local_ip(netif, ip_2_ip6(dest)) : \
ip4_netif_get_local_ip(netif))

Get netif for IP.

## ◆ ip_output

#define ip_output | ( |  | p,
|  |  | src,
|  |  | dest,
|  |  | ttl,
|  |  | tos,
|  |  | proto
| ) |  |

Value:
(IP_IS_V6(dest) ? \
ip6_output(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto) : \
ip4_output(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto))

Output IP packet, netif is selected by source address

## ◆ ip_output_if

#define ip_output_if | ( |  | p,
|  |  | src,
|  |  | dest,
|  |  | ttl,
|  |  | tos,
|  |  | proto,
|  |  | netif
| ) |  |

Value:
(IP_IS_V6(dest) ? \
ip6_output_if(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \
ip4_output_if(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif))

Output IP packet to specified interface

## ◆ ip_output_if_src

#define ip_output_if_src | ( |  | p,
|  |  | src,
|  |  | dest,
|  |  | ttl,
|  |  | tos,
|  |  | proto,
|  |  | netif
| ) |  |

Value:
(IP_IS_V6(dest) ? \
ip6_output_if_src(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \
ip4_output_if_src(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif))

Output IP packet to interface specifying source address

## ◆ ip_route

#define ip_route | ( |  | src,
|  |  | dest
| ) |  |

Value:
(IP_IS_V6(dest) ? \
ip6_route(ip_2_ip6(src), ip_2_ip6(dest)) : \
ip4_route_src(ip_2_ip4(src), ip_2_ip4(dest)))

Get netif for address combination. See ip6_route and ip4_route

ip4_route_src
struct netif * ip4_route_src(const ip4_addr_t *src, const ip4_addr_t *dest)
Definition: ip4.c:129
ip4_output
err_t ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto)
Definition: ip4.c:1062
netif
Definition: netif.h:269
ip_2_ip4
#define ip_2_ip4(ipaddr)
Definition: ip_addr.h:120
ip4_output_if_src
err_t ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif)
Definition: ip4.c:861
ip_2_ip6
#define ip_2_ip6(ipaddr)
Definition: ip_addr.h:116
ip4_output_if
err_t ip4_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif)
Definition: ip4.c:821