Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: l2tp: export debug flags to UAPI

Move the L2TP_MSG_* definitions to UAPI, as it is part of
the netlink API.

Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.st>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Asbjørn Sloth Tønnesen and committed by
David S. Miller
41c43fbe 0972770e

+16 -11
+16 -1
include/uapi/linux/l2tp.h
··· 108 108 L2TP_ATTR_VLAN_ID, /* u16 */ 109 109 L2TP_ATTR_COOKIE, /* 0, 4 or 8 bytes */ 110 110 L2TP_ATTR_PEER_COOKIE, /* 0, 4 or 8 bytes */ 111 - L2TP_ATTR_DEBUG, /* u32 */ 111 + L2TP_ATTR_DEBUG, /* u32, enum l2tp_debug_flags */ 112 112 L2TP_ATTR_RECV_SEQ, /* u8 */ 113 113 L2TP_ATTR_SEND_SEQ, /* u8 */ 114 114 L2TP_ATTR_LNS_MODE, /* u8 */ ··· 173 173 L2TP_SEQ_NONE = 0, 174 174 L2TP_SEQ_IP = 1, 175 175 L2TP_SEQ_ALL = 2, 176 + }; 177 + 178 + /** 179 + * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions 180 + * 181 + * @L2TP_MSG_DEBUG: verbose debug (if compiled in) 182 + * @L2TP_MSG_CONTROL: userspace - kernel interface 183 + * @L2TP_MSG_SEQ: sequence numbers 184 + * @L2TP_MSG_DATA: data packets 185 + */ 186 + enum l2tp_debug_flags { 187 + L2TP_MSG_DEBUG = (1 << 0), 188 + L2TP_MSG_CONTROL = (1 << 1), 189 + L2TP_MSG_SEQ = (1 << 2), 190 + L2TP_MSG_DATA = (1 << 3), 176 191 }; 177 192 178 193 /*
-10
net/l2tp/l2tp_core.h
··· 23 23 #define L2TP_HASH_BITS_2 8 24 24 #define L2TP_HASH_SIZE_2 (1 << L2TP_HASH_BITS_2) 25 25 26 - /* Debug message categories for the DEBUG socket option */ 27 - enum { 28 - L2TP_MSG_DEBUG = (1 << 0), /* verbose debug (if 29 - * compiled in) */ 30 - L2TP_MSG_CONTROL = (1 << 1), /* userspace - kernel 31 - * interface */ 32 - L2TP_MSG_SEQ = (1 << 2), /* sequence numbers */ 33 - L2TP_MSG_DATA = (1 << 3), /* data packets */ 34 - }; 35 - 36 26 struct sk_buff; 37 27 38 28 struct l2tp_stats {