chiark / gitweb /
missing.h: add vxlan netlink properties
[elogind.git] / src / basic / missing.h
index 50c9e7cd8870f0d6f6b0aa94b2f859fdffef7df6..0d71a57c8a2ca38691c4c7d823d7ad7f36547c1a 100644 (file)
@@ -34,6 +34,7 @@
 #include <net/ethernet.h>
 #include <stdlib.h>
 #include <sys/resource.h>
+#include <sys/socket.h>
 #include <sys/syscall.h>
 #include <uchar.h>
 #include <unistd.h>
 #include <linux/btrfs.h>
 #endif
 
+#if 0 /// UNNEEDED by elogind
+#ifdef HAVE_LINUX_VM_SOCKETS_H
+#include <linux/vm_sockets.h>
+#else
+#define VMADDR_CID_ANY -1U
+struct sockaddr_vm {
+        unsigned short svm_family;
+        unsigned short svm_reserved1;
+        unsigned int svm_port;
+        unsigned int svm_cid;
+        unsigned char svm_zero[sizeof(struct sockaddr) -
+                               sizeof(unsigned short) -
+                               sizeof(unsigned short) -
+                               sizeof(unsigned int) -
+                               sizeof(unsigned int)];
+};
+#endif /* !HAVE_LINUX_VM_SOCKETS_H */
+#endif // 0
+
 #include "macro.h"
 
 #ifndef RLIMIT_RTTIME
@@ -713,7 +733,7 @@ struct btrfs_ioctl_quota_ctl_args {
 #define IFLA_VLAN_MAX   (__IFLA_VLAN_MAX - 1)
 #endif
 
-#if !HAVE_DECL_IFLA_VXLAN_REMCSUM_NOPARTIAL
+#if !HAVE_DECL_IFLA_VXLAN_GPE
 #define IFLA_VXLAN_UNSPEC 0
 #define IFLA_VXLAN_ID 1
 #define IFLA_VXLAN_GROUP 2
@@ -739,7 +759,11 @@ struct btrfs_ioctl_quota_ctl_args {
 #define IFLA_VXLAN_REMCSUM_RX 22
 #define IFLA_VXLAN_GBP 23
 #define IFLA_VXLAN_REMCSUM_NOPARTIAL 24
-#define __IFLA_VXLAN_MAX 25
+#define IFLA_VXLAN_COLLECT_METADATA 25
+#define IFLA_VXLAN_LABEL 26
+#define IFLA_VXLAN_GPE 27
+
+#define __IFLA_VXLAN_MAX 28
 
 #define IFLA_VXLAN_MAX  (__IFLA_VXLAN_MAX - 1)
 #endif
@@ -1033,7 +1057,6 @@ struct btrfs_ioctl_quota_ctl_args {
 typedef int32_t key_serial_t;
 #endif
 
-#if 0 /// UNNEEDED by elogind
 #ifndef KEYCTL_JOIN_SESSION_KEYRING
 #define KEYCTL_JOIN_SESSION_KEYRING 1
 #endif
@@ -1091,7 +1114,6 @@ typedef int32_t key_serial_t;
 #ifndef KEY_SPEC_USER_KEYRING
 #define KEY_SPEC_USER_KEYRING -4
 #endif
-#endif // 0
 
 #ifndef KEY_SPEC_SESSION_KEYRING
 #define KEY_SPEC_SESSION_KEYRING -3
@@ -1139,6 +1161,7 @@ typedef int32_t key_serial_t;
 #define IFA_F_MCAUTOJOIN 0x400
 #endif
 
+#if 0 /// UNNEEDED by elogind
 #ifndef HAVE_STRUCT_ETHTOOL_LINK_SETTINGS
 
 #define ETHTOOL_GLINKSETTINGS   0x0000004c /* Get ethtool_link_settings */
@@ -1165,6 +1188,7 @@ struct ethtool_link_settings {
 };
 
 #endif
+#endif // 0
 
 #endif
 
@@ -1172,4 +1196,8 @@ struct ethtool_link_settings {
 #define SOL_ALG 279
 #endif
 
+#ifndef AF_VSOCK
+#define AF_VSOCK 40
+#endif
+
 #include "missing_syscall.h"