Commit Graph

113625 Commits

Author SHA1 Message Date
philip
c78021cad6 Make this compile properly on 64bit machines.
Pointy hat to:	philip
2005-03-14 23:01:25 +00:00
philip
ddd1bb70d9 Add snmp_pf, a bsnmpd module for monitoring (not managing!) pf firewalls.
Currently implemented are most things related to states and interfaces, todo
are address tables and altq.  I've tried to keep this roughly in sync with a
project implementing this for net-snmpd.

Reviewed by:	harti, dhartmei
MFC after:	1 month
2005-03-14 22:16:39 +00:00
rwatson
ed061ba4b1 In tcp_usr_send(), broaden coverage of the socket buffer lock in the
non-OOB case so that the sbspace() check is performed under the same
lock instance as the append to the send socket buffer.

MFC after:	1 week
2005-03-14 22:15:14 +00:00
philip
48e4a931e3 These words, while not spoken about anything even slightly related, are very,
very applicable when waiting for world to compile *grin*

Impatience award to:	philip
2005-03-14 21:50:25 +00:00
glebius
0e5171dc2a Remove ng_connect_t where it is unused. Probably it remained from ng_source.c. 2005-03-14 20:49:48 +00:00
glebius
525bb39422 Use subr_unit allocator instead of own functions. 2005-03-14 20:11:29 +00:00
glebius
46cd9598e0 Use subr_unit allocator instead of own functions. 2005-03-14 19:25:24 +00:00
imp
66a628923f Only allocate 1 port for non-zero rids. Either we'll get the proper
length form the enumeration mechanism, or we're dealing with the FDCTL
register, which is only 1 port long.
2005-03-14 19:09:29 +00:00
harti
c7663fe856 Finish repo-copy of lib/libbsnmp/modules to usr.sbin/bsnmpd/modules.
These modules are modules for the daemon, not for the library so
they should be where the daemon is.
2005-03-14 17:32:16 +00:00
harti
6427cb7c26 Get rid of another Lst_ForEach in favour of LST_FOREACH. Get rid
of the now unused struct LstSrc and collapes two functions into one.
2005-03-14 17:04:58 +00:00
harti
e46b6260f7 ParseModifier(): rename rw_str to value and reindent cleanup section.
ParseRestModifier() and ParseRestEnd(): move advancement of ptr to remove
a confusing calculation.
VarParseLong(): cleanup calculation of consumed.

Patch:		7.114

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-14 17:03:34 +00:00
scottl
7be505a035 Refactor the bus_dma header files so that the interface is described in
sys/bus_dma.h instead of being copied in every single arch.  This slightly
reorders a flag that was specific to AXP and thus changes the ABI there.
The interface still relies on bus_space definitions found in <machine/bus.h>
so it cannot be included on its own yet, but that will be fixed at a later
date.  Add an MD <machine/bus_dma.h> for ever arch for consistency and to
allow for future MD augmentation of the API.  sparc64 makes heavy use of
this right now due to its different bus_dma implemenation.
2005-03-14 16:46:28 +00:00
des
8bd55ce9cb Hook pfs_lookup() up to vfs_cachedlookup_desc instead of vfs_lookup_desc,
as suggested by Matt's comment.  Also fix some style and paranoia issues.

The entire function could benefit from review by a VFS guru.

MFC after:	6 weeks
2005-03-14 16:24:50 +00:00
des
aa287f3e12 Fix two long-standing bugs in pfs_readdir():
Since we used an sbuf of size resid to accumulate dirents, we would end
up returning one byte short when we had enough dirents to fill or exceed
the size of the sbuf (the last byte being lost to bogus NUL termination)
causing the next call to return EINVAL due to an unaligned offset.  This
went undetected for a long time because I did most of my testing in
single-user mode, where there are rarely enough processes to fill the
4096-byte buffer ls(1) uses.  The most common symptom of this bug is that
tab completion of /proc or /compat/linux/proc does not work properly when
many processes are running.

Also, a check near the top would return EINVAL if resid was smaller than
PFS_DELEN, even if it was 0, which is frequently the case and perfectly
allowable.  Change the test so that it returns 0 if resid is 0.

MFC after:	2 weeks
2005-03-14 16:21:32 +00:00
des
892fcdb014 If PSEUDOFS_TRACE is defined, create a sysctl knob to enable / disable
pseudofs call tracing.
2005-03-14 16:06:47 +00:00
des
409a23294c Add PSEUDOFS_TRACE option. 2005-03-14 16:04:27 +00:00
glebius
46ae2c5fbc o Use subr_unit allocator. This simplifies code much:
- Remove get_free_unit().
  - Remove SLIST of nodes.
  - Remove global mutex.

o Increase NGD_MAX to 999.
o Move ngd_mod_event() up to netgraph methods.
2005-03-14 16:02:53 +00:00
des
cae8560557 fbsdidize. 2005-03-14 15:54:11 +00:00
phk
50400e94bb Mangle a manpage. 2005-03-14 15:38:34 +00:00
phk
ddc0cb6817 Do not attach MBR on top of an MBR. This removes some confusing
slice names on disks with extended partitions.

