1.\"- 2.\" Copyright (c) 1999 Brian Somers <brian@Awfulhak.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd November 8, 1999 29.Dt PPPOED 8 30.Os FreeBSD 31.Sh NAME 32.Nm pppoed 33.Nd handle incoming PPP over Ethernet connections 34.Sh SYNOPSIS 35.Nm pppoed 36.Op Fl Fd 37.Op Fl P Ar pidfile 38.Op Fl a Ar name 39.Op Fl e Ar exec 40.Op Fl p Ar provider 41.Ar interface 42.Sh DESCRIPTION 43The 44.Nm 45program listens to the given 46.Ar interface 47for PPP over Ethernet (PPPoE) service request packets, and actions them 48by negotiating a session then envoking a 49.Em PPP 50program. The negotiation is implemented by the 51.Dq pppoe 52netgraph node. See 53.Xr ng_pppoe 8 54for details. 55.Pp 56.Nm 57will only offer services to clients requesting services from the given 58.Ar provider , 59which is taken as an empty name if not provided. 60If a provider name of 61.Dq \&* 62is given, any PPPoE requests will be offered service. 63.Pp 64The supplied 65.Ar name 66will be given as the access concentrator name when establishing the 67connection. If no 68.Ar name 69is given, the current base hostname is used. 70.Pp 71After receiving a request (PADI) from the PPPoE netgraph node, 72.Nm 73.Xr fork 2 Ns No s 74a child process and returns to service further requests. The child process 75offers service 76.Pq using Ar name 77and waits for a 78.Dv SUCCESS 79indication from the PPPoE node. On receipt of the SUCCESS indication, 80.Nm 81will execute 82.Pp 83.D1 Ic exec /usr/sbin/ppp -direct Ar provider 84.Pp 85as a shell sub-process. It is possible to specify another command using the 86.Ar exec 87argument. This is mandatory if 88.Ar provider 89is not given. The child process will have standard input and standard output 90attached to the same 91.Xr netgraph 4 92data socket 93.Pq see Xr ng_socket 8 94when started. 95.Pp 96Upon invocation, 97.Nm 98will attach a 99.Dq pppoe 100netgraph node to the relevant 101.Dq ether 102node using 103.Dq Ar interface Ns No \&: 104as the node name, and then connect that 105.Dq pppoe 106node to a local 107.Dq socket 108node. If the 109.Fl F 110flag has not been given, 111.Nm 112will then go into the background and disassociate itself from the controlling 113terminal. When the 114.Fl F 115flag is given, 116.Nm 117stays in the foreground. 118.Pp 119If the 120.Fl d 121flag is given, additional diagnostics are provided (see the 122.Sx DIAGNOSTICS 123section below). 124.Pp 125If 126.Ar pidfile 127is given, 128.Nm 129will write its process ID to this file on startup. 130.Sh DIAGNOSTICS 131After creating the necessary 132.Xr netgraph 4 133nodes as described above, 134.Nm 135uses 136.Xr syslogd 8 137to report all incoming connections. If the 138.Fl d 139flag is given, 140.Nm 141will report on the child processes creation of a new netgraph socket, it's 142service offer and the invocation of the 143.Em PPP 144program. 145.Pp 146It is sometimes useful to add the following to 147.Pa /etc/syslog.conf : 148.Pp 149.Dl !pppoed 150.Dl *.* /var/log/pppoed.log 151.Pp 152and the following to 153.Pa /etc/newsyslog.conf : 154.Pp 155.Dl /var/log/pppoed.log 640 3 100 * Z 156.Pp 157.Sh SEE ALSO 158.Xr netgraph 4 , 159.Xr syslog.conf 5 , 160.Xr ng_pppoe 8 , 161.Xr ng_socket 8 , 162.Xr ppp 8 , 163.Xr syslogd 8 164.Sh BUGS 165If another netgraph node is using the given interface, 166.Nm 167will fail to start. This is because 168.Xr netgraph 4 169does not currently allow node chaining. This may change in the future. 170.Sh HISTORY 171The 172.Nm 173program was written by 174.An Brian Somers Aq brian@Awfulhak.org 175and first appeared in 176.Fx 3.4 . 177