mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-26 10:07:06 +08:00
Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6
- rename IP4_ADDR_ANY to IP4_ADDR_ANY4 - IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
This commit is contained in:
@@ -241,8 +241,8 @@ netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local)
|
||||
* Binding one netconn twice might not always be checked correctly!
|
||||
*
|
||||
* @param conn the netconn to bind
|
||||
* @param addr the local IP address to bind the netconn to (use IP_ADDR_ANY
|
||||
* to bind to all addresses)
|
||||
* @param addr the local IP address to bind the netconn to
|
||||
* (use IP4_ADDR_ANY/IP6_ADDR_ANY to bind to all addresses)
|
||||
* @param port the local port to bind the netconn to (not used for RAW)
|
||||
* @return ERR_OK if bound, any other err_t on failure
|
||||
*/
|
||||
@@ -256,7 +256,7 @@ netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port)
|
||||
|
||||
/* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */
|
||||
if (addr == NULL) {
|
||||
addr = IP_ADDR_ANY;
|
||||
addr = IP4_ADDR_ANY;
|
||||
}
|
||||
|
||||
API_MSG_VAR_ALLOC(msg);
|
||||
@@ -288,7 +288,7 @@ netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port)
|
||||
|
||||
/* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */
|
||||
if (addr == NULL) {
|
||||
addr = IP_ADDR_ANY;
|
||||
addr = IP4_ADDR_ANY;
|
||||
}
|
||||
|
||||
API_MSG_VAR_ALLOC(msg);
|
||||
@@ -867,10 +867,10 @@ netconn_join_leave_group(struct netconn *conn,
|
||||
|
||||
/* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */
|
||||
if (multiaddr == NULL) {
|
||||
multiaddr = IP_ADDR_ANY;
|
||||
multiaddr = IP4_ADDR_ANY;
|
||||
}
|
||||
if (netif_addr == NULL) {
|
||||
netif_addr = IP_ADDR_ANY;
|
||||
netif_addr = IP4_ADDR_ANY;
|
||||
}
|
||||
|
||||
API_MSG_VAR_REF(msg).conn = conn;
|
||||
|
||||
@@ -134,13 +134,13 @@ netifapi_netif_add(struct netif *netif,
|
||||
|
||||
#if LWIP_IPV4
|
||||
if (ipaddr == NULL) {
|
||||
ipaddr = IP4_ADDR_ANY;
|
||||
ipaddr = IP4_ADDR_ANY4;
|
||||
}
|
||||
if (netmask == NULL) {
|
||||
netmask = IP4_ADDR_ANY;
|
||||
netmask = IP4_ADDR_ANY4;
|
||||
}
|
||||
if (gw == NULL) {
|
||||
gw = IP4_ADDR_ANY;
|
||||
gw = IP4_ADDR_ANY4;
|
||||
}
|
||||
#endif /* LWIP_IPV4 */
|
||||
|
||||
@@ -177,13 +177,13 @@ netifapi_netif_set_addr(struct netif *netif,
|
||||
NETIFAPI_VAR_ALLOC(msg);
|
||||
|
||||
if (ipaddr == NULL) {
|
||||
ipaddr = IP4_ADDR_ANY;
|
||||
ipaddr = IP4_ADDR_ANY4;
|
||||
}
|
||||
if (netmask == NULL) {
|
||||
netmask = IP4_ADDR_ANY;
|
||||
netmask = IP4_ADDR_ANY4;
|
||||
}
|
||||
if (gw == NULL) {
|
||||
gw = IP4_ADDR_ANY;
|
||||
gw = IP4_ADDR_ANY4;
|
||||
}
|
||||
|
||||
NETIFAPI_VAR_REF(msg).netif = netif;
|
||||
|
||||
Reference in New Issue
Block a user