mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
Added yet another IP-address-modifying define, ip_addr_set_any()
This commit is contained in:
parent
b3caddab30
commit
90bed0c5ac
@ -836,7 +836,7 @@ dhcp_discover(struct netif *netif)
|
||||
err_t result = ERR_OK;
|
||||
u16_t msecs;
|
||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n"));
|
||||
ip_addr_set(&dhcp->offered_ip_addr, IP_ADDR_ANY);
|
||||
ip_addr_set_any(&dhcp->offered_ip_addr);
|
||||
dhcp_set_state(dhcp, DHCP_SELECTING);
|
||||
/* create and initialize the DHCP message header */
|
||||
result = dhcp_create_request(netif, dhcp);
|
||||
|
@ -1442,7 +1442,7 @@ void snmp_insert_iprteidx_tree(u8_t dflt, struct netif *ni)
|
||||
if (dflt != 0)
|
||||
{
|
||||
/* the default route 0.0.0.0 */
|
||||
ip_addr_set(&dst, &ip_addr_any);
|
||||
ip_addr_set_any(&dst);
|
||||
insert = 1;
|
||||
}
|
||||
else
|
||||
@ -1519,7 +1519,7 @@ void snmp_delete_iprteidx_tree(u8_t dflt, struct netif *ni)
|
||||
if (dflt != 0)
|
||||
{
|
||||
/* the default route 0.0.0.0 */
|
||||
ip_addr_set(&dst, &ip_addr_any);
|
||||
ip_addr_set_any(&dst);
|
||||
del = 1;
|
||||
}
|
||||
else
|
||||
|
@ -739,7 +739,7 @@ void
|
||||
udp_disconnect(struct udp_pcb *pcb)
|
||||
{
|
||||
/* reset remote address association */
|
||||
ip_addr_set(&pcb->remote_ip, IP_ADDR_ANY);
|
||||
ip_addr_set_any(&pcb->remote_ip);
|
||||
pcb->remote_port = 0;
|
||||
/* mark PCB as unconnected */
|
||||
pcb->flags &= ~UDP_FLAGS_CONNECTED;
|
||||
|
@ -134,7 +134,9 @@ extern const ip_addr_t ip_addr_broadcast;
|
||||
((src) == NULL ? 0:\
|
||||
(src)->addr))
|
||||
/** Set complete address to zero */
|
||||
#define ip_addr_set_zero(ipaddr) (ipaddr)->addr = IPADDR_ANY
|
||||
#define ip_addr_set_zero(ipaddr) ((ipaddr)->addr = 0)
|
||||
/** Set address to IPADDR_ANY (no need for htonl()) */
|
||||
#define ip_addr_set_any(ipaddr) ((ipaddr)->addr = IPADDR_ANY)
|
||||
/** Set address to loopback address */
|
||||
#define ip_addr_set_loopback(ipaddr) ((ipaddr)->addr = htonl(IPADDR_LOOPBACK))
|
||||
/** Safely copy one IP address to another and change byte order
|
||||
|
Loading…
Reference in New Issue
Block a user