Commit Graph

1476 Commits

Author SHA1 Message Date
christos
a94f0325fe zlib 1.2.3 changed the include protection variable names; adjust. 2006-01-14 20:17:12 +00:00
christos
81a0859118 prepare for userland compilation. 2006-01-14 18:58:05 +00:00
christos
1482d7ce1c Make sure we initialize all structs to 0; from Xin LI 2006-01-09 13:04:38 +00:00
perry
23917a5e48 #ifdef _KERNEL some function prototypes and an inline function
definition.

XXX It may be that this file needs more namespace cleaning (or the
files that include it, like if.h, might need it.)
2006-01-04 21:10:09 +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
fffd2322a9 make this compile with no INET option 2005-12-28 09:08:20 +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
rpaulo
7eace3f40d Kill BPF_KERN_FILTER. Seems like it died with the new pppd import.
No replies from tech-kern@, but who introduced this option 8 years ago
(Christos) said it's ok to remove it.
2005-12-26 15:45:48 +00:00
perry
0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
rpaulo
08ac963d6f Correct typo in comments. 2005-12-14 22:46:52 +00:00
rpaulo
43bb9c133c Fix previous commit: ABS, IND and MSH are valid codes. 2005-12-14 20:33:46 +00:00
christos
49743c0da1 argument type conflict. 2005-12-14 00:28:08 +00:00
rpaulo
7174b22dd3 In bpf_validate(), get rid of bpf_maxbufsize test as there are other
clients of bpf_filter(), like if_ppp, that are not limited by
bpf_maxbufsize. The same check is done at the run time, so there is no
problem created.

Noticed by Guy Harris in private email.
2005-12-13 23:53:49 +00:00
thorpej
63eac52bac ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
christos
b41db3f2c3 Protect zlib.h with the same symbol as userland.
XXX: We should either not install this, or have only one copy.
2005-12-11 19:15:38 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
elad
976bf6cfdd Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
2005-12-10 23:21:38 +00:00
christos
a8ffde9f61 make the ALTQ macros statement-line, by wrapping them in do {} while (0) 2005-12-06 02:56:25 +00:00
rpaulo
5eb6226d2b Oops, the previous revision had a wrong pre-processor #if clause. 2005-12-05 22:38:40 +00:00
rpaulo
7246666eed Make the bpf_maxbufsize a constant when bpfilter pseudo-device is not
present in the kernel config, thus fixing the build. Problem reported
by Havard Eidnes. Solution proposed by Christos, thanks.
2005-12-05 21:46:00 +00:00
rpaulo
fe7fedbe4c PR 32198: bpf_validate() needs to do more checks, from Otto Moerbeek/OpenBSD
via Guy Harris.
Problems like out-of-bounds read/write in filter machine operations
were fixed.
2005-11-30 23:14:38 +00:00
rpaulo
5a418776bf More KNF. C99 uintXX_t types. 2005-11-30 22:40:59 +00:00
rpaulo
940d1d8665 Replace u_intXX_t by their C99 counterparts. 2005-11-30 16:47:58 +00:00
rpaulo
33ea9f9f29 Fix typo in comment found by Guy Harris (PR 32198). 2005-11-30 12:54:42 +00:00
rpaulo
6d95f3bed8 KNF. ANSYfy. de-P(). 2005-11-30 12:52:23 +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
yamt
11aa556068 fix a typo in a comment. 2005-11-23 09:43:37 +00:00
yamt
9a01903be3 correct SADB_X_MIGRATE. pointed by Francis Dupont. 2005-10-29 15:05:13 +00:00
yamt
78e012015b add some #if 0'ed out SADB_X_* definitions found in kame tree
to avoid conflicting numbers.
2005-10-25 06:12:49 +00:00
christos
86497ecc9f It is now ``later''. Follow cgd's 1993 wish and move struct osockaddr
and struct omsghdr to a compat header.
2005-09-24 15:52:03 +00:00
rpaulo
dc5a3ff210 Use ANSI function declarations everywhere and a consistent indentation on
them.
2005-09-05 18:32:24 +00:00
martin
ebe6c135ee Fix bogus uninitialized variable warning ifdef PPPOE_SERVER.
Noticed by Marcin Jessa on current-users.
2005-08-31 00:00:26 +00:00
yamt
2e85eff671 - introduce M_MOVE_PKTHDR and use it where appropriate.
intended to be mostly API compatible with openbsd/freebsd.
- remove a glue #define in netipsec/ipsec_osdep.h.
2005-08-18 00:30:58 +00:00
yamt
03661e8f33 include callout.h explicitly. 2005-08-12 10:02:31 +00:00
kiyohara
bbebe4a265 Using DLT_APPLE_IP_OVER_IEEE1394. 2005-08-06 14:09:54 +00:00
rpaulo
2fcfc4c276 Implemented the kernel part of BPF statistics and BPF peers, net.bpf.stats
and net.bpf.peers sysctls respectively.

