--- zzzz-none-000/linux-2.6.39.4/include/linux/l2tp.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/include/linux/l2tp.h 2021-11-10 13:38:17.000000000 +0000 @@ -8,9 +8,10 @@ #define _LINUX_L2TP_H_ #include -#ifdef __KERNEL__ #include +#ifdef __KERNEL__ #include +#include #else #include #endif @@ -33,11 +34,28 @@ __u32 l2tp_conn_id; /* Connection ID of tunnel */ /* Pad to size of `struct sockaddr'. */ - unsigned char __pad[sizeof(struct sockaddr) - sizeof(sa_family_t) - + unsigned char __pad[sizeof(struct sockaddr) - + sizeof(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 */ + 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. *****************************************************************************/ @@ -107,6 +125,8 @@ 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, }; @@ -160,4 +180,4 @@ #define L2TP_GENL_NAME "l2tp" #define L2TP_GENL_VERSION 0x1 -#endif +#endif /* _LINUX_L2TP_H_ */