CVS commit: src/sbin/pppoectl

2021-05-14 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Fri May 14 09:08:59 UTC 2021

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
Added a keyword to change keepalive interval


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.29 src/sbin/pppoectl/pppoectl.c:1.30
--- src/sbin/pppoectl/pppoectl.c:1.29	Tue May 11 06:58:03 2021
+++ src/sbin/pppoectl/pppoectl.c	Fri May 14 09:08:59 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.29 2021/05/11 06:58:03 yamaguchi Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.30 2021/05/14 09:08:59 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: pppoectl.c,v 1.29 2021/05/11 06:58:03 yamaguchi Exp $");
+__RCSID("$NetBSD: pppoectl.c,v 1.30 2021/05/14 09:08:59 yamaguchi Exp $");
 #endif
 
 
@@ -57,7 +57,7 @@ __dead static void print_error(const cha
 static void print_vals(const char *ifname, int phase, struct spppauthcfg *sp,
 	int lcp_timeout, time_t idle_timeout, int authfailures,
 	int max_auth_failures, u_int maxalive, time_t max_noreceive,
-	int ncp_flags);
+	u_int alive_interval, int ncp_flags);
 static void print_dns(const char *ifname, int dns1, int dns2, int s, int tabs);
 static void print_stats(const char *ifname, int s, int dump);
 static const char *phase_name(int phase);
@@ -85,6 +85,7 @@ static int set_auth, set_lcp, set_idle_t
 static u_int set_ncpflags, clr_ncpflags;
 static int maxalive = -1;
 static int max_noreceive = -1;
+static int alive_intval = -1;
 static struct spppauthcfg spr;
 static struct sppplcpcfg lcp;
 static struct spppncpcfg ncp;
@@ -268,6 +269,7 @@ main(int argc, char **argv)
 		authfailstats.max_failures,
 		keepalivesettings.maxalive,
 		keepalivesettings.max_noreceive,
+		keepalivesettings.alive_interval,
 		ncp.ncp_flags);
 
 		if (spr.hisname) free(spr.hisname);
@@ -351,6 +353,8 @@ main(int argc, char **argv)
 			keepalivesettings.max_noreceive = max_noreceive;
 		if (maxalive >= 0)
 			keepalivesettings.maxalive = maxalive;
+		if (alive_intval >= 0)
+			keepalivesettings.alive_interval = alive_intval;
 		if (ioctl(s, SPPPSETKEEPALIVE, ) == -1)
 			err(EX_OSERR, "SPPPSETKEEPALIVE");
 	}
@@ -365,6 +369,7 @@ main(int argc, char **argv)
 		authfailstats.max_failures,
 		keepalivesettings.maxalive,
 		keepalivesettings.max_noreceive,
+		keepalivesettings.alive_interval,
 		ncp.ncp_flags);
 	}
 
@@ -446,6 +451,15 @@ pppoectl_argument(char *arg)
 		} else {
 			set_keepalive = 1;
 		}
+	} else if (startswith(arg, "alive-interval=")) {
+		alive_intval = atoi(arg+off);
+		if (alive_intval < 0) {
+			fprintf(stderr,
+			"alive-interval value must be at least 0\n");
+			alive_intval = -1;
+		} else {
+			set_keepalive = 1;
+		}
 	} else if (strcmp(arg, "callin") == 0)
 		spr.hisauthflags |= SPPP_AUTHFLAG_NOCALLOUT;
 	else if (strcmp(arg, "always") == 0)
