summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netgraph/ng_pppoe.c62
-rw-r--r--sys/netgraph/ng_pppoe.h18
2 files changed, 40 insertions, 40 deletions
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c
index 3f0ff68..2d3bb62 100644
--- a/sys/netgraph/ng_pppoe.c
+++ b/sys/netgraph/ng_pppoe.c
@@ -65,31 +65,31 @@
* sample node. These methods define the netgraph 'type'.
*/
-static int ng_PPPoE_constructor(node_p *node);
-static int ng_PPPoE_rcvmsg(node_p node, struct ng_mesg *msg,
+static int ng_pppoe_constructor(node_p *node);
+static int ng_pppoe_rcvmsg(node_p node, struct ng_mesg *msg,
const char *retaddr, struct ng_mesg **resp);
-static int ng_PPPoE_rmnode(node_p node);
-static int ng_PPPoE_newhook(node_p node, hook_p hook, const char *name);
-static int ng_PPPoE_connect(hook_p hook);
-static int ng_PPPoE_rcvdata(hook_p hook, struct mbuf *m, meta_p meta);
-static int ng_PPPoE_disconnect(hook_p hook);
+static int ng_pppoe_rmnode(node_p node);
+static int ng_pppoe_newhook(node_p node, hook_p hook, const char *name);
+static int ng_pppoe_connect(hook_p hook);
+static int ng_pppoe_rcvdata(hook_p hook, struct mbuf *m, meta_p meta);
+static int ng_pppoe_disconnect(hook_p hook);
/* Netgraph node type descriptor */
static struct ng_type typestruct = {
NG_VERSION,
NG_PPPOE_NODE_TYPE,
NULL,
- ng_PPPoE_constructor,
- ng_PPPoE_rcvmsg,
- ng_PPPoE_rmnode,
- ng_PPPoE_newhook,
+ ng_pppoe_constructor,
+ ng_pppoe_rcvmsg,
+ ng_pppoe_rmnode,
+ ng_pppoe_newhook,
NULL,
- ng_PPPoE_connect,
- ng_PPPoE_rcvdata,
- ng_PPPoE_rcvdata,
- ng_PPPoE_disconnect
+ ng_pppoe_connect,
+ ng_pppoe_rcvdata,
+ ng_pppoe_rcvdata,
+ ng_pppoe_disconnect
};
-NETGRAPH_INIT(PPPoE, &typestruct);
+NETGRAPH_INIT(pppoe, &typestruct);
/*
* States for the session state machine.
@@ -463,7 +463,7 @@ AAA
* to creatednodes that depend on hardware (unless you can add the hardware :)
*/
static int
-ng_PPPoE_constructor(node_p *nodep)
+ng_pppoe_constructor(node_p *nodep)
{
priv_p privdata;
int error;
@@ -496,7 +496,7 @@ AAA
* debug: copies of data sent out here (when I write the code).
*/
static int
-ng_PPPoE_newhook(node_p node, hook_p hook, const char *name)
+ng_pppoe_newhook(node_p node, hook_p hook, const char *name)
{
const priv_p privp = node->private;
sessp sp;
@@ -533,11 +533,11 @@ AAA
* Always free the message.
*/
static int
-ng_PPPoE_rcvmsg(node_p node,
+ng_pppoe_rcvmsg(node_p node,
struct ng_mesg *msg, const char *retaddr, struct ng_mesg **rptr)
{
priv_p privp = node->private;
- struct ngPPPoE_init_data *ourmsg = NULL;
+ struct ngpppoe_init_data *ourmsg = NULL;
struct ng_mesg *resp = NULL;
int error = 0;
hook_p hook = NULL;
@@ -552,11 +552,11 @@ AAA
case NGM_PPPOE_CONNECT:
case NGM_PPPOE_LISTEN:
case NGM_PPPOE_OFFER:
- ourmsg = (struct ngPPPoE_init_data *)msg->data;
+ ourmsg = (struct ngpppoe_init_data *)msg->data;
if (( sizeof(*ourmsg) > msg->header.arglen)
|| ((sizeof(*ourmsg) + ourmsg->data_len)
> msg->header.arglen)) {
- printf("PPPoE_rcvmsg: bad arg size");
+ printf("pppoe_rcvmsg: bad arg size");
LEAVE(EMSGSIZE);
}
if (ourmsg->data_len > PPPOE_SERVICE_NAME_SIZE) {
@@ -626,13 +626,13 @@ AAA
switch (msg->header.cmd) {
case NGM_PPPOE_GET_STATUS:
{
- struct ngPPPoEstat *stats;
+ struct ngpppoestat *stats;
NG_MKRESPONSE(resp, msg, sizeof(*stats), M_NOWAIT);
if (!resp) {
LEAVE(ENOMEM);
}
- stats = (struct ngPPPoEstat *) resp->data;
+ stats = (struct ngpppoestat *) resp->data;
stats->packets_in = privp->packets_in;
stats->packets_out = privp->packets_out;
break;
@@ -758,7 +758,7 @@ AAA
* if we use up this data or abort we must free BOTH of these.
*/
static int
-ng_PPPoE_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
+ng_pppoe_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
{
node_p node = hook->node;
const priv_p privp = node->private;
@@ -1216,7 +1216,7 @@ quit:
* we'd only remove our links and reset ourself.
*/
static int
-ng_PPPoE_rmnode(node_p node)
+ng_pppoe_rmnode(node_p node)
{
const priv_p privdata = node->private;
@@ -1235,7 +1235,7 @@ AAA
* It gives us a chance to balk at the last minute.
*/
static int
-ng_PPPoE_connect(hook_p hook)
+ng_pppoe_connect(hook_p hook)
{
/* be really amiable and just say "YUP that's OK by me! " */
return (0);
@@ -1248,7 +1248,7 @@ ng_PPPoE_connect(hook_p hook)
* For this type, removal of the last link destroys the node
*/
static int
-ng_PPPoE_disconnect(hook_p hook)
+ng_pppoe_disconnect(hook_p hook)
{
node_p node = hook->node;
priv_p privp = node->private;
@@ -1460,12 +1460,12 @@ pppoe_send_event(sessp sp, enum cmd cmdid)
{
int error;
struct ng_mesg *msg;
- struct ngPPPoE_sts *sts;
+ struct ngpppoe_sts *sts;
AAA
NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, cmdid,
- sizeof(struct ngPPPoE_sts), M_NOWAIT);
- sts = (struct ngPPPoE_sts *)msg->data;
+ sizeof(struct ngpppoe_sts), M_NOWAIT);
+ sts = (struct ngpppoe_sts *)msg->data;
strncpy(sts->hook, sp->hook->name, NG_HOOKLEN + 1);
error = ng_send_msg(sp->hook->node, msg, sp->creator, NULL);
return (error);
diff --git a/sys/netgraph/ng_pppoe.h b/sys/netgraph/ng_pppoe.h
index 6e71f6f..04bec47 100644
--- a/sys/netgraph/ng_pppoe.h
+++ b/sys/netgraph/ng_pppoe.h
@@ -47,7 +47,7 @@
* Netgraph hook constants etc.
********************************************************************/
/* Node type name. This should be unique among all netgraph node types */
-#define NG_PPPOE_NODE_TYPE "PPPoE"
+#define NG_PPPOE_NODE_TYPE "pppoe"
#define NGM_PPPOE_COOKIE 939032003
@@ -81,7 +81,7 @@ enum cmd {
* Structures passed in the various netgraph command messages.
***********************/
/* This structure is returned by the NGM_PPPOE_GET_STATUS command */
-struct ngPPPoEstat {
+struct ngpppoestat {
u_int packets_in; /* packets in from downstream */
u_int packets_out; /* packets out towards downstream */
};
@@ -104,7 +104,7 @@ struct ngPPPoEstat {
* named hook. The session will then issue the appropriate PADO
* and begin negotiation.
*/
-struct ngPPPoE_init_data {
+struct ngpppoe_init_data {
char hook[NG_HOOKLEN + 1]; /* hook to monitor on */
u_int16_t data_len; /* Length of the service name */
char data[0]; /* init data goes here */
@@ -115,13 +115,13 @@ struct ngPPPoE_init_data {
* (to report which hook has failed or connected). The message is sent
* to whoever requested the connection. (close may use this too).
*/
-struct ngPPPoE_sts {
+struct ngpppoe_sts {
char hook[NG_HOOKLEN + 1]; /* hook associated with event session */
};
/********************************************************************
- * Constants and definitions specific to PPPoE
+ * Constants and definitions specific to pppoe
********************************************************************/
#define PPPOE_TIMEOUT_LIMIT 64
@@ -147,8 +147,8 @@ struct ngPPPoE_sts {
#define PTT_SYS_ERR (0x0202)
#define PTT_GEN_ERR (0x0203)
-#define ETHERTYPE_PPPOE_DISC 0x8863 /* PPPoE discovery packets */
-#define ETHERTYPE_PPPOE_SESS 0x8864 /* PPPoE session packets */
+#define ETHERTYPE_PPPOE_DISC 0x8863 /* pppoe discovery packets */
+#define ETHERTYPE_PPPOE_SESS 0x8864 /* pppoe session packets */
#else
#define PTT_EOL (0x0000)
#define PTT_SRV_NAME (0x0101)
@@ -161,8 +161,8 @@ struct ngPPPoE_sts {
#define PTT_SYS_ERR (0x0202)
#define PTT_GEN_ERR (0x0302)
-#define ETHERTYPE_PPPOE_DISC 0x6388 /* PPPoE discovery packets */
-#define ETHERTYPE_PPPOE_SESS 0x6488 /* PPPoE session packets */
+#define ETHERTYPE_PPPOE_DISC 0x6388 /* pppoe discovery packets */
+#define ETHERTYPE_PPPOE_SESS 0x6488 /* pppoe session packets */
#endif
struct pppoe_tag {
OpenPOWER on IntegriCloud