]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/missing_socket.h
blockdev-util: add correct API for detecting if block device has partition scanning...
[thirdparty/systemd.git] / src / basic / missing_socket.h
CommitLineData
66ffbdf9
YW
1/* SPDX-License-Identifier: LGPL-2.1+ */
2#pragma once
3
4#include <sys/socket.h>
5
6#if HAVE_LINUX_VM_SOCKETS_H
7#include <linux/vm_sockets.h>
8#else
9#define VMADDR_CID_ANY -1U
10struct sockaddr_vm {
11 unsigned short svm_family;
12 unsigned short svm_reserved1;
13 unsigned int svm_port;
14 unsigned int svm_cid;
15 unsigned char svm_zero[sizeof(struct sockaddr) -
16 sizeof(unsigned short) -
17 sizeof(unsigned short) -
18 sizeof(unsigned int) -
19 sizeof(unsigned int)];
20};
21#endif /* !HAVE_LINUX_VM_SOCKETS_H */
22
23#ifndef AF_VSOCK
24#define AF_VSOCK 40
25#endif
26
27#ifndef SO_REUSEPORT
28#define SO_REUSEPORT 15
29#endif
30
31#ifndef SO_PEERGROUPS
32#define SO_PEERGROUPS 59
33#endif
34
5d594d01
LP
35#ifndef SO_BINDTOIFINDEX
36#define SO_BINDTOIFINDEX 62
37#endif
38
66ffbdf9
YW
39#ifndef SOL_NETLINK
40#define SOL_NETLINK 270
41#endif
42
43#ifndef SOL_ALG
44#define SOL_ALG 279
45#endif
46
47/* Not exposed yet. Defined in include/linux/socket.h. */
48#ifndef SOL_SCTP
49#define SOL_SCTP 132
50#endif
51
52/* Not exposed yet. Defined in include/linux/socket.h */
53#ifndef SCM_SECURITY
54#define SCM_SECURITY 0x03
55#endif
56
57/* netinet/in.h */
58#ifndef IP_FREEBIND
59#define IP_FREEBIND 15
60#endif
61
62#ifndef IP_TRANSPARENT
63#define IP_TRANSPARENT 19
64#endif
f6dbcebd
LP
65
66/* linux/sockios.h */
67#ifndef SIOCGSKNS
68#define SIOCGSKNS 0x894C
69#endif