@@ -528,7 +542,8 @@ usage(void)
 static void
 print_vals(const char *ifname, int phase, struct spppauthcfg *sp, int lcp_timeout,
 	time_t idle_timeout, int authfailures, int max_auth_failures,
-	u_int maxalive_cnt, time_t max_noreceive_time, int ncp_flags)
+	u_int maxalive_cnt, time_t max_noreceive_time, u_int alive_interval,
+	int ncp_flags)
 {
 #ifndef __NetBSD__
 	time_t send, recv;
@@ -568,6 +583,7 @@ print_vals(const char *ifname, int phase
 
 	printf("\tmax-noreceive = %ld seconds\n", (long)max_noreceive_time);
 	printf("\tmax-alive-missed = %u unanswered echo requests\n", maxalive_cnt);
+	printf("\talive-interval = %u\n", alive_interval);
 
 #ifndef __NetBSD__
 	printf("\tenable_vj: %s\n",



CVS commit: src/sbin/pppoectl

2021-05-11 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue May 11 06:58:03 UTC 2021

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
Make authproto not change when "authproto" is not in command option


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.28 src/sbin/pppoectl/pppoectl.c:1.29
--- src/sbin/pppoectl/pppoectl.c:1.28	Tue May 11 05:51:42 2021
+++ src/sbin/pppoectl/pppoectl.c	Tue May 11 06:58:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.28 2021/05/11 05:51:42 yamaguchi Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.29 2021/05/11 06:58:03 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: pppoectl.c,v 1.28 2021/05/11 05:51:42 yamaguchi Exp $");
+__RCSID("$NetBSD: pppoectl.c,v 1.29 2021/05/11 06:58:03 yamaguchi Exp $");
 #endif
 
 
@@ -203,6 +203,8 @@ main(int argc, char **argv)
 
 	memset(, 0, sizeof spr);
 	strncpy(spr.ifname, ifname, sizeof spr.ifname);
+	spr.myauth = SPPP_AUTHPROTO_NOCHG;
+	spr.hisauth = SPPP_AUTHPROTO_NOCHG;
 	memset(, 0, sizeof lcp);
 	strncpy(lcp.ifname, ifname, sizeof lcp.ifname);
 	memset(, 0, sizeof ncp);



CVS commit: src/sbin/pppoectl

2021-05-10 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue May 11 05:51:42 UTC 2021

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
Added keywords that are ipcp, noipcp, ipv6cp, noipv6cp
for configuring NCP


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.27 src/sbin/pppoectl/pppoectl.c:1.28
--- src/sbin/pppoectl/pppoectl.c:1.27	Fri Apr 23 02:28:40 2021
+++ src/sbin/pppoectl/pppoectl.c	Tue May 11 05:51:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.27 2021/04/23 02:28:40 yamaguchi Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.28 2021/05/11 05:51:42 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: pppoectl.c,v 1.27 2021/04/23 02:28:40 yamaguchi Exp $");
+__RCSID("$NetBSD: pppoectl.c,v 1.28 2021/05/11 05:51:42 yamaguchi Exp $");
 #endif
 
 
@@ -55,8 +55,9 @@ __RCSID("$NetBSD: pppoectl.c,v 1.27 2021
 __dead static void usage(void);
 __dead static void print_error(const char *ifname, int error, const char * str);
 static void print_vals(const char *ifname, int phase, struct spppauthcfg *sp,
-	int lcp_timeout, time_t idle_timeout, int authfailures, 
-	int max_auth_failures, u_int maxalive, time_t max_noreceive);
+	int lcp_timeout, time_t idle_timeout, int authfailures,
+	int max_auth_failures, u_int maxalive, time_t max_noreceive,
+	int ncp_flags);
 static void print_dns(const char *ifname, int dns1, int dns2, int s, int tabs);
 static void print_stats(const char *ifname, int s, int dump);
 static const char *phase_name(int phase);
@@ -81,10 +82,12 @@ static int hz = 0;
 
 static int set_auth, set_lcp, set_idle_to, set_auth_failure, set_dns,
 clear_auth_failure_count, set_keepalive;
+static u_int set_ncpflags, clr_ncpflags;
 static int maxalive = -1;
 static int max_noreceive = -1;
 static struct spppauthcfg spr;
 static struct sppplcpcfg lcp;
+static struct spppncpcfg ncp;
 static struct spppstatus status;
 static struct spppidletimeout timeout;
 static struct spppauthfailurestats authfailstats;
@@ -202,6 +205,8 @@ main(int argc, char **argv)
 	strncpy(spr.ifname, ifname, sizeof spr.ifname);
 	memset(, 0, sizeof lcp);
 	strncpy(lcp.ifname, ifname, sizeof lcp.ifname);
+	memset(, 0, sizeof ncp);
+	strncpy(ncp.ifname, ifname, sizeof ncp.ifname);
 	memset(, 0, sizeof status);
 	strncpy(status.ifname, ifname, sizeof status.ifname);
 	memset(, 0, sizeof timeout);
@@ -245,6 +250,8 @@ main(int argc, char **argv)
 
 		if (ioctl(s, SPPPGETLCPCFG, ) == -1)
 			err(EX_OSERR, "SPPPGETLCPCFG");
+		if (ioctl(s, SPPPGETNCPCFG, ) == -1)
+			err(EX_OSERR, "SPPPGETNCPCFG");
 		if (ioctl(s, SPPPGETSTATUS, ) == -1)
 			err(EX_OSERR, "SPPPGETSTATUS");
 		if (ioctl(s, SPPPGETIDLETO, ) == -1)
@@ -258,7 +265,8 @@ main(int argc, char **argv)
 		timeout.idle_seconds, authfailstats.auth_failures,
 		authfailstats.max_failures,
 		keepalivesettings.maxalive,
-		keepalivesettings.max_noreceive);
+		keepalivesettings.max_noreceive,
+		ncp.ncp_flags);
 
 		if (spr.hisname) free(spr.hisname);
 		if (spr.myname) free(spr.myname);
@@ -300,6 +308,16 @@ main(int argc, char **argv)
 		if (ioctl(s, SPPPSETLCPCFG, ) == -1)
 			err(EX_OSERR, "SPPPSETLCPCFG");
 	}
