Unify the input handling of the low-level network stack by introducing
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Fri, 23 Jul 2004 07:16:31 +0000 (07:16 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Fri, 23 Jul 2004 07:16:31 +0000 (07:16 +0000)
commit3013ac0eb439f3fd0de7634e6f09e40f695f05ac
tree69cf07671cad530296c873e06fc09092c1bbf4b1
parent79e0aa7947c286ba446ef164fa45808407d3bf89
Unify the input handling of the low-level network stack by introducing
a new field if_input in struct ifnet.

Initialize if_input and if_output in the low-level _ifattach routines.

Make the _output and _input routines static, they are now called via
(*ifp->if_input) and (*ifp->if_output) accordingly. The exception is
ether_input which is still used with the second argument, the pointer
to the Ethernet header instead of always taking it from the mbuf.

Move the if_attach and bpfattach from the devices into fddi_ifattach,
atm_ifattach.

Remove the first argument to VLAN_INPUT_TAG, the pointer to the
Ethernet header. Expect it at the beginning of the mbuf.

Adjust the network for the changed API. Exceptions are wl(4), le(4),
ie(4), el(4), ed(4) and de(4), because they use a on-stack Ethernet
header. Another exception is the ATM stack, which uses a fourth argument
to atm_input.

Inspired-by: NetBSd net/if.h, rev 1.36
72 files changed:
sys/bus/usb/usb_ethersubr.c
sys/bus/usb/usb_port.h
sys/contrib/dev/oltr/if_oltr.c
sys/dev/atm/en/midway.c
sys/dev/netif/an/if_an.c
sys/dev/netif/aue/if_aue.c
sys/dev/netif/awi/awi.c
sys/dev/netif/axe/if_axe.c
sys/dev/netif/bfe/if_bfe.c
sys/dev/netif/bge/if_bge.c
sys/dev/netif/cm/smc90cx6.c
sys/dev/netif/cs/if_cs.c
sys/dev/netif/cue/if_cue.c
sys/dev/netif/dc/if_dc.c
sys/dev/netif/de/if_de.c
sys/dev/netif/ed/if_ed.c
sys/dev/netif/el/if_el.c
sys/dev/netif/em/if_em.c
sys/dev/netif/ep/if_ep.c
sys/dev/netif/ex/if_ex.c
sys/dev/netif/fe/if_fe.c
sys/dev/netif/fwe/if_fwe.c
sys/dev/netif/fxp/if_fxp.c
sys/dev/netif/gx/if_gx.c
sys/dev/netif/ie/if_ie.c
sys/dev/netif/kue/if_kue.c
sys/dev/netif/le/if_le.c
sys/dev/netif/lge/if_lge.c
sys/dev/netif/lnc/if_lnc.c
sys/dev/netif/my/if_my.c
sys/dev/netif/nge/if_nge.c
sys/dev/netif/pcn/if_pcn.c
sys/dev/netif/pdq_layer/pdq_ifsubr.c
sys/dev/netif/ray/if_ray.c
sys/dev/netif/rdp/if_rdp.c
sys/dev/netif/re/if_re.c
sys/dev/netif/rl/if_rl.c
sys/dev/netif/sbni/if_sbni.c
sys/dev/netif/sbsh/if_sbsh.c
sys/dev/netif/sf/if_sf.c
sys/dev/netif/sis/if_sis.c
sys/dev/netif/sk/if_sk.c
sys/dev/netif/sn/if_sn.c
sys/dev/netif/snc/dp83932.c
sys/dev/netif/ste/if_ste.c
sys/dev/netif/ti/if_ti.c
sys/dev/netif/tl/if_tl.c
sys/dev/netif/tx/if_tx.c
sys/dev/netif/txp/if_txp.c
sys/dev/netif/vr/if_vr.c
sys/dev/netif/vx/if_vx.c
sys/dev/netif/wb/if_wb.c
sys/dev/netif/wi/if_wi.c
sys/dev/netif/wl/if_wl.c
sys/dev/netif/wx/if_wx.c
sys/dev/netif/xe/if_xe.c
sys/dev/netif/xl/if_xl.c
sys/net/ef/if_ef.c
sys/net/ethernet.h
sys/net/if_arc.h
sys/net/if_arcsubr.c
sys/net/if_atmsubr.c
sys/net/if_ethersubr.c
sys/net/if_fddisubr.c
sys/net/if_iso88025subr.c
sys/net/if_var.h
sys/net/iso88025.h
sys/net/tap/if_tap.c
sys/net/vlan/if_vlan.c
sys/netgraph/eiface/ng_eiface.c
sys/netgraph/fec/ng_fec.c
sys/netinet/if_fddi.h