diff options
author | Chia-chi Yeh <chiachi@android.com> | 2009-05-08 04:02:40 +0800 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2010-02-08 15:09:14 -0800 |
commit | dbdb1c32784d0145fe545410e9771070e5dc702b (patch) | |
tree | 13b28152d072cd3594729d3aae56ddc7364150a3 /include | |
parent | 5038d42d2e60c855cf5b097197d95adaa1269d32 (diff) |
net: add PPP on L2TP Access Concentrator (PPPoLAC) driver.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_pppolac.h | 35 | ||||
-rw-r--r-- | include/linux/if_pppox.h | 12 |
2 files changed, 46 insertions, 1 deletions
diff --git a/include/linux/if_pppolac.h b/include/linux/if_pppolac.h new file mode 100644 index 000000000000..8d827ea66425 --- /dev/null +++ b/include/linux/if_pppolac.h @@ -0,0 +1,35 @@ +/* include/linux/if_pppolac.h + * + * Header for PPP on L2TP Access Concentrator / PPPoLAC Socket (RFC 2661) + * + * 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_PPPOLAC_H +#define __LINUX_IF_PPPOLAC_H + +#include <linux/socket.h> +#include <linux/types.h> + +#define PX_PROTO_OLAC 2 + +struct sockaddr_pppolac { + sa_family_t sa_family; /* AF_PPPOX */ + unsigned int sa_protocol; /* PX_PROTO_OLAC */ + int udp_socket; + struct __attribute__((packed)) { + __u16 tunnel, session; + } local, remote; +} __attribute__((packed)); + +#endif /* __LINUX_IF_PPPOLAC_H */ diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 90b5fae5d714..7ef2c0a89cdf 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h @@ -27,6 +27,7 @@ #include <linux/ppp_channel.h> #endif /* __KERNEL__ */ #include <linux/if_pppol2tp.h> +#include <linux/if_pppolac.h> /* For user-space programs to pick up these definitions * which they wouldn't get otherwise without defining __KERNEL__ @@ -51,7 +52,8 @@ struct pppoe_addr{ */ #define PX_PROTO_OE 0 /* Currently just PPPoE */ #define PX_PROTO_OL2TP 1 /* Now L2TP also */ -#define PX_MAX_PROTO 2 +#define PX_PROTO_OLAC 2 +#define PX_MAX_PROTO 3 struct sockaddr_pppox { sa_family_t sa_family; /* address family, AF_PPPOX */ @@ -141,6 +143,13 @@ struct pppoe_opt { relayed to (PPPoE relaying) */ }; +struct pppolac_opt { + __u32 local; + __u32 remote; + __u16 sequence; + __u8 sequencing; +}; + #include <net/sock.h> struct pppox_sock { @@ -150,6 +159,7 @@ struct pppox_sock { struct pppox_sock *next; /* for hash table */ union { struct pppoe_opt pppoe; + struct pppolac_opt lac; } proto; __be16 num; }; |