summaryrefslogtreecommitdiffstats
path: root/lib/ipaddr.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-05-26 19:44:29 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-10 22:15:56 +0200
commit7fb9d20fcfe5619a2dfb05085f9da5590820ecb5 (patch)
treeb32f179e2ba5602c9100b07b7647a697ef97b3b5 /lib/ipaddr.h
parentMerge commit '3d22338f04d9554fa' into evpn-prep (diff)
downloadfrr-7fb9d20fcfe5619a2dfb05085f9da5590820ecb5.tar.xz
frr-7fb9d20fcfe5619a2dfb05085f9da5590820ecb5.zip
lib: Remove typedef from ipaddr
The ipaddr_t type was conflicting with code on omnios. Remove the typedef Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/ipaddr.h')
-rw-r--r--lib/ipaddr.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ipaddr.h b/lib/ipaddr.h
index 3425d73fd..ea98a1b74 100644
--- a/lib/ipaddr.h
+++ b/lib/ipaddr.h
@@ -35,7 +35,7 @@ enum ipaddr_type_t
IPADDR_V6 = 2, /* IPv6 */
};
-typedef struct ipaddr
+struct ipaddr
{
enum ipaddr_type_t ipa_type;
union
@@ -46,7 +46,7 @@ typedef struct ipaddr
} ip;
#define ipaddr_v4 ip._v4_addr
#define ipaddr_v6 ip._v6_addr
-} ipaddr_t;
+};
#define IS_IPADDR_NONE(p) ((p)->ipa_type == IPADDR_NONE)
#define IS_IPADDR_V4(p) ((p)->ipa_type == IPADDR_V4)
@@ -56,11 +56,11 @@ typedef struct ipaddr
#define SET_IPADDR_V6(p) (p)->ipa_type = IPADDR_V6
static inline int
-str2ipaddr (const char *str, ipaddr_t *ip)
+str2ipaddr (const char *str, struct ipaddr *ip)
{
int ret;
- memset (ip, 0, sizeof (ipaddr_t));
+ memset (ip, 0, sizeof (struct ipaddr));
ret = inet_pton (AF_INET, str, &ip->ipaddr_v4);
if (ret > 0) /* Valid IPv4 address. */
@@ -79,7 +79,7 @@ str2ipaddr (const char *str, ipaddr_t *ip)
}
static inline char *
-ipaddr2str (ipaddr_t *ip, char *buf, int size)
+ipaddr2str (struct ipaddr *ip, char *buf, int size)
{
buf[0] = '\0';
if (ip)