summaryrefslogtreecommitdiffstats
path: root/sys/i4b/driver
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2000-11-09 12:27:31 +0000
committerhm <hm@FreeBSD.org>2000-11-09 12:27:31 +0000
commitfa7e377e8ca8cd0fad313c6055af7c3b5a514e70 (patch)
tree2db930951cb489d30396952865c2e28922be2176 /sys/i4b/driver
parenta27c8bf901097601bf9a53d4de2febd53b4e3b95 (diff)
downloadFreeBSD-src-fa7e377e8ca8cd0fad313c6055af7c3b5a514e70.zip
FreeBSD-src-fa7e377e8ca8cd0fad313c6055af7c3b5a514e70.tar.gz
Fix i4b netgraph interface to not kernel panic at boot time
Make code compile and work for FreeBSD 4.x as well as FreeBSD 5.x Submitted by: Michael Reifenberger <root@nihil.plaut.de>
Diffstat (limited to 'sys/i4b/driver')
-rw-r--r--sys/i4b/driver/i4b_ing.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/i4b/driver/i4b_ing.c b/sys/i4b/driver/i4b_ing.c
index 4c1119f..26a5b3b 100644
--- a/sys/i4b/driver/i4b_ing.c
+++ b/sys/i4b/driver/i4b_ing.c
@@ -31,7 +31,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Oct 10 17:18:21 2000]
+ * last edit-date: [Thu Nov 9 11:29:12 2000]
*
*---------------------------------------------------------------------------*/
@@ -218,7 +218,7 @@ static struct ng_type typestruct = {
ng_ing_cmdlist
};
-NETGRAPH_INIT(ing, &typestruct);
+NETGRAPH_INIT_ORDERED(ing, &typestruct, SI_SUB_DRIVERS, SI_ORDER_ANY);
/*===========================================================================*
* DEVICE DRIVER ROUTINES
@@ -630,9 +630,15 @@ ng_ing_newhook(node_p node, hook_p hook, const char *name)
* The response should be in a malloc'd region that the caller can 'free'.
* A response is not required.
*---------------------------------------------------------------------------*/
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
static int
ng_ing_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr,
struct ng_mesg **rptr, hook_p lasthook)
+#else
+static int
+ng_ing_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr,
+ struct ng_mesg **rptr)
+#endif
{
struct ing_softc *sc = node->private;
@@ -746,9 +752,14 @@ ng_ing_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr,
/*---------------------------------------------------------------------------*
* get data from another node and transmit it out on a B-channel
*---------------------------------------------------------------------------*/
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
static int
ng_ing_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
struct mbuf **ret_m, meta_p *ret_meta)
+#else
+static int
+ng_ing_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
+#endif
{
struct ing_softc *sc = hook->node->private;
struct ifqueue *xmitq_p;
OpenPOWER on IntegriCloud