1*0d76751fSJames Chapman /* 2*0d76751fSJames Chapman * L2TP-over-IP socket for L2TPv3. 3*0d76751fSJames Chapman * 4*0d76751fSJames Chapman * Author: James Chapman <jchapman@katalix.com> 5*0d76751fSJames Chapman */ 6*0d76751fSJames Chapman 7*0d76751fSJames Chapman #ifndef _LINUX_L2TP_H_ 8*0d76751fSJames Chapman #define _LINUX_L2TP_H_ 9*0d76751fSJames Chapman 10*0d76751fSJames Chapman #include <linux/types.h> 11*0d76751fSJames Chapman #ifdef __KERNEL__ 12*0d76751fSJames Chapman #include <linux/socket.h> 13*0d76751fSJames Chapman #include <linux/in.h> 14*0d76751fSJames Chapman #endif 15*0d76751fSJames Chapman 16*0d76751fSJames Chapman #define IPPROTO_L2TP 115 17*0d76751fSJames Chapman 18*0d76751fSJames Chapman /** 19*0d76751fSJames Chapman * struct sockaddr_l2tpip - the sockaddr structure for L2TP-over-IP sockets 20*0d76751fSJames Chapman * @l2tp_family: address family number AF_L2TPIP. 21*0d76751fSJames Chapman * @l2tp_addr: protocol specific address information 22*0d76751fSJames Chapman * @l2tp_conn_id: connection id of tunnel 23*0d76751fSJames Chapman */ 24*0d76751fSJames Chapman struct sockaddr_l2tpip { 25*0d76751fSJames Chapman /* The first fields must match struct sockaddr_in */ 26*0d76751fSJames Chapman sa_family_t l2tp_family; /* AF_INET */ 27*0d76751fSJames Chapman __be16 l2tp_unused; /* INET port number (unused) */ 28*0d76751fSJames Chapman struct in_addr l2tp_addr; /* Internet address */ 29*0d76751fSJames Chapman 30*0d76751fSJames Chapman __u32 l2tp_conn_id; /* Connection ID of tunnel */ 31*0d76751fSJames Chapman 32*0d76751fSJames Chapman /* Pad to size of `struct sockaddr'. */ 33*0d76751fSJames Chapman unsigned char __pad[sizeof(struct sockaddr) - sizeof(sa_family_t) - 34*0d76751fSJames Chapman sizeof(__be16) - sizeof(struct in_addr) - 35*0d76751fSJames Chapman sizeof(__u32)]; 36*0d76751fSJames Chapman }; 37*0d76751fSJames Chapman 38*0d76751fSJames Chapman #endif 39