netlink-protocol: Remove definition of struct sockaddr_nl.
authorBen Pfaff <blp@nicira.com>
Thu, 10 Jul 2014 20:21:35 +0000 (13:21 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 10 Jul 2014 20:21:57 +0000 (13:21 -0700)
This struct is used only in netlink-socket.c, which is only used on Linux,
which in turn gets the definition from <linux/netlink.h>.  On Windows the
definition actually causes a small amount of trouble because Windows does
not define sa_family_t (despite POSIX), so it's better to remove it.

Even if other platforms adopt Netlink, I have no reason to believe that
they will use the same sockaddr format as Linux.

CC: Saurabh Shah <ssaurabh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
lib/netlink-protocol.h

index 3009fc5..88b7abf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, 2011 Nicira, Inc.
+ * Copyright (c) 2008, 2010, 2011, 2014 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #else
 #define NETLINK_GENERIC         16
 
-struct sockaddr_nl {
-    sa_family_t nl_family;
-    unsigned short int nl_pad;
-    uint32_t nl_pid;
-    uint32_t nl_groups;
-};
-BUILD_ASSERT_DECL(sizeof(struct sockaddr_nl) == 12);
-
 /* nlmsg_flags bits. */
 #define NLM_F_REQUEST           0x001
 #define NLM_F_MULTI             0x002