From c50311620326bf4515e1e5aa4f85bbb816852701 Mon Sep 17 00:00:00 2001 From: Chia-chi Yeh Date: Fri, 12 Jun 2009 01:09:30 +0800 Subject: net: add PPP on PPTP Network Server (PPPoPNS) driver. Signed-off-by: Chia-chi Yeh --- include/linux/if_pppopns.h | 34 ++++++++++++++++++++++++++++++++++ include/linux/if_pppox.h | 11 ++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 include/linux/if_pppopns.h (limited to 'include') diff --git a/include/linux/if_pppopns.h b/include/linux/if_pppopns.h new file mode 100644 index 000000000000..305d4c40459a --- /dev/null +++ b/include/linux/if_pppopns.h @@ -0,0 +1,34 @@ +/* include/linux/if_pppopns.h + * + * Header for PPP on PPTP Network Server / PPPoPNS Socket (RFC 2637) + * + * Copyright (C) 2009 Google, Inc. + * Author: Chia-chi Yeh + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __LINUX_IF_PPPOPNS_H +#define __LINUX_IF_PPPOPNS_H + +#include +#include + +#define PX_PROTO_OPNS 3 + +struct sockaddr_pppopns { + sa_family_t sa_family; /* AF_PPPOX */ + unsigned int sa_protocol; /* PX_PROTO_OPNS */ + int tcp_socket; + __u16 local; + __u16 remote; +} __attribute__((packed)); + +#endif /* __LINUX_IF_PPPOPNS_H */ diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 249cec5ded61..179d67497701 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h @@ -28,6 +28,7 @@ #endif /* __KERNEL__ */ #include #include +#include /* For user-space programs to pick up these definitions * which they wouldn't get otherwise without defining __KERNEL__ @@ -53,7 +54,8 @@ struct pppoe_addr{ #define PX_PROTO_OE 0 /* Currently just PPPoE */ #define PX_PROTO_OL2TP 1 /* Now L2TP also */ #define PX_PROTO_OLAC 2 -#define PX_MAX_PROTO 3 +#define PX_PROTO_OPNS 3 +#define PX_MAX_PROTO 4 struct sockaddr_pppox { sa_family_t sa_family; /* address family, AF_PPPOX */ @@ -150,6 +152,12 @@ struct pppolac_opt { __u8 sequencing; }; +struct pppopns_opt { + __u16 local; + __u16 remote; + __u32 sequence; +}; + #include struct pppox_sock { @@ -160,6 +168,7 @@ struct pppox_sock { union { struct pppoe_opt pppoe; struct pppolac_opt lac; + struct pppopns_opt pns; } proto; __be16 num; }; -- cgit v1.2.3