Commit Graph

59 Commits

Author SHA1 Message Date
phk
8dcac09a03 Change suser_xxx() to suser() where it applies. 1999-04-27 12:21:16 +00:00
phk
b097bd1d95 Suser() simplification:
1:
  s/suser/suser_xxx/

2:
  Add new function: suser(struct proc *), prototyped in <sys/proc.h>.

3:
  s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/

The remaining suser_xxx() calls will be scrutinized and dealt with
later.

There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.

More changes to the suser() API will come along with the "jail" code.
1999-04-27 11:18:52 +00:00
dillon
1e80df272f Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 22:42:27 +00:00
eivind
1e372c62bf De-staticize and add prototype for main debug function. I'll turn
this into a DDB command in the next staticization run.
1999-01-12 12:09:27 +00:00
archie
84bd80a4f9 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
eivind
be1b08dba9 Staticize. 1998-11-26 18:50:24 +00:00
bde
3589262c68 Fixed printf format errors. 1998-08-17 01:05:25 +00:00
julian
100aaa7f15 fix broken loopback code for ddp (again)
Submitted by: Stefan Bethke <stb@hanse.de>
1998-08-04 23:17:05 +00:00
alex
638b70118b Typo fix: teh --> (the|they) 1998-07-30 02:27:41 +00:00
julian
322fc7915b Fix braino in last commit.
Not even sure how I got this commit in as it didn't even compile.
1998-07-13 06:34:02 +00:00
julian
9250a1cea8 Slight optimisation. Don't do the same calculation twice. 1998-07-09 02:00:02 +00:00
julian
e6febbec0e Go through the loopback code with a broom..
Remove lots'o'hacks.
looutput is now static.

Other callers who want to use loopback to allow shortcutting
should call the special entrypoint for this, if_simloop(), which is
specifically designed for this purpose. Using looutput for this purpose
was problematic, particularly with bpf and trying to keep track
of whether one should be using the charateristics of the loopback interface
or the interface (e.g. if_ethersubr.c) that was requesting the loopback.
There was a whole class of errors due to this mis-use each of which had
hacks to cover them up.

Consists largly of hack removal :-)
1998-06-12 03:48:19 +00:00
dfr
92449ad5fa This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
julian
19ecca4528 spurious ntohs calls were stopping some packets from being recognised
for what they are..
Taken from the netatalk mailing list. from a NetBSD user.
1998-06-05 06:55:37 +00:00
steve
64cf0792f0 Remove stray debug message.
PR:		6722
1998-05-24 03:25:24 +00:00
des
31722e83fd Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
phk
8396c1d18d Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.

Most uses of time.tv_sec now uses the new variable time_second instead.

gettime() changed to getmicrotime(0.

Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).

A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.

Add a new nfs_curusec() function.

Mark a couple of bogosities involving the now disappeard time variable.

Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.

Change profiling in ncr.c to use ticks instead of time.  Resolution is
the same.

Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.

