summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2000-05-23 20:41:01 +0000
committerjake <jake@FreeBSD.org>2000-05-23 20:41:01 +0000
commitd93fbc99166053b75c2eeb69b5cb603cfaf79ec0 (patch)
treea4f130be4544ce7cfe4afa8c93f996b871433cb8 /sys/netgraph
parente814d2a0db522b0f163eef55a56d05aa226951f3 (diff)
downloadFreeBSD-src-d93fbc99166053b75c2eeb69b5cb603cfaf79ec0.zip
FreeBSD-src-d93fbc99166053b75c2eeb69b5cb603cfaf79ec0.tar.gz
Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/netgraph.h10
-rw-r--r--sys/netgraph/ng_base.c6
-rw-r--r--sys/netgraph/ng_ppp.c4
-rw-r--r--sys/netgraph/ng_socket.c2
-rw-r--r--sys/netgraph/ng_socketvar.h2
5 files changed, 12 insertions, 12 deletions
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index 7b04409..89e955f 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -61,7 +61,7 @@ struct ng_hook {
int refs; /* dont actually free this till 0 */
struct ng_hook *peer; /* the other end of this link */
struct ng_node *node; /* The node this hook is attached to */
- LIST_ENTRY(ng_hook) hooks; /* linked list of all hooks on node */
+ LIST_ENTRY(struct ng_hook) hooks; /* linked list of all hooks on node */
};
typedef struct ng_hook *hook_p;
@@ -81,9 +81,9 @@ struct ng_node {
int colour; /* for graph colouring algorithms */
void *private; /* node type dependant node ID */
ng_ID_t ID; /* Unique per node */
- LIST_HEAD(hooks, ng_hook) hooks; /* linked list of node hooks */
- LIST_ENTRY(ng_node) nodes; /* linked list of all nodes */
- LIST_ENTRY(ng_node) idnodes; /* ID hash collision list */
+ LIST_HEAD(hooks, struct ng_hook) hooks; /* linked list of node hooks */
+ LIST_ENTRY(struct ng_node) nodes; /* linked list of all nodes */
+ LIST_ENTRY(struct ng_node) idnodes; /* ID hash collision list */
};
typedef struct ng_node *node_p;
@@ -177,7 +177,7 @@ struct ng_type {
const struct ng_cmdlist *cmdlist; /* commands we can convert */
/* R/W data private to the base netgraph code DON'T TOUCH! */
- LIST_ENTRY(ng_type) types; /* linked list of all types */
+ LIST_ENTRY(struct ng_type) types; /* linked list of all types */
int refs; /* number of instances */
};
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index 1c0d80e..037ad04 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -66,14 +66,14 @@
MODULE_VERSION(netgraph, 1);
/* List of all nodes */
-static LIST_HEAD(, ng_node) nodelist;
+static LIST_HEAD(, struct ng_node) nodelist;
/* List of installed types */
-static LIST_HEAD(, ng_type) typelist;
+static LIST_HEAD(, struct ng_type) typelist;
/* Hash releted definitions */
#define ID_HASH_SIZE 32 /* most systems wont need even this many */
-static LIST_HEAD(, ng_node) ID_hash[ID_HASH_SIZE];
+static LIST_HEAD(, struct ng_node) ID_hash[ID_HASH_SIZE];
/* Don't nead to initialise them because it's a LIST */
/* Internal functions */
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index ba1dacf..83f7d77 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -131,7 +131,7 @@ struct ng_ppp_frag {
struct timeval timestamp; /* time of reception */
struct mbuf *data; /* Fragment data */
meta_p meta; /* Fragment meta */
- CIRCLEQ_ENTRY(ng_ppp_frag) f_qent; /* Fragment queue */
+ CIRCLEQ_ENTRY(struct ng_ppp_frag) f_qent; /* Fragment queue */
};
/* We use integer indicies to refer to the non-link hooks */
@@ -195,7 +195,7 @@ struct ng_ppp_private {
int activeLinks[NG_PPP_MAX_LINKS]; /* indicies */
u_int lastLink; /* for round robin */
hook_p hooks[HOOK_INDEX_MAX]; /* non-link hooks */
- CIRCLEQ_HEAD(ng_ppp_fraglist, ng_ppp_frag) /* fragment queue */
+ CIRCLEQ_HEAD(ng_ppp_fraglist, struct ng_ppp_frag) /* fragment queue */
frags;
int qlen; /* fraq queue length */
struct callout_handle fragTimer; /* fraq queue check */
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c
index 6a3266c..08c8c91 100644
--- a/sys/netgraph/ng_socket.c
+++ b/sys/netgraph/ng_socket.c
@@ -142,7 +142,7 @@ static u_long ngpdg_sendspace = 2 * 1024; /* really max datagram size */
static u_long ngpdg_recvspace = 20 * 1024;
/* List of all sockets */
-LIST_HEAD(, ngpcb) ngsocklist;
+LIST_HEAD(, struct ngpcb) ngsocklist;
#define sotongpcb(so) ((struct ngpcb *)(so)->so_pcb)
diff --git a/sys/netgraph/ng_socketvar.h b/sys/netgraph/ng_socketvar.h
index df9cba3..3654bbe 100644
--- a/sys/netgraph/ng_socketvar.h
+++ b/sys/netgraph/ng_socketvar.h
@@ -47,7 +47,7 @@
struct ngpcb {
struct socket *ng_socket; /* the socket */
struct ngsock *sockdata; /* netgraph info */
- LIST_ENTRY(ngpcb) socks; /* linked list of sockets */
+ LIST_ENTRY(struct ngpcb) socks; /* linked list of sockets */
int type; /* NG_CONTROL or NG_DATA */
};
OpenPOWER on IntegriCloud