1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _LINUX_SOCKET_H
3#define _LINUX_SOCKET_H
4
5/*
6 * Desired design of maximum size and alignment (see RFC2553)
7 */
8#define _K_SS_MAXSIZE 128 /* Implementation specific max size */
9#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
10 /* Implementation specific desired alignment */
11
12typedef unsigned short __kernel_sa_family_t;
13
14struct __kernel_sockaddr_storage {
15 __kernel_sa_family_t ss_family; /* address family */
16 /* Following field(s) are implementation specific */
17 char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
18 /* space to achieve desired size, */
19 /* _SS_MAXSIZE value minus size of ss_family */
20} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */
21
22#endif /* _LINUX_SOCKET_H */
23