diff options
author | glebius <glebius@FreeBSD.org> | 2004-07-29 18:18:26 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2004-07-29 18:18:26 +0000 |
commit | cfbec087464258ecfd2125af2d71e7dc96a1a6f7 (patch) | |
tree | 224a2b9c887a7d84b0cd9ed7e77dc0d8a2e66e3d | |
parent | 10a0e8305d6319f75f4801ac6259f6d415cf8446 (diff) | |
download | FreeBSD-src-cfbec087464258ecfd2125af2d71e7dc96a1a6f7.zip FreeBSD-src-cfbec087464258ecfd2125af2d71e7dc96a1a6f7.tar.gz |
Document new control messages NGM_PPPOE_GETMODE, NGM_PPPOE_SETMODE.
Note that sysctl net.graph.nonstandard_pppoe is deprecated.
Approved by: julian (mentor)
-rw-r--r-- | share/man/man4/ng_pppoe.4 | 68 |
1 files changed, 49 insertions, 19 deletions
diff --git a/share/man/man4/ng_pppoe.4 b/share/man/man4/ng_pppoe.4 index b4f3694..c827111 100644 --- a/share/man/man4/ng_pppoe.4 +++ b/share/man/man4/ng_pppoe.4 @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" -.Dd October 28, 1999 +.Dd July 27, 2004 .Dt NG_PPPOE 4 .Os .Sh NAME @@ -168,7 +168,6 @@ will be received at closure instead. .It Dv NGM_PPPOE_ACNAME This command is sent to the node that started this session with one of the above messages, and reports the Access Concentrator Name. -.El .Pp The four commands above use a common data structure: .Bd -literal -offset 4n @@ -176,6 +175,34 @@ struct ngpppoe_sts { char hook[NG_HOOKSIZ]; /* hook associated with event session */ }; .Ed +.It Dv NGM_PPPOE_GETMODE +The +.Nm +node can operate in two different modes: +standard mode described in RFC 2516, and in a non-standard mode compatible +with equipment from 3Com. +When +.Nm +is a client node, it initiates session using the configured mode. +In server mode +.Nm +supports both modes simultaneously. +This message returns current configured mode as a char string. +.Tn ASCII +form of this message is +.Qq pppoe_getmode . +.It Dv NGM_PPPOE_SETMODE +Configure node to the specified mode. +The char string argument required. +.Tn ASCII +form os this message is +.Qq pppoe_setmode . +For example this command will configure the node to initiate +the next session in proprietary 3Com mode: +.Bd -literal -offset 4n + ngctl msg fxp0:orphans pppoe_setmode "3Com" +.Ed +.El .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN @@ -185,23 +212,12 @@ hook is disconnected. .Sh SYSCTL VARIABLES The variable .Va net.graph.nonstandard_pppoe -controls certain aspects of +is a deprecated way to set .Nm -operation. -Its default value of \-1 corresponds to standard mode -and should suit nearly all purposes. -A value of 1 will turn on compatibility with some particularly -broken PPPoE implementations using nonstandard "ethertypes" -in PPPoE packets. -When in this mode, your PPPoE node will be unable to communicate -with standard nodes. -A value of 0 is deprecated. -It was intended to turn on autodetection of the proper mode. -.Bf -emphasis -It will make your entire PPPoE network vulnerable -to a denial-of-service attack, -therefore its use is strongly discouraged. -.Ef +client mode. +Consider using +.Dv NGM_PPPOE_SETMODE +or option in your client software instead. .Sh EXAMPLES The following code uses .Dv libnetgraph @@ -396,6 +412,19 @@ setup(char *ethername, char *service, char *sessname, NGM_CONNECT, &ngc, sizeof(ngc)) < 0) { return (errno); } + +#ifdef NONSTANDARD + /* + * In some cases we are speaking to 3Com hardware, so + * configure node to non-standard mode. + */ + if (NgSendMsg(*cfd, ngc.path, NGM_PPPOE_COOKIE, + NGM_PPPOE_SETMODE, NG_PPPOE_NONSTANDARD, + strlen(NG_PPPOE_NONSTANDARD) + 1) == -1) { + return (errno); + } +#endif + /* * Send it a message telling it to start up. */ @@ -423,7 +452,8 @@ setup(char *ethername, char *service, char *sessname, .Xr netgraph 4 , .Xr ng_ppp 4 , .Xr ng_socket 4 , -.Xr ngctl 8 +.Xr ngctl 8 , +.Xr ppp 8 .Rs .%A L. Mamakos .%A K. Lidl |