> Hello
>
> Heither of the original (http://people.freebsd.org/~wpaul/FEC/) not
> the in tree FEC implementations build.
Hi there. The reason it doesn't build is because, the ng_fec was
somehow left out when Sam Leffler was making changes to the
ether_if{de,at}tach() and bpf interfaces. Anyway, a complete fix, which
should be committed is attached with this mail.
Also, I believe you have used the implementation from wpaul's website.
Could you try using the `in-tree' version of the FEC Netgraph driver,
because many of the ifnet_addrs* related problems have been resolved in
it by julian@.
Cheers.
--
Hiten Pandya ([EMAIL PROTECTED], [EMAIL PROTECTED])
http://www.unixdaemons.com/~hiten/
Index: netgraph/ng_fec.c
===================================================================
RCS file: /home/hiten/ncvs/src/sys/netgraph/ng_fec.c,v
retrieving revision 1.2
diff -u -r1.2 ng_fec.c
--- netgraph/ng_fec.c 1 Nov 2002 23:09:15 -0000 1.2
+++ netgraph/ng_fec.c 21 Dec 2002 22:34:27 -0000
@@ -188,6 +188,10 @@
static void ng_fec_print_ioctl(struct ifnet *ifp, int cmd, caddr_t data);
#endif
+/* ng_ether_input_p - see sys/netgraph/ng_ether.c */
+extern void (*ng_ether_input_p)(struct ifnet *ifp, struct mbuf **mp,
+ struct ether_header *eh);
+
/* Netgraph methods */
static ng_constructor_t ng_fec_constructor;
static ng_rcvmsg_t ng_fec_rcvmsg;
@@ -760,7 +764,7 @@
mh.mh_next = m;
mh.mh_data = (char *)eh;
mh.mh_len = ETHER_HDR_LEN;
- bpf_mtap(bifp, (struct mbuf *)&mh);
+ BPF_MTAP(bifp, (struct mbuf *)&mh);
}
return;
@@ -977,8 +981,7 @@
if (m0 == NULL)
return;
- if (ifp->if_bpf)
- bpf_mtap(ifp, m0);
+ BPF_MTAP(ifp, m0);
/* Queue up packet on the proper port. */
error = ng_fec_choose_port(b, m0, &oifp);
@@ -1097,7 +1100,7 @@
ng_ether_input_p = ng_fec_input;
/* Attach the interface */
- ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
+ ether_ifattach(ifp, priv->arpcom.ac_enaddr);
callout_handle_init(&priv->fec_ch);
TAILQ_INIT(&b->ng_fec_ports);
@@ -1190,7 +1193,7 @@
if (ng_ether_input_p != NULL)
ng_ether_input_p = NULL;
- ether_ifdetach(&priv->arpcom.ac_if, ETHER_BPF_SUPPORTED);
+ ether_ifdetach(&priv->arpcom.ac_if);
ifmedia_removeall(&priv->ifmedia);
ng_fec_free_unit(priv->unit);
FREE(priv, M_NETGRAPH);
Index: modules/netgraph/fec/Makefile
===================================================================
RCS file: /home/hiten/ncvs/src/sys/modules/netgraph/fec/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- modules/netgraph/fec/Makefile 29 Oct 2002 19:12:44 -0000 1.1
+++ modules/netgraph/fec/Makefile 21 Dec 2002 22:57:09 -0000
@@ -4,7 +4,7 @@
SRCS= ng_fec.c opt_inet.h opt_inet6.h
#MAN4= ng_fec.4
NOMAN= yes
-KMODDEPS= netgraph
+MODULE_DEPEND= netgraph
CFLAGS += -DINET -DINET6