diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/linux/l2tp.h | |
parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/linux/l2tp.h')
-rw-r--r-- | include/linux/l2tp.h | 172 |
1 files changed, 1 insertions, 171 deletions
diff --git a/include/linux/l2tp.h b/include/linux/l2tp.h index 7eab668f60f..bffdb962f1a 100644 --- a/include/linux/l2tp.h +++ b/include/linux/l2tp.h @@ -3,181 +3,11 @@ * * Author: James Chapman <jchapman@katalix.com> */ - #ifndef _LINUX_L2TP_H_ #define _LINUX_L2TP_H_ -#include <linux/types.h> -#include <linux/socket.h> -#ifdef __KERNEL__ #include <linux/in.h> #include <linux/in6.h> -#else -#include <netinet/in.h> -#endif - -#define IPPROTO_L2TP 115 - -/** - * struct sockaddr_l2tpip - the sockaddr structure for L2TP-over-IP sockets - * @l2tp_family: address family number AF_L2TPIP. - * @l2tp_addr: protocol specific address information - * @l2tp_conn_id: connection id of tunnel - */ -#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ -struct sockaddr_l2tpip { - /* The first fields must match struct sockaddr_in */ - __kernel_sa_family_t l2tp_family; /* AF_INET */ - __be16 l2tp_unused; /* INET port number (unused) */ - struct in_addr l2tp_addr; /* Internet address */ - - __u32 l2tp_conn_id; /* Connection ID of tunnel */ - - /* Pad to size of `struct sockaddr'. */ - unsigned char __pad[sizeof(struct sockaddr) - - sizeof(__kernel_sa_family_t) - - sizeof(__be16) - sizeof(struct in_addr) - - sizeof(__u32)]; -}; - -/** - * struct sockaddr_l2tpip6 - the sockaddr structure for L2TP-over-IPv6 sockets - * @l2tp_family: address family number AF_L2TPIP. - * @l2tp_addr: protocol specific address information - * @l2tp_conn_id: connection id of tunnel - */ -struct sockaddr_l2tpip6 { - /* The first fields must match struct sockaddr_in6 */ - __kernel_sa_family_t l2tp_family; /* AF_INET6 */ - __be16 l2tp_unused; /* INET port number (unused) */ - __be32 l2tp_flowinfo; /* IPv6 flow information */ - struct in6_addr l2tp_addr; /* IPv6 address */ - __u32 l2tp_scope_id; /* scope id (new in RFC2553) */ - __u32 l2tp_conn_id; /* Connection ID of tunnel */ -}; - -/***************************************************************************** - * NETLINK_GENERIC netlink family. - *****************************************************************************/ - -/* - * Commands. - * Valid TLVs of each command are:- - * TUNNEL_CREATE - CONN_ID, pw_type, netns, ifname, ipinfo, udpinfo, udpcsum, vlanid - * TUNNEL_DELETE - CONN_ID - * TUNNEL_MODIFY - CONN_ID, udpcsum - * TUNNEL_GETSTATS - CONN_ID, (stats) - * TUNNEL_GET - CONN_ID, (...) - * SESSION_CREATE - SESSION_ID, PW_TYPE, offset, data_seq, cookie, peer_cookie, offset, l2spec - * SESSION_DELETE - SESSION_ID - * SESSION_MODIFY - SESSION_ID, data_seq - * SESSION_GET - SESSION_ID, (...) - * SESSION_GETSTATS - SESSION_ID, (stats) - * - */ -enum { - L2TP_CMD_NOOP, - L2TP_CMD_TUNNEL_CREATE, - L2TP_CMD_TUNNEL_DELETE, - L2TP_CMD_TUNNEL_MODIFY, - L2TP_CMD_TUNNEL_GET, - L2TP_CMD_SESSION_CREATE, - L2TP_CMD_SESSION_DELETE, - L2TP_CMD_SESSION_MODIFY, - L2TP_CMD_SESSION_GET, - __L2TP_CMD_MAX, -}; - -#define L2TP_CMD_MAX (__L2TP_CMD_MAX - 1) - -/* - * ATTR types defined for L2TP - */ -enum { - L2TP_ATTR_NONE, /* no data */ - L2TP_ATTR_PW_TYPE, /* u16, enum l2tp_pwtype */ - L2TP_ATTR_ENCAP_TYPE, /* u16, enum l2tp_encap_type */ - L2TP_ATTR_OFFSET, /* u16 */ - L2TP_ATTR_DATA_SEQ, /* u16 */ - L2TP_ATTR_L2SPEC_TYPE, /* u8, enum l2tp_l2spec_type */ - L2TP_ATTR_L2SPEC_LEN, /* u8, enum l2tp_l2spec_type */ - L2TP_ATTR_PROTO_VERSION, /* u8 */ - L2TP_ATTR_IFNAME, /* string */ - L2TP_ATTR_CONN_ID, /* u32 */ - L2TP_ATTR_PEER_CONN_ID, /* u32 */ - L2TP_ATTR_SESSION_ID, /* u32 */ - L2TP_ATTR_PEER_SESSION_ID, /* u32 */ - L2TP_ATTR_UDP_CSUM, /* u8 */ - 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_RECV_SEQ, /* u8 */ - L2TP_ATTR_SEND_SEQ, /* u8 */ - L2TP_ATTR_LNS_MODE, /* u8 */ - L2TP_ATTR_USING_IPSEC, /* u8 */ - L2TP_ATTR_RECV_TIMEOUT, /* msec */ - L2TP_ATTR_FD, /* int */ - L2TP_ATTR_IP_SADDR, /* u32 */ - L2TP_ATTR_IP_DADDR, /* u32 */ - L2TP_ATTR_UDP_SPORT, /* u16 */ - L2TP_ATTR_UDP_DPORT, /* u16 */ - L2TP_ATTR_MTU, /* u16 */ - L2TP_ATTR_MRU, /* u16 */ - L2TP_ATTR_STATS, /* nested */ - L2TP_ATTR_IP6_SADDR, /* struct in6_addr */ - L2TP_ATTR_IP6_DADDR, /* struct in6_addr */ - __L2TP_ATTR_MAX, -}; - -#define L2TP_ATTR_MAX (__L2TP_ATTR_MAX - 1) - -/* Nested in L2TP_ATTR_STATS */ -enum { - L2TP_ATTR_STATS_NONE, /* no data */ - L2TP_ATTR_TX_PACKETS, /* u64 */ - L2TP_ATTR_TX_BYTES, /* u64 */ - L2TP_ATTR_TX_ERRORS, /* u64 */ - L2TP_ATTR_RX_PACKETS, /* u64 */ - L2TP_ATTR_RX_BYTES, /* u64 */ - L2TP_ATTR_RX_SEQ_DISCARDS, /* u64 */ - L2TP_ATTR_RX_OOS_PACKETS, /* u64 */ - L2TP_ATTR_RX_ERRORS, /* u64 */ - __L2TP_ATTR_STATS_MAX, -}; - -#define L2TP_ATTR_STATS_MAX (__L2TP_ATTR_STATS_MAX - 1) - -enum l2tp_pwtype { - L2TP_PWTYPE_NONE = 0x0000, - L2TP_PWTYPE_ETH_VLAN = 0x0004, - L2TP_PWTYPE_ETH = 0x0005, - L2TP_PWTYPE_PPP = 0x0007, - L2TP_PWTYPE_PPP_AC = 0x0008, - L2TP_PWTYPE_IP = 0x000b, - __L2TP_PWTYPE_MAX -}; - -enum l2tp_l2spec_type { - L2TP_L2SPECTYPE_NONE, - L2TP_L2SPECTYPE_DEFAULT, -}; - -enum l2tp_encap_type { - L2TP_ENCAPTYPE_UDP, - L2TP_ENCAPTYPE_IP, -}; - -enum l2tp_seqmode { - L2TP_SEQ_NONE = 0, - L2TP_SEQ_IP = 1, - L2TP_SEQ_ALL = 2, -}; - -/* - * NETLINK_GENERIC related info - */ -#define L2TP_GENL_NAME "l2tp" -#define L2TP_GENL_VERSION 0x1 +#include <uapi/linux/l2tp.h> #endif |