lwIP 2.2.1
Lightweight IP stack
Loading...
Searching...
No Matches
IPv4 address handling

Functions

void netif_set_ipaddr (struct netif *netif, const ip4_addr_t *ipaddr)
void netif_set_netmask (struct netif *netif, const ip4_addr_t *netmask)
void netif_set_gw (struct netif *netif, const ip4_addr_t *gw)
void netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)

Detailed Description

Function Documentation

◆ netif_set_addr()

void netif_set_addr ( struct netif * netif,
const ip4_addr_t * ipaddr,
const ip4_addr_t * netmask,
const ip4_addr_t * gw )

Change IP address configuration for a network interface (including netmask and default gateway).

Parameters
netifthe network interface to change
ipaddrthe new IP address
netmaskthe new netmask
gwthe new default gateway

◆ netif_set_gw()

void netif_set_gw ( struct netif * netif,
const ip4_addr_t * gw )

Change the default gateway for a network interface

Parameters
netifthe network interface to change
gwthe new default gateway
Note
call netif_set_addr() if you also want to change ip address and netmask

◆ netif_set_ipaddr()

void netif_set_ipaddr ( struct netif * netif,
const ip4_addr_t * ipaddr )

Change the IP address of a network interface

Parameters
netifthe network interface to change
ipaddrthe new IP address
Note
call netif_set_addr() if you also want to change netmask and default gateway

◆ netif_set_netmask()

void netif_set_netmask ( struct netif * netif,
const ip4_addr_t * netmask )

Change the netmask of a network interface

Parameters
netifthe network interface to change
netmaskthe new netmask
Note
call netif_set_addr() if you also want to change ip address and default gateway