Remove obsoleted sysctl interface for switching between standard and 3Com

PPPoE modes. The interface was declared obsoleted before 5.3-RELEASE.

When running as access concentrator ng_pppoe(4) supports both modes
simultanously. When running as client mode can be swicthed in ppp(8)
configuration.

Approved by:	re (scottl)
This commit is contained in:
Gleb Smirnoff 2005-07-05 17:51:02 +00:00
parent 8fb02d4f92
commit ae1ff8e34f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147778
2 changed files with 2 additions and 49 deletions

View File

@ -35,7 +35,7 @@
.\" $FreeBSD$
.\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
.\"
.Dd July 27, 2004
.Dd July 5, 2005
.Dt NG_PPPOE 4
.Os
.Sh NAME
@ -214,15 +214,6 @@ This node shuts down upon receipt of a
control message, when all session have been disconnected or when the
.Dv ethernet
hook is disconnected.
.Sh SYSCTL VARIABLES
The variable
.Va net.graph.nonstandard_pppoe
is a deprecated way to set
.Nm
client mode.
Consider using
.Dv NGM_PPPOE_SETMODE
or an appropriate option in your client software instead.
.Sh EXAMPLES
The following code uses
.Dv libnetgraph

View File

@ -52,7 +52,6 @@
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/errno.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <net/ethernet.h>
@ -277,43 +276,6 @@ struct PPPOE {
};
typedef struct PPPOE *priv_p;
/* Deprecated sysctl, leaved here to keep compatibility for some time */
#define PPPOE_SYSCTL_KEEPSTANDARD -1
#define PPPOE_SYSCTL_STANDARD 0
#define PPPOE_SYSCTL_NONSTANDARD 1
static int pppoe_mode = PPPOE_SYSCTL_KEEPSTANDARD;
static const struct ng_pppoe_mode_t *sysctl_mode = ng_pppoe_modes;
static int
ngpppoe_set_ethertype(SYSCTL_HANDLER_ARGS)
{
int error;
int val;
val = pppoe_mode;
error = sysctl_handle_int(oidp, &val, sizeof(int), req);
if (error != 0 || req->newptr == NULL)
return (error);
switch (val) {
case PPPOE_SYSCTL_NONSTANDARD:
sysctl_mode = ng_pppoe_modes + 1;
break;
case PPPOE_SYSCTL_STANDARD:
case PPPOE_SYSCTL_KEEPSTANDARD:
sysctl_mode = ng_pppoe_modes;
break;
default:
return (EINVAL);
}
pppoe_mode = val;
printf("net.graph.nonstandard_pppoe is deprecated. See ng_pppoe(4), ppp(8).\n");
return (0);
}
SYSCTL_PROC(_net_graph, OID_AUTO, nonstandard_pppoe, CTLTYPE_INT | CTLFLAG_RW,
0, sizeof(int), ngpppoe_set_ethertype, "I", "select normal or stupid ISP");
union uniq {
char bytes[sizeof(void *)];
void * pointer;
@ -632,7 +594,7 @@ ng_pppoe_constructor(node_p node)
privdata->node = node;
/* Initialize to standard mode (the first one in ng_pppoe_modes[]). */
privdata->mode = sysctl_mode;
privdata->mode = &ng_pppoe_modes[0];
return (0);
}