Commit Graph

7 Commits

Author SHA1 Message Date
Brooks Davis
9bf40ede4a Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.

This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.

Approved By:	re (in principle)
Reviewed By:	njl, imp
Tested On:	i386, amd64, sparc64
Obtained From:	NetBSD (if_xname)
2003-10-31 18:32:15 +00:00
Robert Watson
dbf4bdffd9 Remove extraneous reference to intrq.h, which broke the kernel build. 2003-04-21 03:17:27 +00:00
Bill Paul
7dd982591b Some more updates for the new world order:
- Make transmission of packets work again. This stopped working because
  ether_ifattach() was forcing ifp->if_output to be ether_output() and
  clobbering our attempt to override this vector with a pointer to
  ng_fec_output(). Move the overriding of ifp->if_output to after
  ether_ifattach().

- Abandon the use of the netgraph ng_ether_input_p hook for snagging
  incoming frames, and instead override the ifp->if_input vector for
  interfaces that have been aggregated into our bundle. (I would have
  loved to have written things this way in the first place, but I
  didn't want to have to be the one to implement the if_input hook
  and change all the drivers.) This avoids collisions with the ng_ether
  module, which uses the same hook. Each aggregated device now calls
  ng_fec_input() directly, which then fakes up the rcvif pointer
  before invoking ifp->if_input itself.

This module should actually work now.
2003-02-26 19:49:32 +00:00
Bill Paul
0aef141cd0 Attempt to make the ng_fec module play nice with BPF again. Things have
changed since this code was written:

- The ng_ether_input_p hook only accepts two arguments now: the pointer
  to the ether header structure is gone.

- It's no longer necessary to cons up a fake ether header before passing
  incoming packets to BPF_MTAP().

ng_fec_input() has been modified to account for these two changes.
Running tcpdump on fec0 should work now.

PR:	kern/46720
2003-02-26 06:38:54 +00:00
Julian Elischer
6282381da2 Make ng_fec.c compile again since Sam's changes.
Submitted by:	Hiten Pandya (hiten@unixdaemons.com)
2002-12-23 22:31:24 +00:00
Julian Elischer
3a114c5de9 ifnet_addrs doesn;t exist any more so use
TAILQ_FIRST(&ifp->if_addrhead) to find the link layer ifaddr.
(it's always first I believe)
Allows this to compile on -current.
 .. need testers with FEC capable switches..
2002-11-01 23:09:15 +00:00
Julian Elischer
6da3d5ce7f Finally get around to committing Bill Paul's FEC netgraph nodes.
These are really only partly netgraph nodes as they do not use the
netgraph interfaces for many of the functions for which they could
be used, however they represent important functionality.

Submitted by:	wpaul
MFC after: 2 days
2002-10-29 19:12:44 +00:00