summaryrefslogtreecommitdiff
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2015-10-18 11:48:55 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2015-10-18 11:48:55 +0100
commitcebada14c32e6603380a913fb852854c46605d1d (patch)
tree88396b80b0a558866002809642876792f3c60de9 /include/linux/socket.h
parent0bb90c44862ce3f9018656beadfbc2aac4a0d517 (diff)
parent1891e0e2cefced50e7bfdacd50942cefe5bf73ba (diff)
downloadlibmnl-upstream.tar.gz
libmnl-upstream.zip
Merge remote-tracking branch 'source/master' into upstreamupstream
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
new file mode 100644
index 0000000..8c1e501
--- /dev/null
+++ b/include/linux/socket.h
@@ -0,0 +1,21 @@
+#ifndef _LINUX_SOCKET_H
+#define _LINUX_SOCKET_H
+
+/*
+ * Desired design of maximum size and alignment (see RFC2553)
+ */
+#define _K_SS_MAXSIZE 128 /* Implementation specific max size */
+#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
+ /* Implementation specific desired alignment */
+
+typedef unsigned short __kernel_sa_family_t;
+
+struct __kernel_sockaddr_storage {
+ __kernel_sa_family_t ss_family; /* address family */
+ /* Following field(s) are implementation specific */
+ char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
+ /* space to achieve desired size, */
+ /* _SS_MAXSIZE value minus size of ss_family */
+} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */
+
+#endif /* _LINUX_SOCKET_H */