Skip to content

Commit

Permalink
net: l2tp: export debug flags to UAPI
Browse files Browse the repository at this point in the history
Move the L2TP_MSG_* definitions to UAPI, as it is part of
the netlink API.

Signed-off-by: Asbjoern Sloth Toennesen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
asbjornst authored and davem330 committed Dec 11, 2016
1 parent 0972770 commit 41c43fb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
17 changes: 16 additions & 1 deletion include/uapi/linux/l2tp.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ enum {
L2TP_ATTR_VLAN_ID, /* u16 */
L2TP_ATTR_COOKIE, /* 0, 4 or 8 bytes */
L2TP_ATTR_PEER_COOKIE, /* 0, 4 or 8 bytes */
L2TP_ATTR_DEBUG, /* u32 */
L2TP_ATTR_DEBUG, /* u32, enum l2tp_debug_flags */
L2TP_ATTR_RECV_SEQ, /* u8 */
L2TP_ATTR_SEND_SEQ, /* u8 */
L2TP_ATTR_LNS_MODE, /* u8 */
Expand Down Expand Up @@ -175,6 +175,21 @@ enum l2tp_seqmode {
L2TP_SEQ_ALL = 2,
};

/**
* enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions
*
* @L2TP_MSG_DEBUG: verbose debug (if compiled in)
* @L2TP_MSG_CONTROL: userspace - kernel interface
* @L2TP_MSG_SEQ: sequence numbers
* @L2TP_MSG_DATA: data packets
*/
enum l2tp_debug_flags {
L2TP_MSG_DEBUG = (1 << 0),
L2TP_MSG_CONTROL = (1 << 1),
L2TP_MSG_SEQ = (1 << 2),
L2TP_MSG_DATA = (1 << 3),
};

/*
* NETLINK_GENERIC related info
*/
Expand Down
10 changes: 0 additions & 10 deletions net/l2tp/l2tp_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
#define L2TP_HASH_BITS_2 8
#define L2TP_HASH_SIZE_2 (1 << L2TP_HASH_BITS_2)

/* Debug message categories for the DEBUG socket option */
enum {
L2TP_MSG_DEBUG = (1 << 0), /* verbose debug (if
* compiled in) */
L2TP_MSG_CONTROL = (1 << 1), /* userspace - kernel
* interface */
L2TP_MSG_SEQ = (1 << 2), /* sequence numbers */
L2TP_MSG_DATA = (1 << 3), /* data packets */
};

struct sk_buff;

struct l2tp_stats {
Expand Down

0 comments on commit 41c43fb

Please sign in to comment.