Reviewed by:	bde
1998-03-30 09:56:58 +00:00
bde
d6ecf50e51 Removed unused #includes. 1998-02-25 13:08:07 +00:00
bde
0a6cc7edf3 Removed unused #includes. 1998-02-25 05:58:50 +00:00
eivind
86354cd8fc Staticize. 1998-02-09 06:11:36 +00:00
bde
8dbb898a8c Fixed pedantic syntax errors. 1998-02-03 21:56:42 +00:00
bde
f3dd4c35fa Forward declare some structs so that this file is more self-sufficient. 1998-02-03 21:52:02 +00:00
eivind
ce980d55cc Make the debug options new-style.
This also zaps a DPT option from lint; it wasn't referenced from
anywhere.
1998-01-31 07:23:16 +00:00
eivind
15cd3046e2 Make INET a proper option.
This will not make any of object files that LINT create change; there
might be differences with INET disabled, but hardly anything compiled
before without INET anyway.  Now the 'obvious' things will give a
proper error if compiled without inet - ipx_ip, ipfw, tcp_debug.  The
only thing that _should_ work (but can't be made to compile reasonably
easily) is sppp :-(

This commit move struct arpcom from <netinet/if_ether.h> to
<net/if_arp.h>.
1998-01-08 23:42:31 +00:00
julian
550a296efd Fix various problems with netatalk kernel support.
Some of these changes are a bit rough and will become
more polished later.  the changes to if_ethersubr should largely be moved
to within the appletalk code, but that will happen later.
A few of these were related to network-byteorder problems,
and more were related to loopback failures.
1997-10-29 00:30:52 +00:00
jlemon
ac0a8d66d0 Remove dereference of uninitialized (and unused) variable. This enables
netatalk to work again.
1997-10-06 15:56:16 +00:00
gibbs
30cd24efde Update for new callout interface. 1997-09-21 22:02:25 +00:00
peter
47e0f3fbb0 Update network code to use poll support. 1997-09-14 03:10:42 +00:00
bde
89f2ab7078 Removed unused #includes. 1997-09-07 08:30:24 +00:00
bde
5ffe1a4d48 Cleaned up a little. 1997-09-07 08:21:50 +00:00
bde
d5d016d4dd Moved misplaced extern declarations. 1997-09-07 07:58:09 +00:00
bde
35ecefd6a2 Staticicized. 1997-09-07 07:54:15 +00:00
bde
d305d05f35 Fixed another sloppy common-style declaration (staticized it). 1997-09-07 07:47:21 +00:00
bde
2d9d15ccd1 Removed unused variable. 1997-09-07 07:38:33 +00:00
bde
b0e9957a21 Fixed sloppy common-style declarations. 1997-09-07 07:33:30 +00:00
bde
2cf5cf3752 Added used #include - don't depend on <sys/mbuf.h> including
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
1997-09-02 01:19:47 +00:00
julian
2c2a7360b2 Add a per-interface-address pointer to a function that can be supplied
by a protocol, to detirmine if an address matches the net this address
is part of.  This is needed by protocols for which netmasks
"just don't work", for example appletalk.

Also add the code in appletalk to make use of this new feature.
Thsi fixes one of the longest standing bugs in appletalk.
The inability to talk to machines to which the path is via a router
which is on a different net, but the same netrange, as your interface.
Protocols that do not supply this function (e.g. IP) should not be affected.
1997-08-28 01:17:12 +00:00
wollman
c07b59bf2b Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs.  (Socket buffers are the one exception.)  A number
of kernel APIs needed to get fixed in order to make this happen.  Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead.  Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
1997-08-16 19:16:27 +00:00
bde
2b60d80b5b Removed unused #includes. 1997-08-02 14:33:27 +00:00
julian
d55a0b9fe8 Actually POINT to the appletalk usrreqs struct.
I guess no-one else tried to use this.. (yet)
1997-06-02 20:07:33 +00:00
julian
61ea76b200 First cut at patches to make appletalk compile again
after the dissapearance of the USRREQ() entrypoint.
1997-05-13 21:01:45 +00:00
bde
47b1f1340d Fixed the type of timeout functions and removed casts that hid the
type mismatches.  There was no problem in practice (at least on 386's).
1997-04-20 15:36:12 +00:00
bde
c9a2e7db06 Don't include <sys/ioctl.h> in the kernel. Stage 2: include
<sys/sockio.h> instead of <sys/ioctl.h> in network files.
1997-03-24 11:33:46 +00:00
bde
2e259bce08 Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include
it when it is not used.  In most cases, the reasons for including it
went away when the special ioctl headers became self-sufficient.
1997-03-24 11:25:10 +00:00
julian
e9944016be make the netatalk output routine matcy the prtotype used in the
protocol structure. Silences a warning from Gcc.
1997-03-05 09:17:38 +00:00
wollman
dcbe1b50a7 Convert the interface address and IP interface address structures
to TAILQs.  Fix places which referenced these for no good reason
that I can see (the references remain, but were fixed to compile
again; they are still questionable).
1996-12-13 21:29:07 +00:00
julian
ddb25794e5 bzero the entire at_ifaddr struct we malloc, not just the first part of it.. 1996-09-11 09:38:52 +00:00
julian
7049b159d5 chnages to bring atlak a bit more into the BSD4.4 world and to
(more) properly keep track of the allocation and freeing of
interface address structures.
1996-09-11 04:56:24 +00:00
bde
a77006a164 Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
julian
022fbd644c allow a new loopback route to overwrite an old one..
this allows the atalkd to be restarted.. a better fix will come later.
1996-09-03 06:23:13 +00:00