From 07b6c47bf3506b1d17f7c5d0a4996c64403ffe9d Mon Sep 17 00:00:00 2001 From: YASUOKA Masahiko Date: Mon, 11 Jan 2010 03:50:57 +0000 Subject: Initial import PIPEX. PIPEX(Pppac IP EXtension) is a IP forwarding acceleration for PPP access concentrator. ok mcbride@ dlg@ deraadt@ reyk@. --- sys/net/if_ethersubr.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'sys/net/if_ethersubr.c') diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 1cdb60d0287..595355fba0d 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.136 2009/11/03 10:59:04 claudio Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.137 2010/01/11 03:50:56 yasuoka Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -147,6 +147,10 @@ didn't get a copy, you may request one from . #include #endif +#ifdef PIPEX +#include +#endif + #ifdef NETATALK #include #include @@ -736,7 +740,7 @@ decapsulate: aarpinput((struct arpcom *)ifp, m); goto done; #endif -#if NPPPOE > 0 +#if NPPPOE > 0 || defined(PIPEX) case ETHERTYPE_PPPOEDISC: case ETHERTYPE_PPPOE: /* XXX we dont have this flag */ @@ -758,7 +762,16 @@ decapsulate: eh_tmp = mtod(m, struct ether_header *); bcopy(eh, eh_tmp, sizeof(struct ether_header)); +#ifdef PIPEX + { + struct pipex_session *session; + if ((session = pipex_pppoe_lookup_session(m)) != NULL) { + pipex_pppoe_input(m, session); + return; + } + } +#endif if (etype == ETHERTYPE_PPPOEDISC) inq = &pppoediscinq; else @@ -766,7 +779,7 @@ decapsulate: schednetisr(NETISR_PPPOE); break; -#endif /* NPPPOE > 0 */ +#endif /* NPPPOE > 0 || defined(PIPEX) */ #ifdef AOE case ETHERTYPE_AOE: aoe_input(ifp, m); -- cgit v1.2.3