Commit Graph

108 Commits

Author SHA1 Message Date
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
kardel
de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
elad
874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
yamt
95b350ea52 ppp_dequeue: fix a mbuf leak/packet loss introduced by rev.1.104. 2006-01-02 01:42:36 +00:00
christos
cab48fd783 PR/5901: Felix A. Croes: PPP fast queue blocks traffic at normal priority.
Applied fix, similar to the one suggested in the PR. We use a counter to
limit the number of consecutive packets accepted from the fast queue. This
number can be set via ioctl, but this has not been implemented. Since there
are only 2 queues other proposed solutions such as ALTQ are overkill and
they have not been implemented in the past 7 years. Now LCP echos can be
used to detect that the line is up.
2005-12-28 08:13:24 +00:00
thorpej
63eac52bac ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
thorpej
7d00e1aff3 Overhaul how TTY line disciplines are handled:
- Replace references to linesw[0] with a ttyldisc_default() function
  that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
  ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
  registering those disciplines with the system.  The linesw
  structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
  be held.  ttyldisc_release() releases the reference.  Attempts to
  detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
  that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().
2005-11-27 05:35:52 +00:00
christos
333e176687 - sprinkle const
- remove unneeded casts
- use more mem*() instead of b*() funcs.
2005-05-29 21:22:52 +00:00
christos
362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
christos
72ad9c4bc4 no point in assigning to ifq twice. 2005-03-31 21:19:35 +00:00
explorer
fcc0a1f852 Fix error with ifq not being set before use. Explicitly set it to NULL just before it may be set to the fastq, since if this becomes a loop (and in one case already is) this will always work. ifq_enqueue2() is designed to handle this case. 2005-03-31 17:07:39 +00:00
christos
d7ec95d370 factor out the interface queueing code into two functions. One used by
the non point-to-point interfaces that has one queue, and one used by
the point to point interfaces that has two queues. No functional changes.
XXX: The ALTQ stuff makes the code ugly.
XXX: More cleanup to come
2005-03-31 15:48:13 +00:00
perry
f07677dd81 nuke trailing whitespace 2005-02-26 22:45:09 +00:00
christos
6d413e70c4 pasto: simple_lock -> simple_unlock. 2004-12-05 15:03:13 +00:00
peter
cf47c76c1b Don't forget to call bpfdetach in the clone destroy function.
While here, add a missing static and change some spaces to tabs.
2004-12-05 15:00:47 +00:00
he
fdd8e7a3e5 Fix an obvious typo: scf -> sc. Discovered while compiling for x68k. 2004-12-05 13:32:03 +00:00
christos
7a05522334 void in arg prototype. 2004-12-05 05:42:19 +00:00
christos
f11e795a0f Make ppp a cloning device. Based on the work of Quentin Garnier. 2004-12-05 04:15:16 +00:00
dyoung
225bd76ac3 I changed pppoutput to use M_PREPEND. pppoutput was duplicating
the functionality of M_PREPEND, but with a bug: m_pkthdr.len was
not updated in pppoutput as it is in M_PREPEND.

Also, replace the loop that measures the length of the mbuf chain
with a call to m_length.

This fixes a PR from an anonymous bug reporter.  Thank you, anonymous
bug reporter.  Thanks, Itojun, for bringing the anonymous bug report
to my attention.
2004-07-03 18:11:33 +00:00
itojun
d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
mycroft
8655a8eb83 Also, if we're going to bail, we should free the memory we just allocated... 2003-10-28 20:16:28 +00:00
mycroft
52beeea9f1 Previous patch created a dead break. 2003-10-28 20:15:19 +00:00
christos
125ccd91b1 Fix uninitialized variable warnings 2003-10-25 18:29:12 +00:00
christos
ab661a6a58 Add a new ioctl PPPIOCGRAWIN to get the last characters we got from the
remote site.
2003-09-01 16:51:25 +00:00
itojun
860a851ea8 KNF 2003-05-02 03:15:23 +00:00
christos
e950c1ac8f PR/20844: Iain Hibbert: PPP Compressors cannot be loaded as LKM 2003-03-27 17:50:06 +00:00
simonb
221db74413 Remove variable that is only assigned too but not referenced. 2003-01-19 23:44:03 +00:00
itojun
8b1cd24b78 backout previous two - if you use ppp* interface, kernel panics instantly.
it is apparent that the change was untested, and severety is high.
2002-10-02 02:27:54 +00:00
augustss
7656699497 Remove unused variable so the file compiles again. 2002-09-25 23:24:37 +00:00
darrenr
4c314b9a9f Keep m_pkthdr.len updated correctly and use it rather than a loop to find
out the total length of the packet.
2002-09-25 16:10:15 +00:00
itojun
fb05cd3dd3 new copyright boilerplate from CMU. from openbsd 2002-07-01 22:09:31 +00:00
matt
17b32e3800 Make ppp_softc[] extern and declare in if_ppp.c 2002-05-12 20:38:15 +00:00
atatat
31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
itojun
ac36f7cb2c bring in latest ALTQ from kjc. ALTQify some of the drivers. 2002-03-05 04:12:57 +00:00
kleink
67dfac7357 Include <machine/intr.h> unconditionally, instead of only doing so if
__HAVE_GENERIC_SOFT_INTERRUPTS and relying on <sys/param.h> to provide it
otherwise; pointed out by Aymeric Vincent.
2002-01-14 18:19:15 +00:00
lukem
64a432d965 remove unnecessary #if NFOO > 0 .... #endif wrappers 2001-11-13 00:49:35 +00:00
lukem
34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
jdolecek
74954dadf9 use unsigned variable types as appropriate 2001-08-05 18:07:51 +00:00
thorpej
cbf41a143a bzero -> memset 2001-07-18 16:43:09 +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
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
569e9a31e2 For SLIP/STRIP/PPP, use generic soft interrupts, if available. 2001-01-15 16:33:30 +00:00
thorpej
ed7695a765 Fill in if_dlt. 2000-12-18 19:44:33 +00:00
thorpej
66539b9373 Add ALTQ support. 2000-12-18 18:57:21 +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
wiz
75311ca708 Fix typo (thinko?), which didn't allow MRU to be set below the default
value (instead of the minimum value). Patch supplied by Stephen Degler
in PR #9945, and reviewed by Ignatios Souvatzis.
2000-10-26 01:26:15 +00:00
onoe
3ec2a62f74 unique #include opt_inet.h 2000-10-06 04:49:53 +00:00
itojun
6b9793517d need opt_inet.h for #ifdef INET 2000-10-04 02:51:18 +00:00
itojun
dd859d3462 enable VJC only with INET 2000-10-02 03:54:10 +00:00