summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2009-05-08 04:02:40 +0800
committerChia-chi Yeh <chiachi@android.com>2009-05-19 15:35:06 +0800
commitc8706d4199cbbe86f370c55e9b84f94e79101a48 (patch)
tree2118f2f32aa2d7e4ca3a827aed4ce8dd0a48894b /include
parent5e75ec4ffdf380c69818e4ff7df1c2917cb882e8 (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.h35
-rw-r--r--include/linux/if_pppox.h12
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 30c88b2245ff..249cec5ded61 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;
};