Merge tag 'kvmarm-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmar...
[linux-block.git] / include / uapi / linux / socket.h
CommitLineData
6f52b16c 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
607ca46e
DH
2#ifndef _UAPI_LINUX_SOCKET_H
3#define _UAPI_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 */
607ca46e
DH
9
10typedef unsigned short __kernel_sa_family_t;
11
5e5412c3
QC
12/*
13 * The definition uses anonymous union and struct in order to control the
14 * default alignment.
15 */
607ca46e 16struct __kernel_sockaddr_storage {
5e5412c3
QC
17 union {
18 struct {
19 __kernel_sa_family_t ss_family; /* address family */
20 /* Following field(s) are implementation specific */
21 char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
607ca46e
DH
22 /* space to achieve desired size, */
23 /* _SS_MAXSIZE value minus size of ss_family */
5e5412c3
QC
24 };
25 void *__align; /* implementation specific desired alignment */
26 };
27};
607ca46e 28
04190bf8
PT
29#define SOCK_SNDBUF_LOCK 1
30#define SOCK_RCVBUF_LOCK 2
31
32#define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
33
8d3398ba 34#define SOCK_TXREHASH_DEFAULT 255
e187013a
AK
35#define SOCK_TXREHASH_DISABLED 0
36#define SOCK_TXREHASH_ENABLED 1
37
607ca46e 38#endif /* _UAPI_LINUX_SOCKET_H */