Spotted on:	Mother-in-laws computer.
2005-03-14 15:22:18 +00:00
pjd
2762d2e8a6 Be sure that class name storaed in 'class_name' is lower case.
MFC after:	1 week
2005-03-14 15:00:51 +00:00
phk
7112e51413 Use vfs_hash instead of home-rolled. 2005-03-14 14:41:37 +00:00
pjd
4c29f3b1e1 Define subcommands' usage inside g_command structure.
MFC after:	1 week
2005-03-14 14:25:47 +00:00
pjd
70e7ef2f36 - Add gc_usage field to g_command structure. This will allow to define
usage for a subcommand, so no 'usage' function has to be implemented
  in class library.
- Bump version number as it breaks ABI, but don't provide backward
  compatibility, because there are probably no external consumers of this
  geom(8).
This allows to print more precise usage for standard commands and simplify
class libraries a bit.

MFC after:	1 week
2005-03-14 14:24:46 +00:00
maxim
f89dff07d5 o Improve the example a bit.
Submitted by:	hrs
2005-03-14 14:12:29 +00:00
brueffer
f32edb86b5 - new sentence, new line
- s/freebsd/FreeBSD/
2005-03-14 14:04:02 +00:00
phk
5f1994f321 Forgot cvs rm in last file. 2005-03-14 13:30:45 +00:00
phk
6ead7c4f27 Use vfs_hash() instead of home-rolled 2005-03-14 13:30:06 +00:00
phk
d26364a9a9 Use vfs_hash instead of home-rolled. 2005-03-14 13:22:41 +00:00
pjd
8ef3f502d0 Instead of documenting every standard subcommand's argument everywhere,
just leave reference to geom(8).

MFC after:	1 week
2005-03-14 13:14:04 +00:00
pjd
b1046d1ec5 Document subcommands' arguments.
MFC after:	1 week
2005-03-14 13:06:09 +00:00
pjd
1d8fbec83f Document '-s' option of 'status' subcommand.
MFC after:	1 week
2005-03-14 12:37:55 +00:00
pjd
664873178e Add '-s' option to 'status' subcommand. It produces script-friendly output:
# gmirror status
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
                       ad2s1a
mirror/data  DEGRADED  da0
                       da1 (76%)
                       da2
# gmirror status -s
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
mirror/root  COMPLETE  ad2s1a
mirror/data  DEGRADED  da0
mirror/data  DEGRADED  da1 (76%)
mirror/data  DEGRADED  da2

MFC after:	1 week
2005-03-14 12:33:19 +00:00
phk
550b89f8bf Use vfs_hash instead of home-rolled.
Correct locking around g_vfs_close()
2005-03-14 12:29:39 +00:00
phk
5c46906245 Use vfs_hash instead of home-rolling. 2005-03-14 12:24:35 +00:00
maxim
b7f5106637 Sort xrefs 2005-03-14 12:24:34 +00:00
maxim
ef5157382e o Replace OpenBSD-specific example by FreeBSD's one.
Noticed by:	Daniel O'Connor
2005-03-14 12:15:43 +00:00
harti
6c1fea3e9f Move the creation of a Src structure into its own function. 2005-03-14 12:04:20 +00:00
harti
65a16da8cc Split off two function from VarParseLong to handle modifiers and the
actual variable lookup. Consistently rename lengthPtr to consumed.
Update a number of comments to match the code.

Patch:		7.111-113

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-14 12:03:30 +00:00
jeff
dfd3ed6e5d - ktrace(1) has nothing to do with schedgraph. Remove that from the
instructions.
2005-03-14 11:52:24 +00:00
phk
81b59515b3 Cleanup accidentally include #if 0 section. 2005-03-14 10:25:09 +00:00
phk
2c122b990e Remove ufs_ihash.c here as well. 2005-03-14 10:23:34 +00:00
phk
503a6885b8 Use vfs_hash instead of home-rolled. 2005-03-14 10:21:16 +00:00
phk
c15976e56b Currently (almost) all filesystems maintain a local inode hash table
to get from (mount + inode) to vnode.  These tables are mostly
copy&pasted from UFS, sized based on desiredvnodes and therefore
quite large (128K-512K).  Several filesystems are buggy enough that
they allocate the hash table even before they know if they will
ever be used or not.

Add "vfs_hash", a system wide hash table, which will replace all
the per-filesystem hash-tables.

The fields we add to struct vnode will more or less be saved in
the respective filesystems inodes.

Having one central implementation will save code and will allow us
to justify the complexity of code to dynamically (re)size the hash
at a later point.
2005-03-14 10:01:29 +00:00
jeff
3fcb9112fb - Increment the holdcnt once for each usecount reference. This allows us
to use only the holdcnt to determine whether a vnode may be recycled,
   simplifying the V* macros as well as vtryrecycle(), etc.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 09:25:19 +00:00
jeff
41fb0028e9 - Don't directly adjust v_usecount, use vref() instead.
Sponsored by:	Isilon Systems, Inc.
2005-03-14 09:03:19 +00:00
pjd
74672647f0 Use int instead of size_t (%*s needs int).
MFC after:	1 week
2005-03-14 08:34:02 +00:00
jeff
2a81e8df21 - We do not have to check the object's ref_count in VSHOULDFREE or
vtryrecycle().  All obj refs also ref the vnode.
 - Consistently use v_incr_usecount() to increment the usecount.  This will
   be more important later.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 08:30:31 +00:00
harti
dffc7fe63f Convert a couple of other uses of Lst_ForEach to LST_FOREACH and
simplify code.
2005-03-14 08:29:58 +00:00
jeff
eaf9deaeb7 - Retire OLOCK and OWANT. All callers hold the vnode lock when creating
a vnode object.  There has been an assert to prove this for some time.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 07:29:40 +00:00