gad [Fri, 15 Jun 2001 22:33:16 +0000 (22:33 +0000)]
Previous commit makes a minor change so socket-debug processing works the
same as it did before the IPv6 commit. Probably irrelevent to freebsd,
but I think it was useful on other OS's. Also makes a few minor style chgs.
gad [Fri, 15 Jun 2001 22:03:07 +0000 (22:03 +0000)]
Rename a few global variables which hold hostname-related values to be
more sensible/understandable. 'from'->'from_host' 'host'->'local_host'
'fromb'->'frombuf' 'fromhost'->'origin_host' and a local-variable
named 'host'->'hostbuf'. This fixes some compile-time warnings about
local variables shadowing global variables.
Other than renaming variables, the only actual code changes are to call
strlcpy() instead of strncpy() when setting those (renamed) variables,
and that 'from_ip' is now a strdup()-created buffer instead of being a
static buffer compiled in as 1025 bytes.
jhb [Fri, 15 Jun 2001 20:27:44 +0000 (20:27 +0000)]
Updates and tweaks to the new trace functionality:
- Use db_printf() instead of printf().
- Clean up decode_syscall() to use regular if-then-else rather than goto's.
- Use the same method of parsing PID's for per-process traces as the x86
code does: that is, if the address passed in is not a valid kernel
address, treat it is a decimal pid.
- If the pid of the current process is specified, fall back to using the
"default" parameters for the trace as curproc's pcb is not valid at this
point.
wpaul [Fri, 15 Jun 2001 18:43:19 +0000 (18:43 +0000)]
Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip
we want the checksums calculated on a per-packet basis using control bits
in the extsts field of the DMA descriptor structure. For TX, the chip
seems to want these bits set in the field of the first descriptor in
a fragment chain, not the last.
All of the above except 3) can be limited to a particular
protocol family (-f) or a single protocol (-p).
Some examples:
1. netstat -f inet -- show PCBs of all INET protocols
2. netstat -p udp -- show PCB of UDP protocol only (NEW!)
3. netstat -s -- show protocol statistics for all families
4. netstat -s -f inet -- show INET protocols statistics
5. netstat -s -p icmp -- show ICMP protocol statistics
This is a work in progress. Manpage has been fixed slightly,
but is still incomplete.
gad [Fri, 15 Jun 2001 16:28:37 +0000 (16:28 +0000)]
Rename global variable 'name' to 'progname', thus fixing a number of
warnings which come up for various routines that have a parameter which
is also called 'name'.
nik [Fri, 15 Jun 2001 08:45:43 +0000 (08:45 +0000)]
Add a new category of fortunes, 'freebsd-tips'. Useful hints, advice, and
pointers to areas of the system that might not be apparent on first
inspection.
peter [Fri, 15 Jun 2001 07:39:12 +0000 (07:39 +0000)]
Fix warnings:
412: warning: long unsigned int format, unsigned int arg (arg 3)
418: warning: long unsigned int format, unsigned int arg (arg 3)
424: warning: long unsigned int format, unsigned int arg (arg 3)
peter [Fri, 15 Jun 2001 07:29:17 +0000 (07:29 +0000)]
Fix some warnings in kern_environment.c. Make the getenv*() family
take a const 'name', since they dont modify anything.
159: warning: passing arg 1 of `getenv_int' discards qualifiers...
167: warning: passing arg 1 of `getenv' discards qualifiers from pointer..
peter [Fri, 15 Jun 2001 00:30:27 +0000 (00:30 +0000)]
Fix warnings (mostly harmless, due to struct bio being embedded in buf):
738: warning: passing arg 1 of `biodone' from incompatible pointer type
745: warning: passing arg 1 of `biodone' from incompatible pointer type
peter [Fri, 15 Jun 2001 00:26:41 +0000 (00:26 +0000)]
Fix warning: 128: warning: initialization makes pointer from integer
Note: this file has lots of #if __FreeBSD__ >= 4 etc which needs to be
changed to __FreeBSD_version >= 400000 etc.
peter [Fri, 15 Jun 2001 00:23:11 +0000 (00:23 +0000)]
Fix warnings:
vinumhdr.h:80: warning: redundant redeclaration of `vinum_cdevsw'
vinumext.h:239: warning: previous declaration of `vinum_cdevsw'
in each of the following files:
vinum.c, vinumconfig.c, vinumdaemon.c, vinuminterrupt.c, vinumio.c,
vinumioctl.c, vinumlock.c, vinummemory.c, vinumraid5.c, vinumrequest.c,
vinumrevive.c, vinumstate.c, vinumutil.c
peter [Fri, 15 Jun 2001 00:19:43 +0000 (00:19 +0000)]
Fix warnings:
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 5)
These warnings used to be confined to the alpha but are on all now.
peter [Fri, 15 Jun 2001 00:16:59 +0000 (00:16 +0000)]
Fix warning: 110: initialization makes pointer from integer without a cast
This was passing a (d_kqfilter_t *)-1 as the kqfilter function pointer.
Fortunately there was no D_KQFILTER in d_flags, so this was harmless.
peter [Fri, 15 Jun 2001 00:13:18 +0000 (00:13 +0000)]
Fix warnings:
554: passing arg 4 of `resource_string_value' from incompatible pointer type
576: passing arg 4 of `resource_string_value' from incompatible pointer type
593: passing arg 4 of `resource_string_value' from incompatible pointer type
dd [Thu, 14 Jun 2001 23:23:21 +0000 (23:23 +0000)]
Don't hardcode in "/release/doc/"; instead, make it the default of a
new RELN_ANCHOR variable. It may be necessary to override this if the
path to the checked out release notes tree doesn't end with
"release/doc".
bmah [Thu, 14 Jun 2001 18:46:26 +0000 (18:46 +0000)]
New release notes: New arp(8) keywords for proxy entries, new locale
names, route(8) has better error messages, new route(8) host/bits
syntax, route(8) proxy-only published ARP entries, pkg_version(1) -s.
mjacob [Thu, 14 Jun 2001 17:13:24 +0000 (17:13 +0000)]
We've had problems with data corruption occuring on
commands that complete (with no apparent error) after
we receive a LIP. This has been observed mostly on
Local Loop topologies. To be safe, let's just mark
all active commands as dead if we get a LIP and we're
on a private or public loop.
joerg [Thu, 14 Jun 2001 15:16:04 +0000 (15:16 +0000)]
Implement a loadable module for the oltr Olicom Token Ring driver. I
could only get a chance of testing it under 4.3, but together with the
if_oltr.c fixes at least it seems to work now. If someone has the chance
to test this under -current, please do.
Unfortunaltey, the TR code itself (if_iso88025subr.c) is not written
in a way that would allow to make a seaparate KLD out of it. By now,
just link it directly into the oltr KLD since it's probably the POLA
to be able to load the TR code together with the only TR hardware
driver we've got by now.
I've got one single unexplained panic (in doreti_switch or somewhere
there, calling a 0xc1XXXXXX address that did no longer belong to the
kernel at all) after unloading the modules once, thus i don't propose
a MFC of this module despite my testing has been done solely on 4.3,
unless someone is really going to test this stuff in -current.
joerg [Thu, 14 Jun 2001 15:08:40 +0000 (15:08 +0000)]
Do only call oltr_stop() if we are not already in OL_STOPPED state.
This avoids a null pointer deref panic in TRlldClose() inside the
vendor-supplied object code. It's now possible to unload the driver
at all.
Implement deallocation of malloc()ed memory regions.
mckusick [Wed, 13 Jun 2001 23:13:13 +0000 (23:13 +0000)]
Build on the change in revision 1.98 by Tor.Egge@fast.no.
The symptom being treated in 1.98 was to avoid freeing a
pagedep dependency if there was still a newdirblk dependency
referencing it. That change is correct and no longer prints
a warning message when it occurs. The other part of revision
1.98 was to panic when a newdirblk dependency was encountered
during a file truncation. This fix removes that panic and
replaces it with code to find and delete the newdirblk
dependency so that the truncation can succeed.