Commit Graph

19 Commits

Author SHA1 Message Date
lukem 34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
itojun 4d51fe368b change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific
interfaces only).

was: if_lastchange get updated on every packet transmission/receipt.
now: if_lastchange get updated when IFF_UP is changed.
2001-06-14 05:44:23 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
wiz 1651c2430f Fix pasto reported in kern/12241 by Michael van Elst. 2001-02-28 14:08:35 +00:00
thorpej fc5dafc79b Fix a rather annoying problem where the sockaddr_dl which holds
the link level name for the interface (ifp->if_sadl) is allocated
before ifp->if_addrlen is initialized, which could lead to allocating
too little space for the link level address.

Do this by splitting allocation of the link level name out of
if_attach() and into if_alloc_sadl(), which is normally called
by functions like ether_ifattach().  Network interfaces which
don't have a link-specific attach routine must call if_alloc_sadl()
themselves (example: gif).

Link level names are freed by if_free_sadl(), which can be called
from e.g. ether_ifdetach().  Drivers never need call if_free_sadl()
themselves as if_detach() will do it if it is not already done.

While here, add the ability to pass an AF_LINK address to
SIOCSIFADDR in ether_ioctl() (this is what caused me to notice
the problem that the above fixes).
2001-01-17 00:30:49 +00:00
thorpej ed7695a765 Fill in if_dlt. 2000-12-18 19:44:33 +00:00
thorpej 3dc1664f57 Add ALTQ glue. 2000-12-13 22:07:50 +00:00
thorpej c5293456da Adapt to bpfattach() changes, and further centralize the bpfattach()
and bpfdetach() calls into link-type subroutines where possible.
2000-12-12 18:00:22 +00:00
itojun 1af3d80bce fix compilation without INET. 2000-10-02 03:53:07 +00:00
mycroft fbb147f69b Check the multicast bit in the header mbuf while interrupts are still blocked.
Otherwise we can run off into space if the packet was sent immediately and the
mbuf freed.
Pointed out by Boris Popov (not on our lists).
2000-06-14 05:10:27 +00:00
augustss c1ebd1929a Kill some more register declarations. 2000-03-30 09:45:33 +00:00
soren a4a133213f Add empty token_ifdetach(). 2000-02-27 03:04:09 +00:00
bad 6b30aed924 Fix thinko of mine in previous. The source route info is not at m->m_data
after various m_adj()s have been done.  Kludge around this with a cheesy
macro that knows where the drivers put the mac header in the first mbuf.

XXX There should be a better way to do this.
1999-05-30 00:39:07 +00:00
bad 0b3a9f9e00 Don't assume the Token-Ring source route is in the m_pktdat. Use
m_data instead.  This isn't a problem with ARP packets but is correct
way to this.

Noticed by pmara@cactus.org (Shashi Mara).
1999-05-29 22:36:07 +00:00
thorpej f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
bad 6bdc01f098 Fix version id strings in comment. 1999-04-08 15:53:31 +00:00
bad 8bb131360c Appease GCC.
#ifdef FreeBSD some debug code as is done if if_fddisubr.c.
1999-03-22 23:14:14 +00:00
bad a4e508928f Oops. RcsID police. 1999-03-22 23:01:36 +00:00
bad 52c3a56a05 Support routines for Token-Ring network drivers.
By Onno van der Linden.
1999-03-22 22:22:52 +00:00