summaryrefslogtreecommitdiffstats
path: root/lib/libnetgraph
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2014-04-27 08:13:43 +0000
committersjg <sjg@FreeBSD.org>2014-04-27 08:13:43 +0000
commit0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e (patch)
treeb92e741b68057a24e381faa9809f32030d65574c /lib/libnetgraph
parentc244fcbcaa61dc2a15995e7dbdf3ae8107bc2111 (diff)
parent69c3e6933b6946c49fe99b19986f018d71621980 (diff)
downloadFreeBSD-src-0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e.zip
FreeBSD-src-0c7e03a54c8e7ddc9c3fe710f83d9ca53173692e.tar.gz
Merge head
Diffstat (limited to 'lib/libnetgraph')
-rw-r--r--lib/libnetgraph/debug.c2
-rw-r--r--lib/libnetgraph/netgraph.34
-rw-r--r--lib/libnetgraph/sock.c11
3 files changed, 9 insertions, 8 deletions
diff --git a/lib/libnetgraph/debug.c b/lib/libnetgraph/debug.c
index dfc75f5..6d0579f 100644
--- a/lib/libnetgraph/debug.c
+++ b/lib/libnetgraph/debug.c
@@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$");
#include <netgraph/ng_eiface.h>
#include <netgraph/ng_etf.h>
#include <netgraph/ng_ether.h>
-#include <netgraph/ng_fec.h>
#include <netgraph/ng_frame_relay.h>
#include <netgraph/ng_gif.h>
#include <netgraph/ng_gif_demux.h>
@@ -136,7 +135,6 @@ static const struct ng_cookie cookies[] = {
COOKIE(EIFACE),
COOKIE(ETF),
COOKIE(ETHER),
- COOKIE(FEC),
COOKIE(FRAMERELAY),
COOKIE(GIF),
COOKIE(GIF_DEMUX),
diff --git a/lib/libnetgraph/netgraph.3 b/lib/libnetgraph/netgraph.3
index d2ef8bd..bd55797 100644
--- a/lib/libnetgraph/netgraph.3
+++ b/lib/libnetgraph/netgraph.3
@@ -35,7 +35,7 @@
.\" $FreeBSD$
.\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $
.\"
-.Dd January 27, 2004
+.Dd November 25, 2013
.Dt NETGRAPH 3
.Os
.Sh NAME
@@ -57,7 +57,7 @@
.Sh LIBRARY
.Lb libnetgraph
.Sh SYNOPSIS
-.In netgraph.h
+.In netgraph/netgraph.h
.Ft int
.Fn NgMkSockNode "const char *name" "int *csp" "int *dsp"
.Ft int
diff --git a/lib/libnetgraph/sock.c b/lib/libnetgraph/sock.c
index 5f9f563..12603d3 100644
--- a/lib/libnetgraph/sock.c
+++ b/lib/libnetgraph/sock.c
@@ -111,9 +111,12 @@ gotNode:
/* Save node name */
strlcpy(namebuf, name, sizeof(namebuf));
} else if (dsp != NULL) {
- u_char rbuf[sizeof(struct ng_mesg) + sizeof(struct nodeinfo)];
- struct ng_mesg *const resp = (struct ng_mesg *) rbuf;
- struct nodeinfo *const ni = (struct nodeinfo *) resp->data;
+ union {
+ u_char rbuf[sizeof(struct ng_mesg) +
+ sizeof(struct nodeinfo)];
+ struct ng_mesg res;
+ } res;
+ struct nodeinfo *const ni = (struct nodeinfo *) res.res.data;
/* Find out the node ID */
if (NgSendMsg(cs, ".", NGM_GENERIC_COOKIE,
@@ -123,7 +126,7 @@ gotNode:
NGLOG("send nodeinfo");
goto errout;
}
- if (NgRecvMsg(cs, resp, sizeof(rbuf), NULL) < 0) {
+ if (NgRecvMsg(cs, &res.res, sizeof(res.rbuf), NULL) < 0) {
errnosv = errno;
if (_gNgDebugLevel >= 1)
NGLOG("recv nodeinfo");
OpenPOWER on IntegriCloud