+	if (set_ncpflags != 0 || clr_ncpflags != 0) {
+		if (ioctl(s, SPPPGETNCPCFG, ) == -1)
+			err(EX_OSERR, "SPPPGETNCPCFG");
+
+		ncp.ncp_flags |= set_ncpflags;
+		ncp.ncp_flags &= ~clr_ncpflags;
+
+		if (ioctl(s, SPPPSETNCPCFG, ) == -1)
+			err(EX_OSERR, "SPPPSETNCPCFG");
+	}
 	if (set_idle_to) {
 		if (ioctl(s, SPPPSETIDLETO, ) == -1)
 			err(EX_OSERR, "SPPPSETIDLETO");
@@ -344,7 +362,8 @@ main(int argc, char **argv)
 		timeout.idle_seconds, authfailstats.auth_failures,
 		authfailstats.max_failures,
 		keepalivesettings.maxalive,
-		keepalivesettings.max_noreceive);
+		keepalivesettings.max_noreceive,
+		ncp.ncp_flags);
 	}
 
 	return 0;
@@ -459,6 +478,18 @@ pppoectl_argument(char *arg)
 	} else if (startswith(arg, "query-dns=")) {
 		dnssettings.query_dns = atoi(arg+off);
 		set_dns = 1;
+	} else if (strcmp(arg, "ipcp") == 0) {
+		set_ncpflags |= SPPP_NCP_IPCP;
+		clr_ncpflags &= ~SPPP_NCP_IPCP;
+	} else if (strcmp(arg, "noipcp") == 0) {
+		set_ncpflags &= ~SPPP_NCP_IPCP;
+		clr_ncpflags |= SPPP_NCP_IPCP;
+	} else if (strcmp(arg, "ipv6cp") == 0) {
+		set_ncpflags |= SPPP_NCP_IPV6CP;
+		clr_ncpflags &= ~SPPP_NCP_IPV6CP;
+	} else if (strcmp(arg, "noipv6cp") == 0) {
+		set_ncpflags &= ~SPPP_NCP_IPV6CP;
+		clr_ncpflags |= SPPP_NCP_IPV6CP;
 	} else
 		errx(EX_DATAERR, "bad parameter: \"%s\"", arg);
 }
@@ -472,7 +503,7 @@ usage(void)
 	"   %s [-f config] ifname [...]\n"
 	"   %s [-v] ifname [{my|his}auth{proto|name|secret}=...] \\\n"
 "  [callin] 

CVS commit: src/sbin/pppoectl

2021-04-22 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Fri Apr 23 02:28:40 UTC 2021

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
 Add a new option to enable SPPP_AUTHFLAG_PASSIVEAUTHPROTO flag


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.26 src/sbin/pppoectl/pppoectl.c:1.27
--- src/sbin/pppoectl/pppoectl.c:1.26	Wed Nov 25 10:32:54 2020
+++ src/sbin/pppoectl/pppoectl.c	Fri Apr 23 02:28:40 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.26 2020/11/25 10:32:54 yamaguchi Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.27 2021/04/23 02:28:40 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: pppoectl.c,v 1.26 2020/11/25 10:32:54 yamaguchi Exp $");
+__RCSID("$NetBSD: pppoectl.c,v 1.27 2021/04/23 02:28:40 yamaguchi Exp $");
 #endif
 
 
@@ -433,6 +433,8 @@ pppoectl_argument(char *arg)
 		spr.hisauthflags |= SPPP_AUTHFLAG_NORECHALLENGE;
 	else if (strcmp(arg, "rechallenge") == 0)
 		spr.hisauthflags &= ~SPPP_AUTHFLAG_NORECHALLENGE;
+	else if (strcmp(arg, "passiveauthproto") == 0)
+		spr.myauthflags |= SPPP_AUTHFLAG_PASSIVEAUTHPROTO;
 #ifndef __NetBSD__
 	else if (strcmp(arg, "enable-vj") == 0)
 		spr.defs.enable_vj = 1;



CVS commit: src/sbin/pppoectl

2020-11-25 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Nov 25 10:32:54 UTC 2020

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
add -dd option for reference of the parameter about control protocols

reviewed by knakahara@n.o.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.25 src/sbin/pppoectl/pppoectl.c:1.26
--- src/sbin/pppoectl/pppoectl.c:1.25	Sat Jan 23 15:41:47 2016
+++ src/sbin/pppoectl/pppoectl.c	Wed Nov 25 10:32:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.25 2016/01/23 15:41:47 christos Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.26 2020/11/25 10:32:54 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: pppoectl.c,v 1.25 2016/01/23 15:41:47 christos Exp $");
+__RCSID("$NetBSD: pppoectl.c,v 1.26 2020/11/25 10:32:54 yamaguchi Exp $");
 #endif
 
 
