From owner-man-jp-reviewer@jp.freebsd.org  Tue Dec 14 21:25:14 1999
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id VAA21385;
	Tue, 14 Dec 1999 21:25:14 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from multi.al.rim.or.jp (multi.al.rim.or.jp [202.247.191.124] (may be forged))
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id VAA21380
	for <man-jp-reviewer@jp.freebsd.org>; Tue, 14 Dec 1999 21:25:13 +0900 (JST)
	(envelope-from k-horik@yk.rim.or.jp)
Received: from mail-relay.rim.or.jp by multi.al.rim.or.jp (8.8.8/3.7W/HMX-12) with ESMTP id VAA15860 for <man-jp-reviewer@jp.freebsd.org>; Tue, 14 Dec 1999 21:25:12 +0900 (JST)
Received: from localhost (pppa14.yk.rim.or.jp [202.247.186.14]) by mail-relay.rim.or.jp (3.7W/HMX-12) id VAA25498 for <man-jp-reviewer@jp.freebsd.org>; Tue, 14 Dec 1999 21:25:09 +0900 (JST)
To: man-jp-reviewer@jp.freebsd.org
Mime-Version: 1.0
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <19991214212433T.k-horik@yk.rim.or.jp>
Date: Tue, 14 Dec 1999 21:24:33 +0900
From: Kazuo Horikawa <k-horik@yk.rim.or.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 478
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+990727
X-Sequence: man-jp-reviewer 1789
Subject: [man-jp-reviewer 1789] ng_pppoe.8
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org
X-Originator: k-horik@yk.rim.or.jp

 ng_pppoe.8 $B$N=iLu$G$9!#(B
# $B=5Kv$K40N;$7$F$?$N$K=P$7K:$l$F$^$7$?(B

--- ng_pppoe.8.eng	Sat Dec 11 23:14:43 1999
+++ ng_pppoe.8	Mon Dec 13 00:58:26 1999
@@ -35,144 +35,158 @@
 .\" $FreeBSD: src/sys/modules/netgraph/pppoe/ng_pppoe.8,v 1.4.2.3 1999/12/01 19:41:51 julian Exp $
 .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
 .\"
+.\" jpman %Id: ng_pppoe.8,v 0.0 1999/11/28 13:24:13 horikawa Stab %
 .Dd October 28, 1999
 .Dt NG_PPPOE 8
 .Os FreeBSD 4.0
