diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/if_pppopns.h | 32 | ||||
| -rw-r--r-- | include/linux/if_pppox.h | 7 | ||||
| -rw-r--r-- | include/uapi/linux/if_pppox.h | 4 | 
3 files changed, 42 insertions, 1 deletions
diff --git a/include/linux/if_pppopns.h b/include/linux/if_pppopns.h new file mode 100644 index 00000000000..0cf34b4d551 --- /dev/null +++ b/include/linux/if_pppopns.h @@ -0,0 +1,32 @@ +/* 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 <chiachi@android.com> + * + * 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 <linux/socket.h> +#include <linux/types.h> + +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 28be91e3040..e53107fdf85 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h @@ -49,6 +49,12 @@ struct pppolac_opt {  	__u8	sequencing;  }; +struct pppopns_opt { +	__u16	local; +	__u16	remote; +	__u32	sequence; +}; +  #include <net/sock.h>  struct pppox_sock { @@ -60,6 +66,7 @@ struct pppox_sock {  		struct pppoe_opt pppoe;  		struct pptp_opt  pptp;  		struct pppolac_opt lac; +		struct pppopns_opt pns;  	} proto;  	__be16			num;  }; diff --git a/include/uapi/linux/if_pppox.h b/include/uapi/linux/if_pppox.h index 731ee1eb3eb..772cf0841e9 100644 --- a/include/uapi/linux/if_pppox.h +++ b/include/uapi/linux/if_pppox.h @@ -24,6 +24,7 @@  #include <linux/if_ether.h>  #include <linux/if_pppol2tp.h>  #include <linux/if_pppolac.h> +#include <linux/if_pppopns.h>  /* For user-space programs to pick up these definitions   * which they wouldn't get otherwise without defining __KERNEL__ @@ -58,7 +59,8 @@ struct pptp_addr {  #define PX_PROTO_OL2TP 1 /* Now L2TP also */  #define PX_PROTO_PPTP  2  #define PX_PROTO_OLAC  3 -#define PX_MAX_PROTO   4 +#define PX_PROTO_OPNS  4 +#define PX_MAX_PROTO   5  struct sockaddr_pppox {  	__kernel_sa_family_t sa_family;       /* address family, AF_PPPOX */  |