aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1999-11-06 19:27:04 +0000
committerJulian Elischer <julian@FreeBSD.org>1999-11-06 19:27:04 +0000
commit0e12356c530ea2307a1303ea19c0264899b4ad21 (patch)
treea329da130e5aff591ff3ad5da3240fb3ed06ec50 /sys/netgraph
parent3de25e2f326e2fc278bc569bf26176fb5d761b87 (diff)
Notes
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_socket.c19
-rw-r--r--sys/netgraph/ng_socketvar.h2
2 files changed, 3 insertions, 18 deletions
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c
index 87538bc2aea84..b13fea3b915f3 100644
--- a/sys/netgraph/ng_socket.c
+++ b/sys/netgraph/ng_socket.c
@@ -68,6 +68,7 @@
#endif
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
+#include <netgraph/ng_socketvar.h>
#include <netgraph/ng_socket.h>
/*
@@ -96,24 +97,6 @@
* +----------------+
*/
-/* Netgraph protocol control block for each socket */
-struct ngpcb {
- struct socket *ng_socket; /* the socket */
- struct ngsock *sockdata; /* netgraph info */
- LIST_ENTRY(ngpcb) socks; /* linked list of sockets */
- int type; /* NG_CONTROL or NG_DATA */
-};
-
-/* Per-node private data */
-struct ngsock {
- struct ng_node *node; /* the associated netgraph node */
- struct ngpcb *datasock; /* optional data socket */
- struct ngpcb *ctlsock; /* optional control socket */
- int flags;
- int refs;
-};
-#define NGS_FLAG_NOLINGER 1 /* close with last hook */
-
/* Netgraph node methods */
static ng_constructor_t ngs_constructor;
static ng_rcvmsg_t ngs_rcvmsg;
diff --git a/sys/netgraph/ng_socketvar.h b/sys/netgraph/ng_socketvar.h
index 54515242df807..df9cba3f9de33 100644
--- a/sys/netgraph/ng_socketvar.h
+++ b/sys/netgraph/ng_socketvar.h
@@ -56,8 +56,10 @@ struct ngsock {
struct ng_node *node; /* the associated netgraph node */
struct ngpcb *datasock; /* optional data socket */
struct ngpcb *ctlsock; /* optional control socket */
+ int flags;
int refs;
};
+#define NGS_FLAG_NOLINGER 1 /* close with last hook */
#endif /* _NETGRAPH_NG_SOCKETVAR_H_ */