aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2011-08-24 14:43:55 -0400
committerDavid S. Miller <davem@davemloft.net>2011-08-26 12:02:50 -0400
commitbcb949b8847655516ba499ca75cd8529f167e360 (patch)
tree7e5457a45e5ddf1381bffc9cfe793504afe10696
parentd4b172d2ecb99edfb6afce6af8a65447af347543 (diff)
headers, net: Use __kernel_sa_family_t in more definitions shared with userland
Complete the work started with commit 6602a4baf4d1a73cc4685a39ef859e1c5ddf654c ('net: Make userland include of netlink.h more sane'). Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/atalk.h3
-rw-r--r--include/linux/ax25.h2
-rw-r--r--include/linux/caif/caif_socket.h7
-rw-r--r--include/linux/can.h2
-rw-r--r--include/linux/if_pppox.h7
-rw-r--r--include/linux/in.h2
-rw-r--r--include/linux/ipx.h2
-rw-r--r--include/linux/irda.h9
-rw-r--r--include/linux/l2tp.h7
-rw-r--r--include/linux/llc.h10
-rw-r--r--include/linux/netlink.h2
-rw-r--r--include/linux/phonet.h5
-rw-r--r--include/linux/rose.h5
-rw-r--r--include/linux/un.h4
-rw-r--r--include/linux/x25.h3
15 files changed, 37 insertions, 33 deletions
diff --git a/include/linux/atalk.h b/include/linux/atalk.h
index d34c187432ed..f57c36881c48 100644
--- a/include/linux/atalk.h
+++ b/include/linux/atalk.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <asm/byteorder.h> 5#include <asm/byteorder.h>
6#include <linux/socket.h>
6 7
7/* 8/*
8 * AppleTalk networking structures 9 * AppleTalk networking structures
@@ -28,7 +29,7 @@ struct atalk_addr {
28}; 29};
29 30
30struct sockaddr_at { 31struct sockaddr_at {
31 sa_family_t sat_family; 32 __kernel_sa_family_t sat_family;
32 __u8 sat_port; 33 __u8 sat_port;
33 struct atalk_addr sat_addr; 34 struct atalk_addr sat_addr;
34 char sat_zero[8]; 35 char sat_zero[8];
diff --git a/include/linux/ax25.h b/include/linux/ax25.h
index 56c11f0dbd80..74c89a41732d 100644
--- a/include/linux/ax25.h
+++ b/include/linux/ax25.h
@@ -47,7 +47,7 @@ typedef struct {
47} ax25_address; 47} ax25_address;
48 48
49struct sockaddr_ax25 { 49struct sockaddr_ax25 {
50 sa_family_t sax25_family; 50 __kernel_sa_family_t sax25_family;
51 ax25_address sax25_call; 51 ax25_address sax25_call;
52 int sax25_ndigis; 52 int sax25_ndigis;
53 /* Digipeater ax25_address sets follow */ 53 /* Digipeater ax25_address sets follow */
diff --git a/include/linux/caif/caif_socket.h b/include/linux/caif/caif_socket.h
index d9cb19b7cff7..3f3bac6af7bc 100644
--- a/include/linux/caif/caif_socket.h
+++ b/include/linux/caif/caif_socket.h
@@ -9,12 +9,7 @@
9#define _LINUX_CAIF_SOCKET_H 9#define _LINUX_CAIF_SOCKET_H
10 10
11#include <linux/types.h> 11#include <linux/types.h>
12
13#ifdef __KERNEL__
14#include <linux/socket.h> 12#include <linux/socket.h>
15#else
16#include <sys/socket.h>
17#endif
18 13
19/** 14/**
20 * enum caif_link_selector - Physical Link Selection. 15 * enum caif_link_selector - Physical Link Selection.
@@ -144,7 +139,7 @@ enum caif_debug_service {
144 * CAIF Channel. It defines the service to connect to on the modem. 139 * CAIF Channel. It defines the service to connect to on the modem.
145 */ 140 */
146struct sockaddr_caif { 141struct sockaddr_caif {
147 sa_family_t family; 142 __kernel_sa_family_t family;
148 union { 143 union {
149 struct { 144 struct {
150 __u8 type; /* type: enum caif_at_type */ 145 __u8 type; /* type: enum caif_at_type */
diff --git a/include/linux/can.h b/include/linux/can.h
index d18333302cbd..bb047dc2de16 100644
--- a/include/linux/can.h
+++ b/include/linux/can.h
@@ -78,7 +78,7 @@ struct can_frame {
78 * @can_addr: protocol specific address information 78 * @can_addr: protocol specific address information
79 */ 79 */
80struct sockaddr_can { 80struct sockaddr_can {
81 sa_family_t can_family; 81 __kernel_sa_family_t can_family;
82 int can_ifindex; 82 int can_ifindex;
83 union { 83 union {
84 /* transport protocol class address information (e.g. ISOTP) */ 84 /* transport protocol class address information (e.g. ISOTP) */
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 60e5558045c8..b5f927f59f26 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -20,6 +20,7 @@
20#include <linux/types.h> 20#include <linux/types.h>
21#include <asm/byteorder.h> 21#include <asm/byteorder.h>
22 22
23#include <linux/socket.h>
23#include <linux/if_ether.h> 24#include <linux/if_ether.h>
24#ifdef __KERNEL__ 25#ifdef __KERNEL__
25#include <linux/if.h> 26#include <linux/if.h>
@@ -63,7 +64,7 @@ struct pptp_addr {
63#define PX_MAX_PROTO 3 64#define PX_MAX_PROTO 3
64 65
65struct sockaddr_pppox { 66struct sockaddr_pppox {
66 sa_family_t sa_family; /* address family, AF_PPPOX */ 67 __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
67 unsigned int sa_protocol; /* protocol identifier */ 68 unsigned int sa_protocol; /* protocol identifier */
68 union { 69 union {
69 struct pppoe_addr pppoe; 70 struct pppoe_addr pppoe;
@@ -77,7 +78,7 @@ struct sockaddr_pppox {
77 * type instead. 78 * type instead.
78 */ 79 */
79struct sockaddr_pppol2tp { 80struct sockaddr_pppol2tp {
80 sa_family_t sa_family; /* address family, AF_PPPOX */ 81 __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
81 unsigned int sa_protocol; /* protocol identifier */ 82 unsigned int sa_protocol; /* protocol identifier */
82 struct pppol2tp_addr pppol2tp; 83 struct pppol2tp_addr pppol2tp;
83} __attribute__((packed)); 84} __attribute__((packed));
@@ -86,7 +87,7 @@ struct sockaddr_pppol2tp {
86 * bits. So we need a different sockaddr structure. 87 * bits. So we need a different sockaddr structure.
87 */ 88 */
88struct sockaddr_pppol2tpv3 { 89struct sockaddr_pppol2tpv3 {
89 sa_family_t sa_family; /* address family, AF_PPPOX */ 90 __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
90 unsigned int sa_protocol; /* protocol identifier */ 91 unsigned int sa_protocol; /* protocol identifier */
91 struct pppol2tpv3_addr pppol2tp; 92 struct pppol2tpv3_addr pppol2tp;
92} __attribute__((packed)); 93} __attribute__((packed));
diff --git a/include/linux/in.h b/include/linux/in.h
index beeb6dee2b49..01129c0ea87c 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -182,7 +182,7 @@ struct in_pktinfo {
182/* Structure describing an Internet (IP) socket address. */ 182/* Structure describing an Internet (IP) socket address. */
183#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ 183#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
184struct sockaddr_in { 184struct sockaddr_in {
185 sa_family_t sin_family; /* Address family */ 185 __kernel_sa_family_t sin_family; /* Address family */
186 __be16 sin_port; /* Port number */ 186 __be16 sin_port; /* Port number */
187 struct in_addr sin_addr; /* Internet address */ 187 struct in_addr sin_addr; /* Internet address */
188 188
diff --git a/include/linux/ipx.h b/include/linux/ipx.h
index aabb1d294025..3d48014cdd71 100644
--- a/include/linux/ipx.h
+++ b/include/linux/ipx.h
@@ -7,7 +7,7 @@
7#define IPX_MTU 576 7#define IPX_MTU 576
8 8
9struct sockaddr_ipx { 9struct sockaddr_ipx {
10 sa_family_t sipx_family; 10 __kernel_sa_family_t sipx_family;
11 __be16 sipx_port; 11 __be16 sipx_port;
12 __be32 sipx_network; 12 __be32 sipx_network;
13 unsigned char sipx_node[IPX_NODE_LEN]; 13 unsigned char sipx_node[IPX_NODE_LEN];
diff --git a/include/linux/irda.h b/include/linux/irda.h
index 00bdad0e8515..a014c3252311 100644
--- a/include/linux/irda.h
+++ b/include/linux/irda.h
@@ -26,12 +26,9 @@
26#define KERNEL_IRDA_H 26#define KERNEL_IRDA_H
27 27
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/socket.h>
29 30
30/* Please do *not* add any #include in this file, this file is 31/* Note that this file is shared with user space. */
31 * included as-is in user space.
32 * Please fix the calling file to properly included needed files before
33 * this one, or preferably to include <net/irda/irda.h> instead.
34 * Jean II */
35 32
36/* Hint bit positions for first hint byte */ 33/* Hint bit positions for first hint byte */
37#define HINT_PNP 0x01 34#define HINT_PNP 0x01
@@ -125,7 +122,7 @@ enum {
125#define LSAP_ANY 0xff 122#define LSAP_ANY 0xff
126 123
127struct sockaddr_irda { 124struct sockaddr_irda {
128 sa_family_t sir_family; /* AF_IRDA */ 125 __kernel_sa_family_t sir_family; /* AF_IRDA */
129 __u8 sir_lsap_sel; /* LSAP selector */ 126 __u8 sir_lsap_sel; /* LSAP selector */
130 __u32 sir_addr; /* Device address */ 127 __u32 sir_addr; /* Device address */
131 char sir_name[25]; /* Usually <service>:IrDA:TinyTP */ 128 char sir_name[25]; /* Usually <service>:IrDA:TinyTP */
diff --git a/include/linux/l2tp.h b/include/linux/l2tp.h
index 4bdb31df8e72..e77d7f9bb246 100644
--- a/include/linux/l2tp.h
+++ b/include/linux/l2tp.h
@@ -8,8 +8,8 @@
8#define _LINUX_L2TP_H_ 8#define _LINUX_L2TP_H_
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#ifdef __KERNEL__
12#include <linux/socket.h> 11#include <linux/socket.h>
12#ifdef __KERNEL__
13#include <linux/in.h> 13#include <linux/in.h>
14#else 14#else
15#include <netinet/in.h> 15#include <netinet/in.h>
@@ -26,14 +26,15 @@
26#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ 26#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
27struct sockaddr_l2tpip { 27struct sockaddr_l2tpip {
28 /* The first fields must match struct sockaddr_in */ 28 /* The first fields must match struct sockaddr_in */
29 sa_family_t l2tp_family; /* AF_INET */ 29 __kernel_sa_family_t l2tp_family; /* AF_INET */
30 __be16 l2tp_unused; /* INET port number (unused) */ 30 __be16 l2tp_unused; /* INET port number (unused) */
31 struct in_addr l2tp_addr; /* Internet address */ 31 struct in_addr l2tp_addr; /* Internet address */
32 32
33 __u32 l2tp_conn_id; /* Connection ID of tunnel */ 33 __u32 l2tp_conn_id; /* Connection ID of tunnel */
34 34
35 /* Pad to size of `struct sockaddr'. */ 35 /* Pad to size of `struct sockaddr'. */
36 unsigned char __pad[sizeof(struct sockaddr) - sizeof(sa_family_t) - 36 unsigned char __pad[sizeof(struct sockaddr) -
37 sizeof(__kernel_sa_family_t) -
37 sizeof(__be16) - sizeof(struct in_addr) - 38 sizeof(__be16) - sizeof(struct in_addr) -
38 sizeof(__u32)]; 39 sizeof(__u32)];
39}; 40};
diff --git a/include/linux/llc.h b/include/linux/llc.h
index ad7074ba81af..a2418ae13ee9 100644
--- a/include/linux/llc.h
+++ b/include/linux/llc.h
@@ -12,16 +12,20 @@
12 * 12 *
13 * See the GNU General Public License for more details. 13 * See the GNU General Public License for more details.
14 */ 14 */
15
16#include <linux/socket.h>
17
15#define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */ 18#define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */
16struct sockaddr_llc { 19struct sockaddr_llc {
17 sa_family_t sllc_family; /* AF_LLC */ 20 __kernel_sa_family_t sllc_family; /* AF_LLC */
18 sa_family_t sllc_arphrd; /* ARPHRD_ETHER */ 21 __kernel_sa_family_t sllc_arphrd; /* ARPHRD_ETHER */
19 unsigned char sllc_test; 22 unsigned char sllc_test;
20 unsigned char sllc_xid; 23 unsigned char sllc_xid;
21 unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */ 24 unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */
22 unsigned char sllc_sap; 25 unsigned char sllc_sap;
23 unsigned char sllc_mac[IFHWADDRLEN]; 26 unsigned char sllc_mac[IFHWADDRLEN];
24 unsigned char __pad[__LLC_SOCK_SIZE__ - sizeof(sa_family_t) * 2 - 27 unsigned char __pad[__LLC_SOCK_SIZE__ -
28 sizeof(__kernel_sa_family_t) * 2 -
25 sizeof(unsigned char) * 4 - IFHWADDRLEN]; 29 sizeof(unsigned char) * 4 - IFHWADDRLEN];
26}; 30};
27 31
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 180540a84d37..8180cd9d73d5 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -1,7 +1,7 @@
1#ifndef __LINUX_NETLINK_H 1#ifndef __LINUX_NETLINK_H
2#define __LINUX_NETLINK_H 2#define __LINUX_NETLINK_H
3 3
4#include <linux/socket.h> /* for sa_family_t */ 4#include <linux/socket.h> /* for __kernel_sa_family_t */
5#include <linux/types.h> 5#include <linux/types.h>
6 6
7#define NETLINK_ROUTE 0 /* Routing/device hook */ 7#define NETLINK_ROUTE 0 /* Routing/device hook */
diff --git a/include/linux/phonet.h b/include/linux/phonet.h
index 6fb13841db45..f53a4167c5f4 100644
--- a/include/linux/phonet.h
+++ b/include/linux/phonet.h
@@ -24,6 +24,7 @@
24#define LINUX_PHONET_H 24#define LINUX_PHONET_H
25 25
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/socket.h>
27 28
28/* Automatic protocol selection */ 29/* Automatic protocol selection */
29#define PN_PROTO_TRANSPORT 0 30#define PN_PROTO_TRANSPORT 0
@@ -96,11 +97,11 @@ struct phonetmsg {
96 97
97/* Phonet socket address structure */ 98/* Phonet socket address structure */
98struct sockaddr_pn { 99struct sockaddr_pn {
99 sa_family_t spn_family; 100 __kernel_sa_family_t spn_family;
100 __u8 spn_obj; 101 __u8 spn_obj;
101 __u8 spn_dev; 102 __u8 spn_dev;
102 __u8 spn_resource; 103 __u8 spn_resource;
103 __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; 104 __u8 spn_zero[sizeof(struct sockaddr) - sizeof(__kernel_sa_family_t) - 3];
104} __attribute__((packed)); 105} __attribute__((packed));
105 106
106/* Well known address */ 107/* Well known address */
diff --git a/include/linux/rose.h b/include/linux/rose.h
index e8289cdbcc20..1fcfe95893b8 100644
--- a/include/linux/rose.h
+++ b/include/linux/rose.h
@@ -7,6 +7,7 @@
7#ifndef ROSE_KERNEL_H 7#ifndef ROSE_KERNEL_H
8#define ROSE_KERNEL_H 8#define ROSE_KERNEL_H
9 9
10#include <linux/socket.h>
10#include <linux/ax25.h> 11#include <linux/ax25.h>
11 12
12#define ROSE_MTU 251 13#define ROSE_MTU 251
@@ -46,7 +47,7 @@ typedef struct {
46} rose_address; 47} rose_address;
47 48
48struct sockaddr_rose { 49struct sockaddr_rose {
49 sa_family_t srose_family; 50 __kernel_sa_family_t srose_family;
50 rose_address srose_addr; 51 rose_address srose_addr;
51 ax25_address srose_call; 52 ax25_address srose_call;
52 int srose_ndigis; 53 int srose_ndigis;
@@ -54,7 +55,7 @@ struct sockaddr_rose {
54}; 55};
55 56
56struct full_sockaddr_rose { 57struct full_sockaddr_rose {
57 sa_family_t srose_family; 58 __kernel_sa_family_t srose_family;
58 rose_address srose_addr; 59 rose_address srose_addr;
59 ax25_address srose_call; 60 ax25_address srose_call;
60 unsigned int srose_ndigis; 61 unsigned int srose_ndigis;
diff --git a/include/linux/un.h b/include/linux/un.h
index 45561c564b8e..3ed3e46c1b1f 100644
--- a/include/linux/un.h
+++ b/include/linux/un.h
@@ -1,10 +1,12 @@
1#ifndef _LINUX_UN_H 1#ifndef _LINUX_UN_H
2#define _LINUX_UN_H 2#define _LINUX_UN_H
3 3
4#include <linux/socket.h>
5
4#define UNIX_PATH_MAX 108 6#define UNIX_PATH_MAX 108
5 7
6struct sockaddr_un { 8struct sockaddr_un {
7 sa_family_t sun_family; /* AF_UNIX */ 9 __kernel_sa_family_t sun_family; /* AF_UNIX */
8 char sun_path[UNIX_PATH_MAX]; /* pathname */ 10 char sun_path[UNIX_PATH_MAX]; /* pathname */
9}; 11};
10 12
diff --git a/include/linux/x25.h b/include/linux/x25.h
index 6450a7f12074..810cce6737ea 100644
--- a/include/linux/x25.h
+++ b/include/linux/x25.h
@@ -12,6 +12,7 @@
12#define X25_KERNEL_H 12#define X25_KERNEL_H
13 13
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/socket.h>
15 16
16#define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0) 17#define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0)
17#define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1) 18#define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1)
@@ -57,7 +58,7 @@ struct x25_address {
57 * Linux X.25 Address structure, used for bind, and connect mostly. 58 * Linux X.25 Address structure, used for bind, and connect mostly.
58 */ 59 */
59struct sockaddr_x25 { 60struct sockaddr_x25 {
60 sa_family_t sx25_family; /* Must be AF_X25 */ 61 __kernel_sa_family_t sx25_family; /* Must be AF_X25 */
61 struct x25_address sx25_addr; /* X.121 Address */ 62 struct x25_address sx25_addr; /* X.121 Address */
62}; 63};
63 64