]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Remove typedef from ipaddr
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 26 May 2017 17:44:29 +0000 (13:44 -0400)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 10 Jul 2017 20:15:56 +0000 (22:15 +0200)
The ipaddr_t type was conflicting with code on omnios.

Remove the typedef

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/ipaddr.h
lib/prefix.h

index 3425d73fd804ba04f1e5492ab41c50ea1d4de69d..ea98a1b7460aa6168a6ef518f7db1a7c96b8b466 100644 (file)
@@ -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)
index 3d2621c910aa7a941d1708cff58f8400d31c255c..549798e92e10338cc5955a5cbb98d2b01f357c98 100644 (file)
@@ -66,7 +66,7 @@ struct evpn_addr
   u_char ip_prefix_length;
   struct ethaddr mac;
   uint32_t eth_tag;
-  ipaddr_t ip;
+  struct ipaddr ip;
 #if 0
   union
   {