1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _WG_UAPI_WIREGUARD_H 20 #define _WG_UAPI_WIREGUARD_H 21 #define WG_GENL_NAME "wireguard" 22 #define WG_GENL_VERSION 1 23 #define WG_KEY_LEN 32 24 enum wg_cmd { 25 WG_CMD_GET_DEVICE, 26 WG_CMD_SET_DEVICE, 27 __WG_CMD_MAX 28 }; 29 #define WG_CMD_MAX (__WG_CMD_MAX - 1) 30 enum wgdevice_flag { 31 WGDEVICE_F_REPLACE_PEERS = 1U << 0, 32 __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS 33 }; 34 enum wgdevice_attribute { 35 WGDEVICE_A_UNSPEC, 36 WGDEVICE_A_IFINDEX, 37 WGDEVICE_A_IFNAME, 38 WGDEVICE_A_PRIVATE_KEY, 39 WGDEVICE_A_PUBLIC_KEY, 40 WGDEVICE_A_FLAGS, 41 WGDEVICE_A_LISTEN_PORT, 42 WGDEVICE_A_FWMARK, 43 WGDEVICE_A_PEERS, 44 __WGDEVICE_A_LAST 45 }; 46 #define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1) 47 enum wgpeer_flag { 48 WGPEER_F_REMOVE_ME = 1U << 0, 49 WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1, 50 WGPEER_F_UPDATE_ONLY = 1U << 2, 51 __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS | WGPEER_F_UPDATE_ONLY 52 }; 53 enum wgpeer_attribute { 54 WGPEER_A_UNSPEC, 55 WGPEER_A_PUBLIC_KEY, 56 WGPEER_A_PRESHARED_KEY, 57 WGPEER_A_FLAGS, 58 WGPEER_A_ENDPOINT, 59 WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, 60 WGPEER_A_LAST_HANDSHAKE_TIME, 61 WGPEER_A_RX_BYTES, 62 WGPEER_A_TX_BYTES, 63 WGPEER_A_ALLOWEDIPS, 64 WGPEER_A_PROTOCOL_VERSION, 65 __WGPEER_A_LAST 66 }; 67 #define WGPEER_A_MAX (__WGPEER_A_LAST - 1) 68 enum wgallowedip_attribute { 69 WGALLOWEDIP_A_UNSPEC, 70 WGALLOWEDIP_A_FAMILY, 71 WGALLOWEDIP_A_IPADDR, 72 WGALLOWEDIP_A_CIDR_MASK, 73 __WGALLOWEDIP_A_LAST 74 }; 75 #define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1) 76 #endif 77