162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _UAPI_LINUX_SOCKET_H 362306a36Sopenharmony_ci#define _UAPI_LINUX_SOCKET_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * Desired design of maximum size and alignment (see RFC2553) 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci#define _K_SS_MAXSIZE 128 /* Implementation specific max size */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_citypedef unsigned short __kernel_sa_family_t; 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* 1362306a36Sopenharmony_ci * The definition uses anonymous union and struct in order to control the 1462306a36Sopenharmony_ci * default alignment. 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_cistruct __kernel_sockaddr_storage { 1762306a36Sopenharmony_ci union { 1862306a36Sopenharmony_ci struct { 1962306a36Sopenharmony_ci __kernel_sa_family_t ss_family; /* address family */ 2062306a36Sopenharmony_ci /* Following field(s) are implementation specific */ 2162306a36Sopenharmony_ci char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; 2262306a36Sopenharmony_ci /* space to achieve desired size, */ 2362306a36Sopenharmony_ci /* _SS_MAXSIZE value minus size of ss_family */ 2462306a36Sopenharmony_ci }; 2562306a36Sopenharmony_ci void *__align; /* implementation specific desired alignment */ 2662306a36Sopenharmony_ci }; 2762306a36Sopenharmony_ci}; 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#define SOCK_SNDBUF_LOCK 1 3062306a36Sopenharmony_ci#define SOCK_RCVBUF_LOCK 2 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK) 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#define SOCK_TXREHASH_DEFAULT 255 3562306a36Sopenharmony_ci#define SOCK_TXREHASH_DISABLED 0 3662306a36Sopenharmony_ci#define SOCK_TXREHASH_ENABLED 1 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#endif /* _UAPI_LINUX_SOCKET_H */ 39