diff options
author | julian <julian@FreeBSD.org> | 1999-11-06 19:27:04 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-11-06 19:27:04 +0000 |
commit | 648f67c4141dc679ccd5818f7d9fef1afdc08daf (patch) | |
tree | a329da130e5aff591ff3ad5da3240fb3ed06ec50 | |
parent | 9282c2bbd50c8186d6ebe7bda5c0aa8c77af3966 (diff) | |
download | FreeBSD-src-648f67c4141dc679ccd5818f7d9fef1afdc08daf.zip FreeBSD-src-648f67c4141dc679ccd5818f7d9fef1afdc08daf.tar.gz |
Move a structure Netstat needs back out to ng_socketvar.h (yech)
-rw-r--r-- | sys/netgraph/ng_socket.c | 19 | ||||
-rw-r--r-- | sys/netgraph/ng_socketvar.h | 2 |
2 files changed, 3 insertions, 18 deletions
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 87538bc..b13fea3 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 5451524..df9cba3 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_ */ |