A new structure was added to describe the external (user viewable)
representation of a BPF file; a new entry was added to the bpf_d
structure to store the PID of the calling process; a simple_lock was added
to protect the insert/removal from the net.bpf.peers sysctl handler.

This idea came from FreeBSD (Christian S.J. Peron) but while it is
implemented with sysctl's it differs a bit.

Reviewed by: christos@ and atatat@ (who gave me the tip for the net.bpf.peers
sysctl helper function).
2005-08-04 19:30:47 +00:00
dyoung
1d1035405a Add members ifr_buf, ifr_buflen to ifreq for specifying the location
and size of a userland buffer.  The kernel shall not copyout more
than ifr_buflen bytes to ifr_buf.  For future ioctls that use
ifr_buf and ifr_buflen instead of ifr_data, the kernel can return
a larger struct in the future than when the ioctl is introduced,
without breaking ABI compatibility, provided that the size, order,
and semantics of the fields at the front of the struct does not
change.
2005-07-27 06:36:15 +00:00
gdt
b0239c745e Add PR_PURGEIF flag for protocols to indicate that the protocol might
store a struct ifnet *, and define it for udp/tcp/rawip for INET and
INET6.  When deleting a struct ifnet, invoke PRU_PURGEIF on all
protocols marked with PR_PURGEIF.  Closes PR kern/29580 (mine).
2005-07-19 12:58:24 +00:00
kiyohara
c1a84a4d12 ieee1394 import from FreeBSD. 2005-07-11 15:29:05 +00:00
seanb
262c8cc8a7 - Rearranged layout of struct bridge_iflist slightly to
make members naturally aligned.
- This saves 8 bytes worth of pad.
2005-06-28 20:09:44 +00:00
christos
853504efa1 Add some casts to appease lint 2005-06-28 15:33:27 +00:00
christos
bbfb3b7295 Names could be const. 2005-06-26 21:18:00 +00:00
christos
305da7ae35 de-lint some pointer casts. 2005-06-26 20:55:44 +00:00
mlelstv
d23f1d6e16 expire cached route. Fixes PR 22792. 2005-06-26 10:39:21 +00:00
peter
26b3362b67 Missing m_freem() in bpf_write. PR/29138. 2005-06-22 10:36:16 +00:00
dyoung
9063402978 Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD.  Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]).  Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
2005-06-22 06:14:51 +00:00
atatat
df13e3579e Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
2005-06-20 02:49:18 +00:00
peter
6cfd105f3a Use 'pattr' consistently in the IFQ_* macros. 2005-06-19 11:34:42 +00:00
christos
137b9bc57b 30393/Miles Nordin: PF/ALTQ does not work on ppp(4) interfaces
This is because the mbuf chain created did not have a header.
2005-06-11 22:26:42 +00:00
bouyer
79824021ea As ether_input() is always called at IPL_NET, there is no need to
protect the IF_* operations with splnet()/splx().
2005-06-10 11:11:38 +00:00