@@ -44,6 +44,7 @@ __RCSID("$NetBSD: pppoectl.c,v 1.25 2016
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -56,11 +57,26 @@ __dead static void print_error(const cha
 static void print_vals(const char *ifname, int phase, struct spppauthcfg *sp,
 	int lcp_timeout, time_t idle_timeout, int authfailures, 
 	int max_auth_failures, u_int maxalive, time_t max_noreceive);
+static void print_dns(const char *ifname, int dns1, int dns2, int s, int tabs);
+static void print_stats(const char *ifname, int s, int dump);
 static const char *phase_name(int phase);
 static const char *proto_name(int proto);
 static const char *authflags(int flags);
+static const char *pppoe_state_name(int state);
+static const char *ppp_state_name(int state);
 static void pppoectl_argument(char *arg);
 
+#define	ISSET(x, a)	((x) & (a))
+#define PPPOECTL_IOCTL(_ifname, _s, _cmd, _st)	do {	\
+	int __e;	\
+	memset((_st), 0, sizeof(*(_st)));		\
+	strncpy((_st)->ifname, (_ifname),		\
+	sizeof((_st)->ifname));			\
+	__e = ioctl((_s), (_cmd), (_st));		\
+	if (__e != 0)	\
+		print_error((_ifname), __e, #_cmd);	\
+} while (0)
+
 static int hz = 0;
 
 static int set_auth, set_lcp, set_idle_to, set_auth_failure, set_dns,
@@ -174,60 +190,14 @@ main(int argc, char **argv)
 	}
 
 	if (dns1 || dns2) {
-		/* print DNS addresses */
-		int e;
-		struct spppdnsaddrs addrs;
-		memset(, 0, sizeof addrs);
-		strncpy(addrs.ifname, ifname, sizeof addrs.ifname);
-		e = ioctl(s, SPPPGETDNSADDRS, );
-		if (e) 
-			print_error(ifname, e, "SPPPGETDNSADDRS");
-		if (dns1)
-			printf("%d.%d.%d.%d\n",
-(addrs.dns[0] >> 24) & 0xff,
-(addrs.dns[0] >> 16) & 0xff,
-(addrs.dns[0] >> 8) & 0xff,
-addrs.dns[0] & 0xff);
-		if (dns2)
-			printf("%d.%d.%d.%d\n",
-(addrs.dns[1] >> 24) & 0xff,
-(addrs.dns[1] >> 16) & 0xff,
-(addrs.dns[1] >> 8) & 0xff,
-addrs.dns[1] & 0xff);
+		print_dns(ifname, dns1, dns2, s, 0);
 	}
 
 	if (dump) {
-		/* dump PPPoE session state */
-		struct pppoeconnectionstate state;
-		int e;
-		
-		memset(, 0, sizeof state);
-		strncpy(state.ifname, ifname, sizeof state.ifname);
-		e = ioctl(s, PPPOEGETSESSION, );
-		if (e) 
-			print_error(ifname, e, "PPPOEGETSESSION");
-
-		printf("%s:\tstate = ", ifname);
-		switch(state.state) {
-		case PPPOE_STATE_INITIAL:
-			printf("initial\n"); break;
-		case PPPOE_STATE_PADI_SENT:
-			printf("PADI sent\n"); break;
-		case PPPOE_STATE_PADR_SENT:
-			printf("PADR sent\n"); break;
-		case PPPOE_STATE_SESSION:
-			printf("session\n"); break;
-		case PPPOE_STATE_CLOSING:
-			printf("closing\n"); break;
-		}
-		printf("\tSession ID: 0x%x\n", state.session_id);
-		printf("\tPADI retries: %d\n", state.padi_retry_no);
-		printf("\tPADR retries: %d\n", state.padr_retry_no);
-		
+		print_stats(ifname, s, dump);
 		return 0;
 	}
 
-
 	memset(, 0, sizeof spr);
 	strncpy(spr.ifname, ifname, sizeof spr.ifname);
 	memset(, 0, sizeof lcp);
@@ -570,6 +540,110 @@ print_vals(const char *ifname, int phase
 #endif
 }
 
+static void
+print_dns(const char *ifname, int dns1, int dns2, int s, int tabs)
+{
+	int i;
+	struct spppdnsaddrs addrs;
+
+	if (!dns1 && !dns2)
+		return;
+
+	PPPOECTL_IOCTL(ifname, s, SPPPGETDNSADDRS, );
+	if (dns1) {
+		for (i = 0; i < tabs; i++)
+			printf("\t");
+		if (tabs > 0)
+			printf("primary dns address ");
+		printf("%d.%d.%d.%d\n",
+		   (addrs.dns[0] >> 24) & 0xff,
+		   (addrs.dns[0] >> 16) & 0xff,
+		   (addrs.dns[0] >> 8) & 0xff,
+		   addrs.dns[0] & 0xff);
+	}
+	if (dns2) {
+		for (i = 0; i < tabs; i++)
+			printf("\t");
+		if (tabs > 0)
+			printf("secondary dns address ");
+		printf("%d.%d.%d.%d\n",
+		   (addrs.dns[1] >> 24) & 0xff,
+		   (addrs.dns[1] >> 16) & 0xff,
+		   (addrs.dns[1] >> 8) & 0xff,
+		   addrs.dns[1] & 0xff);
+	}
+}
+
+static void
+print_stats(const char *ifname, int s, int dump)
+{

CVS commit: src/sbin/pppoectl

2018-09-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep 25 09:55:41 UTC 2018

Modified Files:
src/sbin/pppoectl: pppoectl.8

Log Message:
Fix wrong macro, use An.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sbin/pppoectl/pppoectl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.8
diff -u src/sbin/pppoectl/pppoectl.8:1.31 src/sbin/pppoectl/pppoectl.8:1.32
--- src/sbin/pppoectl/pppoectl.8:1.31	Sun Sep 23 07:24:19 2018
+++ src/sbin/pppoectl/pppoectl.8	Tue Sep 25 09:55:41 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pppoectl.8,v 1.31 2018/09/23 07:24:19 maxv Exp $
+.\"	$NetBSD: pppoectl.8,v 1.32 2018/09/25 09:55:41 wiz Exp $
 .\"
 .\" Copyright (C) 1997 by Joerg Wunsch, Dresden
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\"
 .\" From: spppcontrol.1,v 1.1.1.1 1997/10/11 11:30:30 joerg Exp
 .\"
-.\" $Id: pppoectl.8,v 1.31 2018/09/23 07:24:19 maxv Exp $
+.\" $Id: pppoectl.8,v 1.32 2018/09/25 09:55:41 wiz Exp $
 .\"
 .\" last edit-date: [Thu Aug 31 10:47:33 2000]
 .\"
@@ -63,7 +63,6 @@ optionally passing in additional paramet
 The latter usage is indicated by the presence of the
 .Fl e
 option, which takes the name of the ethernet interface as its argument.
-.Pp
 .Bl -tag -width indent
 .It Fl e
 specifies the ethernet interface used to communicate with the
@@ -292,7 +291,6 @@ The result of the negotiation can be ret
 option.
 .El
 .Sh EXAMPLES
-.Bd -literal
 The following example is the complete sequence of commands to bring
 a PPPoE connection up:
 .Bd -literal
@@ -357,5 +355,9 @@ The
 utility first appeared in
 .Nx 1.6 .
 .Sh AUTHORS
-The program was written by J\(:org Wunsch, Dresden,
-and modified for PPPoE support by Martin Husemann.
+.An -nosplit
+The program was written by
+.An J\(:org Wunsch ,
+Dresden,
+and modified for PPPoE support by
+.An Martin Husemann .



CVS commit: src/sbin/pppoectl

2016-09-11 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon Sep 12 05:35:21 UTC 2016

Modified Files:
src/sbin/pppoectl: pppoectl.8

Log Message:
pppoectl first appeared in NetBSD 1.6.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sbin/pppoectl/pppoectl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.8
diff -u src/sbin/pppoectl/pppoectl.8:1.29 src/sbin/pppoectl/pppoectl.8:1.30
--- src/sbin/pppoectl/pppoectl.8:1.29	Wed Oct 12 16:41:47 2011
+++ src/sbin/pppoectl/pppoectl.8	Mon Sep 12 05:35:20 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pppoectl.8,v 1.29 2011/10/12 16:41:47 christos Exp $
+.\"	$NetBSD: pppoectl.8,v 1.30 2016/09/12 05:35:20 sevan Exp $
 .\"
 .\" Copyright (C) 1997 by Joerg Wunsch, Dresden
 .\" All rights reserved.
@@ -26,11 +26,11 @@
 .\"
 .\" From: spppcontrol.1,v 1.1.1.1 1997/10/11 11:30:30 joerg Exp
 .\"
-.\" $Id: pppoectl.8,v 1.29 2011/10/12 16:41:47 christos Exp $
+.\" $Id: pppoectl.8,v 1.30 2016/09/12 05:35:20 sevan Exp $
 .\"
 .\" last edit-date: [Thu Aug 31 10:47:33 2000]
 .\"
-.Dd October 11, 2011
+.Dd September 12, 2016
 .Dt PPPOECTL 8
 .Os
 .Sh NAME
@@ -400,6 +400,10 @@ utility is based on the
 .Ic spppcontrol
 utility which appeared in
 .Fx 3.0 .
+The
+.Nm
+utility first appeared in
+.Nx 1.6 .
 .Sh AUTHORS
 The program was written by J\(:org Wunsch, Dresden,
 and modified for PPPoE support by Martin Husemann.



CVS commit: src/sbin/pppoectl

2016-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 23 15:41:47 UTC 2016

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
don't need mbuf.h!


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.24 src/sbin/pppoectl/pppoectl.c:1.25
--- src/sbin/pppoectl/pppoectl.c:1.24	Sun Aug 28 04:43:02 2011
+++ src/sbin/pppoectl/pppoectl.c	Sat Jan 23 10:41:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.24 2011/08/28 08:43:02 mbalmer Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.25 2016/01/23 15:41:47 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,14 +31,13 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: pppoectl.c,v 1.24 2011/08/28 08:43:02 mbalmer Exp $");
+__RCSID("$NetBSD: pppoectl.c,v 1.25 2016/01/23 15:41:47 christos Exp $");
 #endif
 
 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 



CVS commit: src/sbin/pppoectl

2011-10-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 12 10:33:14 UTC 2011

Modified Files:
src/sbin/pppoectl: pppoectl.8

Log Message:
Two small fixes from David H. Gutteridge in PR bin/45454.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sbin/pppoectl/pppoectl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.8
diff -u src/sbin/pppoectl/pppoectl.8:1.27 src/sbin/pppoectl/pppoectl.8:1.28
--- src/sbin/pppoectl/pppoectl.8:1.27	Wed Mar 31 04:17:23 2010
+++ src/sbin/pppoectl/pppoectl.8	Wed Oct 12 10:33:14 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: pppoectl.8,v 1.27 2010/03/31 04:17:23 joerg Exp $
+.\	$NetBSD: pppoectl.8,v 1.28 2011/10/12 10:33:14 martin Exp $
 .\
 .\ Copyright (C) 1997 by Joerg Wunsch, Dresden
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ From: spppcontrol.1,v 1.1.1.1 1997/10/11 11:30:30 joerg Exp
 .\
-.\ $Id: pppoectl.8,v 1.27 2010/03/31 04:17:23 joerg Exp $
+.\ $Id: pppoectl.8,v 1.28 2011/10/12 10:33:14 martin Exp $
 .\
 .\ last edit-date: [Thu Aug 31 10:47:33 2000]
 .\
@@ -63,11 +63,11 @@
 .Ar ifname
 .Op Ar ...
 .Sh DESCRIPTION
-There are two basic modes of operation: configuring security related
+There are two basic modes of operation: configuring security-related
 parameters and attaching a PPPoE interface to its ethernet interface,
 optionally passing in additional parameters for the PPPoE encapsulation.
 .Pp
-The later usage is indicated by the presence of the
+The latter usage is indicated by the presence of the
 .Fl e
 option, which takes the name of the ethernet interface as its argument.
 .Pp



CVS commit: src/sbin/pppoectl

2011-10-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 12 16:41:47 UTC 2011

Modified Files:
src/sbin/pppoectl: pppoectl.8

Log Message:
fix the date.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sbin/pppoectl/pppoectl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.8
diff -u src/sbin/pppoectl/pppoectl.8:1.28 src/sbin/pppoectl/pppoectl.8:1.29
--- src/sbin/pppoectl/pppoectl.8:1.28	Wed Oct 12 06:33:14 2011
+++ src/sbin/pppoectl/pppoectl.8	Wed Oct 12 12:41:47 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: pppoectl.8,v 1.28 2011/10/12 10:33:14 martin Exp $
+.\	$NetBSD: pppoectl.8,v 1.29 2011/10/12 16:41:47 christos Exp $
 .\
 .\ Copyright (C) 1997 by Joerg Wunsch, Dresden
 .\ All rights reserved.
@@ -26,11 +26,11 @@
 .\
 .\ From: spppcontrol.1,v 1.1.1.1 1997/10/11 11:30:30 joerg Exp
 .\
-.\ $Id: pppoectl.8,v 1.28 2011/10/12 10:33:14 martin Exp $
+.\ $Id: pppoectl.8,v 1.29 2011/10/12 16:41:47 christos Exp $
 .\
 .\ last edit-date: [Thu Aug 31 10:47:33 2000]
 .\
-.Dd October 2, 2003
+.Dd October 11, 2011
 .Dt PPPOECTL 8
 .Os
 .Sh NAME



CVS commit: src/sbin/pppoectl

2011-08-28 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sun Aug 28 08:43:02 UTC 2011

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
Remove duplicate static.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.23 src/sbin/pppoectl/pppoectl.c:1.24
--- src/sbin/pppoectl/pppoectl.c:1.23	Sat Aug 27 18:44:44 2011
+++ src/sbin/pppoectl/pppoectl.c	Sun Aug 28 08:43:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.23 2011/08/27 18:44:44 joerg Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.24 2011/08/28 08:43:02 mbalmer Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: pppoectl.c,v 1.23 2011/08/27 18:44:44 joerg Exp $);
+__RCSID($NetBSD: pppoectl.c,v 1.24 2011/08/28 08:43:02 mbalmer Exp $);
 #endif
 
 
@@ -60,7 +60,7 @@
 static const char *phase_name(int phase);
 static const char *proto_name(int proto);
 static const char *authflags(int flags);
-static static void pppoectl_argument(char *arg);
+static void pppoectl_argument(char *arg);
 
 static int hz = 0;
 



CVS commit: src/sbin/pppoectl

2011-08-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Aug 27 18:44:44 UTC 2011

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
static + __dead


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.22 src/sbin/pppoectl/pppoectl.c:1.23
--- src/sbin/pppoectl/pppoectl.c:1.22	Fri Jul  1 02:51:52 2011
+++ src/sbin/pppoectl/pppoectl.c	Sat Aug 27 18:44:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.23 2011/08/27 18:44:44 joerg Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $);
+__RCSID($NetBSD: pppoectl.c,v 1.23 2011/08/27 18:44:44 joerg Exp $);
 #endif
 
 
@@ -52,30 +52,30 @@
 #include sysexits.h
 #include unistd.h
 
-static void usage(void);
-static void print_error(const char *ifname, int error, const char * str);
+__dead static void usage(void);
+__dead static void print_error(const char *ifname, int error, const char * str);
 static void print_vals(const char *ifname, int phase, struct spppauthcfg *sp,
 	int lcp_timeout, time_t idle_timeout, int authfailures, 
 	int max_auth_failures, u_int maxalive, time_t max_noreceive);
-const char *phase_name(int phase);
-const char *proto_name(int proto);
-const char *authflags(int flags);
-static void pppoectl_argument(char *arg);
+static const char *phase_name(int phase);
+static const char *proto_name(int proto);
+static const char *authflags(int flags);
+static static void pppoectl_argument(char *arg);
 
-int hz = 0;
+static int hz = 0;
 
-int set_auth, set_lcp, set_idle_to, set_auth_failure, set_dns,
+static int set_auth, set_lcp, set_idle_to, set_auth_failure, set_dns,
 clear_auth_failure_count, set_keepalive;
-int maxalive = -1;
-int max_noreceive = -1;
-struct spppauthcfg spr;
-struct sppplcpcfg lcp;
-struct spppstatus status;
-struct spppidletimeout timeout;
-struct spppauthfailurestats authfailstats;
-struct spppauthfailuresettings authfailset;
-struct spppdnssettings dnssettings;
-struct spppkeepalivesettings keepalivesettings;
+static int maxalive = -1;
+static int max_noreceive = -1;
+static struct spppauthcfg spr;
+static struct sppplcpcfg lcp;
+static struct spppstatus status;
+static struct spppidletimeout timeout;
+static struct spppauthfailurestats authfailstats;
+static struct spppauthfailuresettings authfailset;
+static struct spppdnssettings dnssettings;
+static struct spppkeepalivesettings keepalivesettings;
 
 int
 main(int argc, char **argv)
@@ -571,7 +571,7 @@
 #endif
 }
 
-const char *
+static const char *
 phase_name(int phase)
 {
 	switch (phase) {
@@ -584,7 +584,7 @@
 	return illegal;
 }
 
-const char *
+static const char *
 proto_name(int proto)
 {
 	static char buf[12];
@@ -597,7 +597,7 @@
 	return buf;
 }
 
-const char *
+static const char *
 authflags(int flags)
 {
 	static char buf[32];



CVS commit: src/sbin/pppoectl

2011-06-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jul  1 02:51:52 UTC 2011

Modified Files:
src/sbin/pppoectl: pppoectl.c

Log Message:
Fix memset usage.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sbin/pppoectl/pppoectl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.c
diff -u src/sbin/pppoectl/pppoectl.c:1.21 src/sbin/pppoectl/pppoectl.c:1.22
--- src/sbin/pppoectl/pppoectl.c:1.21	Fri Mar 17 15:53:46 2006
+++ src/sbin/pppoectl/pppoectl.c	Fri Jul  1 02:51:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pppoectl.c,v 1.21 2006/03/17 15:53:46 rumble Exp $	*/
+/*	$NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $	*/
 
 /*
  * Copyright (c) 1997 Joerg Wunsch
@@ -31,7 +31,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: pppoectl.c,v 1.21 2006/03/17 15:53:46 rumble Exp $);
+__RCSID($NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $);
 #endif
 
 
@@ -237,7 +237,7 @@
 	strncpy(status.ifname, ifname, sizeof status.ifname);
 	memset(timeout, 0, sizeof timeout);
 	strncpy(timeout.ifname, ifname, sizeof timeout.ifname);
-	memset(authfailstats, 0, sizeof authfailstats);
+	memset(authfailstats, 0, sizeof authfailstats);
 	strncpy(authfailstats.ifname, ifname, sizeof authfailstats.ifname);
 	memset(authfailset, 0, sizeof authfailset);
 	strncpy(authfailset.ifname, ifname, sizeof authfailset.ifname);



CVS commit: src/sbin/pppoectl

2010-03-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 30 14:07:50 UTC 2010

Modified Files:
src/sbin/pppoectl: pppoectl.8

Log Message:
Assume o umlaut is transliterated by nroff as needed.
\\ - \e


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/pppoectl/pppoectl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.8
diff -u src/sbin/pppoectl/pppoectl.8:1.25 src/sbin/pppoectl/pppoectl.8:1.26
--- src/sbin/pppoectl/pppoectl.8:1.25	Mon Mar  9 19:24:27 2009
+++ src/sbin/pppoectl/pppoectl.8	Tue Mar 30 14:07:50 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: pppoectl.8,v 1.25 2009/03/09 19:24:27 joerg Exp $
+.\	$NetBSD: pppoectl.8,v 1.26 2010/03/30 14:07:50 joerg Exp $
 .\
 .\ Copyright (C) 1997 by Joerg Wunsch, Dresden
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ From: spppcontrol.1,v 1.1.1.1 1997/10/11 11:30:30 joerg Exp
 .\
-.\ $Id: pppoectl.8,v 1.25 2009/03/09 19:24:27 joerg Exp $
+.\ $Id: pppoectl.8,v 1.26 2010/03/30 14:07:50 joerg Exp $
 .\
 .\ last edit-date: [Thu Aug 31 10:47:33 2000]
 .\
@@ -350,10 +350,10 @@
 pppoectl -e ne0 pppoe0
 
 # Configure authentication
-pppoectl pppoe0 \\
-  myauthproto=pap \\
-  myauthname=X \\
-  myauthsecret=Y \\
+pppoectl pppoe0 \e
+  myauthproto=pap \e
+  myauthname=X \e
+  myauthsecret=Y \e
   hisauthproto=none
 
 # Configure the pppoe0 interface itself.  These addresses are magic,
@@ -401,7 +401,5 @@
 utility which appeared in
 .Fx 3.0 .
 .Sh AUTHORS
-The program was written by
-.ie t J\(:org Wunsch,
-.el Joerg Wunsch,
-Dresden, and modified for PPPoE support by Martin Husemann.
+The program was written by t J\(:org Wunsch, Dresden,
+and modified for PPPoE support by Martin Husemann.



CVS commit: src/sbin/pppoectl

2010-03-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Mar 31 04:17:23 UTC 2010

Modified Files:
src/sbin/pppoectl: pppoectl.8

Log Message:
Kill stray t.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/pppoectl/pppoectl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/pppoectl/pppoectl.8
diff -u src/sbin/pppoectl/pppoectl.8:1.26 src/sbin/pppoectl/pppoectl.8:1.27
--- src/sbin/pppoectl/pppoectl.8:1.26	Tue Mar 30 14:07:50 2010
+++ src/sbin/pppoectl/pppoectl.8	Wed Mar 31 04:17:23 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: pppoectl.8,v 1.26 2010/03/30 14:07:50 joerg Exp $
+.\	$NetBSD: pppoectl.8,v 1.27 2010/03/31 04:17:23 joerg Exp $
 .\
 .\ Copyright (C) 1997 by Joerg Wunsch, Dresden
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ From: spppcontrol.1,v 1.1.1.1 1997/10/11 11:30:30 joerg Exp
 .\
-.\ $Id: pppoectl.8,v 1.26 2010/03/30 14:07:50 joerg Exp $
+.\ $Id: pppoectl.8,v 1.27 2010/03/31 04:17:23 joerg Exp $
 .\
 .\ last edit-date: [Thu Aug 31 10:47:33 2000]
 .\
@@ -401,5 +401,5 @@
 utility which appeared in
 .Fx 3.0 .
 .Sh AUTHORS
-The program was written by t J\(:org Wunsch, Dresden,
+The program was written by J\(:org Wunsch, Dresden,
 and modified for PPPoE support by Martin Husemann.