From 5193844ac4f6a7798541cd2faa4ae49117b98cf9 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 8 Aug 2017 11:21:11 +0200 Subject: [PATCH] iana.h: Prefix #defines with LWIP_ --- src/core/ipv4/dhcp.c | 2 +- src/core/ipv4/etharp.c | 4 ++-- src/include/lwip/prot/iana.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index ded63619..bf70c419 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -1909,7 +1909,7 @@ dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t msg_out->op = DHCP_BOOTREQUEST; /* @todo: make link layer independent */ - msg_out->htype = IANA_HWTYPE_ETHERNET; + msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET; msg_out->hlen = netif->hwaddr_len; msg_out->xid = lwip_htonl(dhcp->xid); /* we don't need the broadcast flag since we can receive unicast traffic diff --git a/src/core/ipv4/etharp.c b/src/core/ipv4/etharp.c index 4a2d9a32..4e013878 100644 --- a/src/core/ipv4/etharp.c +++ b/src/core/ipv4/etharp.c @@ -651,7 +651,7 @@ etharp_input(struct pbuf *p, struct netif *netif) hdr = (struct etharp_hdr *)p->payload; /* RFC 826 "Packet Reception": */ - if ((hdr->hwtype != PP_HTONS(IANA_HWTYPE_ETHERNET)) || + if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || (hdr->hwlen != ETH_HWADDR_LEN) || (hdr->protolen != sizeof(ip4_addr_t)) || (hdr->proto != PP_HTONS(ETHTYPE_IP))) { @@ -1140,7 +1140,7 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->sipaddr, ipsrc_addr); IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr); - hdr->hwtype = PP_HTONS(IANA_HWTYPE_ETHERNET); + hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET); hdr->proto = PP_HTONS(ETHTYPE_IP); /* set hwlen and protolen */ hdr->hwlen = ETH_HWADDR_LEN; diff --git a/src/include/lwip/prot/iana.h b/src/include/lwip/prot/iana.h index 9c0a3a72..899a445a 100644 --- a/src/include/lwip/prot/iana.h +++ b/src/include/lwip/prot/iana.h @@ -42,7 +42,8 @@ extern "C" { #endif -#define IANA_HWTYPE_ETHERNET 1 +/** Hardware types */ +#define LWIP_IANA_HWTYPE_ETHERNET 1 #ifdef __cplusplus }