-.Sh NAME
+.Sh $BL>>N(B
 .Nm ng_pppoe
-.Nd RFC 2516 PPPOE protocol netgraph node type
-.Sh SYNOPSIS
+.Nd RFC 2516 PPPOE $B%W%m%H%3%k(B netgraph $B%N!<%I%?%$%W(B
+.Sh $B=q<0(B
 .Fd #include <net/ethernet.h>
 .Fd #include <netgraph/ng_pppoe.h>
-.Sh DESCRIPTION
-The
+.Sh $B2r@b(B
 .Nm 
-node type performs the PPPoE protocol. It is used in conjunction with the
+$B%N!<%I%?%$%W$O(B PPPoE $B%W%m%H%3%k$r=hM}$7$^$9!#(B
+$B$3$l$O!"%$!<%5%M%C%H%U%l!<%`%o!<%/$KBP$9$k(B
 .Xr netgraph 4
-extensions to the Ethernet framework to divert and inject Ethernet packets
-to and from a PPP agent (which is not specified).
+$B3HD%$H6&$K;HMQ$5$l!"(B
+PPP $B%(!<%8%'%s%H(B ($B$3$l$O;XDj$5$l$F$$$^$;$s(B) $B$H$N4V$G(B
+$B%$!<%5%M%C%H%Q%1%C%H$rE>49$7$?$jA^F~$7$?$j$7$^$9!#(B
 .Pp
-The
 .Dv NGM_PPPOE_GET_STATUS
-control message can be used at any time to query the current status
-of the PPPOE module. The only statistics presently available are the
-total packet counts for input and output.  This node does not yet support
-the
+$B@)8f%a%C%;!<%8$r;HMQ$7$F!"(B
+$B$$$D$G$b(B PPPOE $B%b%8%e!<%k$N8=:_$N>uBV$rLd$$9g$o$;$k$3$H$,2DG=$G$9!#(B
+$B8=:_MxMQ2DG=$JE}7W>pJs$O!"F~NO$H=PNO$NA4%Q%1%C%H?t$N$_$G$9!#(B
+$BK\%N!<%I$O(B
 .Dv NGM_TEXT_STATUS
-control message.
-.Sh HOOKS
-This node type supports the following hooks:
+$B@)8f%a%C%;!<%8$O$^$@%5%]!<%H$7$F$$$^$;$s!#(B
+.Sh $B%U%C%/(B
+$BK\%N!<%I%?%$%W$O<!$N%U%C%/$r%5%]!<%H$7$^$9(B:
 .Pp
 .Bl -tag -width foobarbaz
 .It Dv ethernet
-The hook that should normally be connected to an Ethernet node.
+$BDL>o!"%$!<%5%M%C%H%N!<%I$K@\B3$5$l$k$Y$-%U%C%/$G$9!#(B
 .It Dv debug
-Presently no use.
+$B8=:_;HMQ$5$l$F$$$^$;$s!#(B
 .It Dv [unspecified]
-Any other name is assumed to be a session hook that will be connected to
-a PPP client agent, or a ppp server agent.
+$BB>$NL>A0$O!"(B
+PPP $B%/%i%$%"%s%H%(!<%8%'%s%H$^$?$O(B ppp $B%5!<%P%(!<%8%'%s%H$K@\B3$5$l$k!"(B
+$B%;%C%7%g%s%U%C%/$G$"$k$H8+Jo$5$l$^$9!#(B
 .El
-.Sh CONTROL MESSAGES
-This node type supports the generic control messages, plus the following:
+.Sh $B@)8f%a%C%;!<%8(B
+$BK\%N!<%I%?%$%W$O!"HFMQ@)8f%a%C%;!<%8$r%5%]!<%H$7!"(B
+$B99$K<!$N$b$N$b%5%]!<%H$7$^$9(B:
 .Bl -tag -width foo
 .It Dv NGM_PPPOE_GET_STATUS
-This command returns status information in a
-.Dv "struct ngpppoestat" :
+$BK\%3%^%s%I$O>uBV>pJs$r(B
+.Dv "struct ngpppoestat"
+$B$KF~$l$FJV$7$^$9(B:
 .Bd -literal -offset 4n
 struct ngpppoestat {
-    u_int   packets_in;     /* packets in from ethernet */
-    u_int   packets_out;    /* packets out towards ethernet */
+    u_int   packets_n;      /* ethernet $B$+$iMh$?%U%l!<%`?t(B */
+    u_int   packets_out;    /* ethernet $B$XAw$i$l$?%U%l!<%`?t(B*/
 };
 .Ed
 .It Dv NGM_TEXT_STATUS
-This generic message returns is a human-readable version of the node status.
-(not yet)
+$B$3$NHFMQ%a%C%;!<%8$O!"?M4V$,FI$a$k7A<0$N%N!<%I>uBV$rJV$7$^$9!#(B
+($BL$<BAu$G$9(B)
 .It Dv NGM_PPPOE_CONNECT
-Tell a nominated newly created hook that it's session should enter
-the state machine in a manner to become a client. It must be newly created and 
-a service name can be given as an argument. It is legal to specify a zero length
-service name. This is common on some DSL setups. A session request packet
-will be broadcast on the Ethernet.
-This command uses the 
+$B;XDj$5$l$??75,:n@.%U%C%/$KBP$7!"(B
+$B$=$N%;%C%7%g%s$,%/%i%$%"%s%H$H$J$kJ}K!$G>uBV5!3#$KF~$k$h$&DLCN$7$^$9!#(B
+$B%U%C%/$O?75,:n@.$G$"$kI,MW$,$"$j!"(B
+$B%5!<%S%9L>$O0z?t$H$7$F;XDj2DG=$G$9!#(B
+$BD9$5(B 0 $B$N%5!<%S%9L>$N;XDj$b@5Ev$G$9!#(B
+$B$3$l$O$"$k<o$N(B DSL $B@_Dj$G$O$h$/$"$k$3$H$G$9!#(B
+$B%;%C%7%g%sMW5a%Q%1%C%H$O%$!<%5%M%C%H>e$G%V%m!<%I%-%c%9%H$5$l$^$9!#(B
+$BK\%3%^%s%I$O!"8e=R$N(B
 .Dv ngpppoe_init_data
-structure shown below.
+$B9=B$BN$r;HMQ$7$^$9!#(B
 .It Dv NGM_PPPOE_LISTEN
-Tell a nominated newly created hook that it's session should enter
-the state machine in a manner to become a server listener. The argument
-given is the name of the service to listen on behalf of. A zero length service
-length will match all requests for service. A matching service request
-packet will be passed unmodified back to the process responsible
-for starting the service. It can then examine it and pass it on to 
-the session that is started to answer the request. 
-This command uses the 
+$B;XDj$5$l$??75,:n@.%U%C%/$KBP$7!"(B
+$B$=$N%;%C%7%g%s$,%5!<%P%j%9%J(B (server listener) $B$H$J$kJ}K!$G(B
+$B>uBV5!3#$KF~$k$h$&DLCN$7$^$9!#(B
+$B;XDj$5$l$k0z?t$O!"(Blisten $BBP>]$N%5!<%S%9L>$G$9!#(B
+$B%5!<%S%9D9$,D9$5(B 0 $B$N>l9g!"$9$Y$F$N%5!<%S%9MW5a$K%^%C%A$7$^$9!#(B
+$B%^%C%A$7$?%5!<%S%9MW5a$O!"JQ99$5$l$:$K!"(B
+$B$=$N%5!<%S%93+;O$K@UG$$,$"$k%W%m%;%9$KEO$5$l$^$9!#(B
+$B$3$N%W%m%;%9$O!"(B
+$B$3$NMW5a$r8!::$7$F!"MW5a$KEz$($k$?$a$K3+;O$5$l$k%;%C%7%g%s$XEO$7$^$9!#(B
+$BK\%3%^%s%I$O!"8e=R$N(B
 .Dv ngpppoe_init_data
-structure shown below.
+$B9=B$BN$r;HMQ$7$^$9!#(B
 .It Dv NGM_PPPOE_OFFER
-Tell a nominated newly created hook that it's session should enter
-the state machine in a manner to become a server. The argument
-given is the name of the service to offer. A zero length service
-is legal. The State machine will progress to a state where it will await
-a request packet to be forwarded to it from  the startup server,
-which in turn probably received it from a LISTEN mode hook ( see above).
-This is so
-that information that is required for the session that is embedded in
-the original session request packet, is made available to the state machine 
-that eventually answers the request. When the Session request packet is
-received, the session negotiation will proceed. 
-This command uses the 
+$B;XDj$5$l$??75,:n@.%U%C%/$KBP$7!"(B
+$B$=$N%;%C%7%g%s$,%5!<%P$H$J$kJ}K!$G>uBV5!3#$KF~$k$h$&DLCN$7$^$9!#(B
+$B;XDj$5$l$k0z?t$O!"Ds6!$9$k%5!<%S%9L>$G$9!#(B
+$BD9$5(B 0 $B$N%5!<%S%9$b@5Ev$G$9!#(B
+$B>uBV5!3#$O!"5/F0%5!<%P$+$iMW5a%Q%1%C%H$,E>Aw$5$l$k$N$rBT$D>uBV$X?J$_$^$9!#(B
+$B0lJ}!"5/F0%5!<%P$O!"(B
+$B$3$N%Q%1%C%H$r$*$=$i$/(B LISTEN $B%b!<%I%U%C%/(B ($BA0=R(B) $B$+$i<u$1<h$C$?$N$G$7$g$&!#(B
+$B$3$N$h$&$K$7$F!"(B
+$B85$N%;%C%7%g%sMW5a%Q%1%C%H$KKd$a9~$^$l$F$$$k%;%C%7%g%s$,I,MW$H$9$k>pJs$O!"(B
+$B:G=*E*$K$3$NMW5a$KBP$7$F1~Ez$9$k>uBV5!3#$,;HMQ2DG=$H$J$j$^$9!#(B
+$B%;%C%7%g%sMW5a%Q%1%C%H<u?.;~$K!"%;%C%7%g%s%M%4%7%(!<%7%g%s$O?JD=$7$^$9!#(B
+$BK\%3%^%s%I$O!"8e=R$N(B
 .Dv ngpppoe_init_data
-structure shown below.
+$B9=B$BN$r;HMQ$7$^$9!#(B
 .Pp
-The three commands above use a common data structure:
+$BA0=R$N(B 3 $B8D$N%3%^%s%I$O6&DL$N%G!<%?9=B$BN$r;HMQ$7$^$9(B:
 .Bd -literal -offset 4n
 struct ngpppoe_init_data {
-    char       hook[NG_HOOKLEN + 1];   /* hook to monitor on */
-    u_int16_t  data_len;               /* service name length */
-    char       data[0];                /* init data goes here */
+    char    hook[NG_HOOKLEN + 1];   /* $B4F;k$9$k%U%C%/(B */
+    u_int16_t       data_len;       /* $B%5!<%S%9L>$ND9$5(B */
+    char    data[0];                /* $B=i4|%G!<%?$O$3$3$G$9(B */
 };
 .Ed
 .It Dv NGM_PPPOE_SUCCESS
-This command is sent to the node that started this session with one of the
-above messages, and reports a state change. This message reports
-successful Session negotiation. It uses the structure shown below, and
-reports back the hook name corresponding to the successful session.
+$BK\%3%^%s%I$O!"(B
+$BK\%;%C%7%g%s$r>e5-$N$$$:$l$+(B 1 $B8D$N%a%C%;!<%8$G3+;O$7$?%N!<%I$XAw$i$l$^$9!#(B
+$BK\%a%C%;!<%8$O%;%C%7%g%s%M%4%7%(!<%7%g%s$N@.8y$rJs9p$7$^$9!#(B
+$BK\%3%^%s%I$O8e=R$N9=B$BN$r;HMQ$7!"(B
+$B@.8y$7$?%;%C%7%g%s$KBP1~$9$k%U%C%/L>$rJs9p$7$^$9!#(B
 .It Dv NGM_NGM_PPPOE_FAIL
-This command is sent to the node that started this session with one of the
-above messages, and reports a state change. This message reports
-failed Session negotiation. It uses the structure shown below, and
-reports back the hook name corresponding to the failed session.
-The hook will probably have been removed immediately after sending this message
+$BK\%3%^%s%I$O!"(B
+$BK\%;%C%7%g%s$r>e5-$N$$$:$l$+(B 1 $B8D$N%a%C%;!<%8$G3+;O$7$?%N!<%I$XAw$i$l!"(B
+$B>uBVJQ99$rJs9p$7$^$9!#(B
+$BK\%a%C%;!<%8$O%;%C%7%g%s%M%4%7%(!<%7%g%s$N<:GT$rJs9p$7$^$9!#(B
+$BK\%3%^%s%I$O8e=R$N9=B$BN$r;HMQ$7!"(B
+$B<:GT$7$?%;%C%7%g%s$KBP1~$9$k%U%C%/L>$rJs9p$7$^$9!#(B
+$BK\%a%C%;!<%8Aw?.D>8e$K$=$N%U%C%/$,:o=|$5$l$?$+$b$7$l$^$;$s!#(B
 .It Dv NGM_NGM_PPPOE_CLOSE
-This command is sent to the node that started this session with one of the
-above messages, and reports a state change. This message reports
-a request to close a session. It uses the structure shown below, and
-reports back the hook name corresponding to the closed session.
-The hook will probably have been removed immediately after sending this
-message. At present this message is not yet used and a 'failed' message
-will be received at closure instead.
+$BK\%3%^%s%I$O!"(B
+$BK\%;%C%7%g%s$r>e5-$N$$$:$l$+(B 1 $B8D$N%a%C%;!<%8$G3+;O$7$?%N!<%I$XAw$i$l!"(B
+$B>uBVJQ99$rJs9p$7$^$9!#(B
+$BK\%a%C%;!<%8$O%;%C%7%g%s%/%m!<%:MW5a$rJs9p$7$^$9!#(B
+$B8e=R$N9=B$BN$r;HMQ$7!"(B
+$B%/%m!<%:$5$l$?%;%C%7%g%s$KBP1~$9$k%U%C%/$NL>A0$rJs9p$7$^$9!#(B
+$BK\%a%C%;!<%8Aw?.D>8e$K$=$N%U%C%/$,:o=|$5$l$?$+$b$7$l$^$;$s!#(B
+$B8=:_!"$3$N%a%C%;!<%8$O$^$@;HMQ$5$l$F$*$i$:!"(B
+$BBe$j$K!V<:GT$7$?!W$H$$$&%a%C%;!<%8$,%/%m!<%:;~$K<u?.$5$l$^$9!#(B
 .Pp
-The three commands above use a common data structure:
+$BA0=R$N(B 3 $B8D$N%3%^%s%I$O6&DL$N%G!<%?9=B$BN$r;HMQ$7$^$9(B:
 .Bd -literal -offset 4n
 struct ngpppoe_sts {
-    char    hook[NG_HOOKLEN + 1]; /* hook associated with event session */
+    char    hook[NG_HOOKLEN + 1]; /* $B%$%Y%s%H%;%C%7%g%s$K(B
+                                     $B4XO"$9$k%U%C%/(B */
 };
 
 .El
-.Sh SHUTDOWN
-This node shuts down upon receipt of a
+.Sh $B%7%c%C%H%@%&%s(B
+$BK\%N!<%I$O!"(B
 .Dv NGM_SHUTDOWN
-control message, when all session have been disconnected or when the
+$B@)8f%a%C%;!<%8$N<u?.;~$+!"A4%U%C%/$,@ZCG$5$l$?$H$-$+!"(B
 .Dv ethernet
-hook is disconnected.
-.Sh EXAMPLE USAGE
-The following code uses 
+$B%U%C%/$,@ZCG$5$l$?$H$-$K%7%c%C%H%@%&%s$7$^$9!#(B
+.Sh $B;HMQNc(B
+$B<!$N%3!<%I$O!"(B
 .Dv libnetgraph
-to set up a
+$B$r;HMQ$7$F!"(B
 .Nm 
-node and connect it to both a socket node and an Ethernet node. It can handle
-the case of when a
+$B%N!<%I$r@_Dj$7!"(Bsocket $B%N!<%I$H%$!<%5%M%C%H%N!<%I$X@\B3$7$^$9!#(B
 .Nm
-node is already attached to the Ethernet. It then starts a client session.
+$B%N!<%I$,4{$K%$!<%5%M%C%H$K@\B3$7$F$$$k>l9g$b07$($^$9!#(B
+$B$=$N8e!"%/%i%$%"%s%H%;%C%7%g%s$r3+;O$7$^$9!#(B
 .Bd -literal
 #include <stdio.h>
 #include <stdlib.h>
@@ -209,7 +223,7 @@
 {
 	struct ngm_connect ngc;	/* connect */
 	struct ngm_mkpeer mkp;	/* mkpeer */
-	/******** nodeinfo stuff **********/
+	/******** nodeinfo $B4XO"(B **********/
 	u_char          rbuf[2 * 1024];
 	struct ng_mesg *const resp = (struct ng_mesg *) rbuf;
 	struct hooklist *const hlist
@@ -218,27 +232,27 @@
 	int             ch, no_hooks = 0;
 	struct linkinfo *link;
 	struct nodeinfo *peer;
-	/****message to connect pppoe session*****/
+	/**** pppoe $B%;%C%7%g%s$N@\B3MQ%a%C%;!<%8(B *****/
 	struct {
 		struct ngPPPoE_init_data idata;
 		char            service[100];
 	}               message;
-	/********tracking our little graph ********/
+	/******** $B>.$5$J%0%i%U$N%H%i%C%-%s%0MQ(B ********/
 	char            path[100];
 	char            source_ID[NG_NODELEN + 1];
 	char            pppoe_node_name[100];
 	int             k;
 
 	/*
-	 * Create the data and control sockets
+	 * $B%G!<%?$H@)8f$N%=%1%C%H$N:n@.(B
 	 */
 	if (NgMkSockNode(NULL, cfd, dfd) < 0) {
 		return (errno);
 	}
 	/*
-	 * find the ether node of the name requested by asking it for
-	 * it's inquiry information.
-	 */
+         * $BLd$$9g$o$;>pJs$KL>A0$r?R$M$k$3$H$G!"(B
+	 * $BMW5a$5$l$?L>A0$N(B ethernet $B%N!<%I$rC5$7$^$9(B
+         */
 	if (strlen(ethername) > 16)
 		return (EINVAL);
 	sprintf(path, "%s:", ethername);
@@ -247,20 +261,20 @@
 		return (errno);
 	}
 	/*
-	 * the command was accepted so it exists. Await the reply (It's
-	 * almost certainly already waiting).
+	 * $B%3%^%s%I$,<u$1IU$1$i$l$?$N$G!"B8:_$7$^$9!#(B
+         * $B1~Ez$rBT$A$^$9(B ($B$[$H$s$I$N>l9g3N<B$K4{$KBT$C$F$$$k$G$7$g$&(B)$B!#(B
 	 */
 	if (NgRecvMsg(*cfd, resp, sizeof(rbuf), NULL) < 0) {
 		return (errno);
 	}
 	/**
-	 * The following is available about the node:
-	 * ninfo->name		(string)
-	 * ninfo->type		(string)
+	 * $B<!$N>pJs$,%N!<%I$K4X$7$F;HMQ2DG=$G$9(B:
+	 * ninfo->name		($BJ8;zNs(B)
+	 * ninfo->type		($BJ8;zNs(B)
 	 * ninfo->id		(u_int32_t)
-	 * ninfo->hooks		(u_int32_t) (count of hooks)
-	 * check it is the correct type. and get it's ID for use
-	 * with mkpeer later.
+	 * ninfo->hooks		(u_int32_t) ($B%U%C%/?t(B)
+	 * $B@5$7$$7?$G$"$k$3$H$r3NG'$7$F$/$@$5$$!#(B
+         * $B8e$G(B mkpeer $B$G;HMQ$9$k(B ID $B$r<hF@$7$^$9!#(B
 	 */
 	if (strncmp(ninfo->type, NG_ETHER_NODE_TYPE,
 		    strlen(NG_ETHER_NODE_TYPE)) != 0) {
@@ -269,31 +283,31 @@
 	sprintf(source_ID, "[%08x]:", ninfo->id);
 
 	/*
-	 * look for a hook already attached.
+	 * $B4{$K@\B3$5$l$F$$$k%U%C%/$rC5$7$^$9!#(B
 	 */
 	for (k = 0; k < ninfo->hooks; k++) {
 		/**
-		 * The following are available about each hook.
-		 * link->ourhook	(string)
-		 * link->peerhook	(string)
-		 * peer->name		(string)
-		 * peer->type		(string)
+		 * $B<!$N>pJs$,3F%U%C%/$K4X$7$F;HMQ2DG=$G$9(B:
+		 * link->ourhook	($BJ8;zNs(B)
+		 * link->peerhook	($BJ8;zNs(B)
+		 * peer->name		($BJ8;zNs(B)
+		 * peer->type		($BJ8;zNs(B)
 		 * peer->id		(u_int32_t)
 		 * peer->hooks		(u_int32_t)
 		 */
 		link = &hlist->link[k];
 		peer = &hlist->link[k].nodeinfo;
 
-		/* Ignore debug hooks */
+		/* debug $B%U%C%/$rL5;k$7$^$9(B */
 		if (strcmp("debug", link->ourhook) == 0)
 			continue;
 
-		/* If the orphans hook is attached, use that */
+		/* $B$_$J$7$4$N%U%C%/$,@\B3$5$l$?>l9g!"$=$l$r;HMQ$7$^$9(B */
 		if (strcmp(NG_ETHER_HOOK_ORPHAN,
 		    link->ourhook) == 0) {
 			break;
 		}
-		/* the other option is the 'divert' hook */
+		/* $BB>$N%*%W%7%g%s$O(B 'divert' $B%U%C%/$G$9(B */
 		if (strcmp("NG_ETHER_HOOK_DIVERT",
 		    link->ourhook) == 0) {
 			break;
@@ -301,29 +315,30 @@
 	}
 
 	/*
-	 * See if we found a hook there.
+	 * $B$3$3$G%U%C%/$rH/8+$7$?$+$r3NG'$7$^$9!#(B
 	 */
 	if (k < ninfo->hooks) {
 		if (strcmp(peer->type, NG_PPPOE_NODE_TYPE) == 0) {
 			/*
-			 * If it's a type pppoe, we skip making one
-			 * ourself, but we continue, using
-			 * the existing one.
+			 * $B%?%$%W(B pppoe $B$N>l9g!"<+J,<+?H$G$N:n@.$O(B
+			 * $B%9%-%C%W$7!"4{B8$N$b$N$r;HMQ$7$F7QB3$7$^$9!#(B
 			 */
 			sprintf(pppoe_node_name, "[%08x]:", peer->id);
 		} else {
 			/*
-			 * There is already someone hogging the data,
-			 * return an error. Some day we'll try
-			 * daisy-chaining..
+			 * $B4{$KC/$+$,%G!<%?$r0l?M@j$a$7$F$$$k$N$G!"(B
+			 * $B%(%i!<$rJV$7$^$9!#(B
+			 * $B$$$D$NF|$K$+!"%G%$%8%A%'!<%s$r%5%]!<%H(B
+			 * $B$9$kM=Dj$G$9!#(B
 			 */
 			return (EBUSY);
 		}
 	} else {
 
 		/*
-		 * Try make a node of type pppoe against node "ID"
-		 * On hook NG_ETHER_HOOK_ORPHAN.
+		 * $B%N!<%I(B "ID" $B$KBP$7!"(B
+		 * $B%U%C%/(B NG_ETHER_HOOK_ORPHAN $B>e$G!"(B
+		 * $B%?%$%W(B pppoe $B$N%N!<%I:n@.$r;n$_$^$9!#(B
 		 */
 		snprintf(mkp.type, sizeof(mkp.type),
 			 "%s", NG_PPPOE_NODE_TYPE);
@@ -331,23 +346,24 @@
 			 "%s", NG_ETHER_HOOK_ORPHAN);
 		snprintf(mkp.peerhook, sizeof(mkp.peerhook),
 			 "%s", NG_PPPOE_HOOK_ETHERNET);
-		/* Send message */
+		/* $B%a%C%;!<%8$rAw?.$7$^$9(B */
 		if (NgSendMsg(*cfd, source_ID, NGM_GENERIC_COOKIE,
 			      NGM_MKPEER, &mkp, sizeof(mkp)) < 0) {
 			return (errno);
 		}
 		/*
-		 * Work out a name for the new node.
+		 * $B?75,%N!<%I$NL>A0$K4X$7$F:n6H$7$^$9!#(B
 		 */
 		sprintf(pppoe_node_name, "%s:%s",
 			source_ID, NG_ETHER_HOOK_ORPHAN);
 	}
 	/*
-	 * We now have a pppoe node attached to the ethernet
-	 * card. The Ethernet is addressed as ethername: The pppoe
-	 * node is addressed as pppoe_node_name: attach to it.
-	 * Connect socket node to specified node Use the same hook
-	 * name on both ends of the link.
+	 * $B$3$N;~E@$G!"(Bpppoe $B%N!<%I$,%$!<%5%M%C%H%+!<%I$K@\B3$5$l$^$7$?!#(B
+	 * $B%$!<%5%M%C%H$O(B ethername: $B$G%"%I%l%9$5$l$^$9!#(B
+	 * $B$3$l$K@\B3$5$l$?(B pppoe $B%N!<%I$O(B pppoe_node_name: $B$G(B
+	 * $B%"%I%l%9$5$l$^$9!#(B
+	 * socket $B%N!<%I$r;XDj$5$l$?%N!<%I$K@\B3$7$^$9!#(B
+	 * $B%j%s%/$NN>C<$GF1$8%U%C%/L>$r;HMQ$7$^$9!#(B
 	 */
 	snprintf(ngc.path, sizeof(ngc.path), "%s", pppoe_node_name);
 	snprintf(ngc.ourhook, sizeof(ngc.ourhook), "%s", sessname);
@@ -358,7 +374,7 @@
 		return (errno);
 	}
 	/*
-	 * Send it a message telling it to start up.
+	 * $B%a%C%;!<%8$rAw$j!"3+;O$9$k$h$&DLCN$7$^$9!#(B
 	 */
 	bzero(&message, sizeof(message));
 	snprintf(message.idata.hook, sizeof(message.idata.hook),
@@ -370,7 +386,7 @@
 			 sizeof(message.idata.data), "%s", service);
 		message.idata.data_len = strlen(service);
 	}
-	/* Tell session/hook to start up as a client */
+	/* $B%;%C%7%g%s(B/$B%U%C%/$X!"%/%i%$%"%s%H$H$7$F3+;O$9$k$h$&DLCN$7$^$9!#(B
 	if (NgSendMsg(*cfd, ngc.path,
 		      NGM_PPPOE_COOKIE, NGM_PPPOE_CONNECT, &message.idata,
 		      sizeof(message.idata) + message.idata.data_len) < 0) {
@@ -379,12 +395,12 @@
 	return (0);
 }
 .Ed
-.Sh SEE ALSO
+.Sh $B4XO"9`L\(B
 .Xr netgraph 3 ,
 .Xr netgraph 4 ,
 .Xr ng_socket 8 ,
 .Xr ng_ppp 8 ,
-.Xr ngctl 8 .
+.Xr ngctl 8
 .Rs
 .%A L. Mamakos
 .%A K. Lidl
@@ -395,5 +411,5 @@
 .%T "A Method for transmitting PPP over Ethernet (PPPoE)"
 .%O RFC 2516
 .Re
-.Sh AUTHOR
+.Sh $B:n<T(B
 Julian Elischer <julian@whistle.com>
