Commit Graph

117220 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
29da8af658 include netinet6/scope6_var.h. 2005-07-25 12:36:43 +00:00
Hajimu UMEMOTO
a1f7e5f8ee scope cleanup. with this change
- most of the kernel code will not care about the actual encoding of
  scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
  scoped addresses as a special case.
- scope boundary check will be stricter.  For example, the current
  *BSD code allows a packet with src=::1 and dst=(some global IPv6
  address) to be sent outside of the node, if the application do:
    s = socket(AF_INET6);
    bind(s, "::1");
    sendto(s, some_global_IPv6_addr);
  This is clearly wrong, since ::1 is only meaningful within a single
  node, but the current implementation of the *BSD kernel cannot
  reject this attempt.

Submitted by:	JINMEI Tatuya <jinmei__at__isl.rdc.toshiba.co.jp>
Obtained from:	KAME
2005-07-25 12:31:43 +00:00
Pawel Jakub Dawidek
869de95743 Connect GZERO to the build.
MFC after:	3 days
2005-07-25 10:49:05 +00:00
Xin LI
05a6b7ad62 Cast to uintptr_t when the compiler complains. This unbreaks ULE
scheduler breakage accompanied by the recent atomic_ptr() change.
2005-07-25 10:21:49 +00:00
Pawel Jakub Dawidek
565bc10111 Add a very simple and small GEOM class - ZERO.
It creates very huge provider (41PB) /dev/gzero.
On BIO_READ request it zero-fills bio_data and on BIO_WRITE it does nothing.
You can also set kern.geom.zero.clear sysctl to 0 to do nothing even for
BIO_READ.

I'm using it for performance testing where it is very helpful.

MFC after:	3 days
2005-07-25 10:03:16 +00:00
Robert Watson
7f6e27372b If a retrieved UMA zone is a secondary zone, don't report keg free items,
as they actually belong to the  primary zone, and maye otherwise be
reported more than once.

MFC after:	1 day
2005-07-25 09:52:59 +00:00
Philip Paeps
fc2d060bf7 Add some more NO_FOO options. I'm not sure if they're correctly sorted in the
size-scheme.  Also add commented NO_BIND_FOO options for people who want named
but not all of the bloat it likes to include by default.

While here, make a comment about BOOT_COMCONSOLE_SPEED.
2005-07-25 09:15:12 +00:00
Philip Paeps
1d22933171 Add fstab entries for ALTROOTSLICE and CFGSLICE, allowing us to do away with
most of the hardcoding of device names in installed convenience scripts.

Provide a new script (root/updatep) to easily update the ALTROOTSLICE.  It
does the same as updatep1/updatep2 without hardcoded device names.  If noone
protests, I'd like to get rid of updatep1/updatep2 at some point.

As an extra bonus: turn on the error led while updating (on hardware with a
led).
2005-07-25 08:40:13 +00:00
Sam Leffler
b35f2511fa treat REASSOC events just like ASSOC
MFC after:	3 days
2005-07-25 04:32:40 +00:00
Andrew Thompson
39bb2fca46 We check that all the member interfaces have the same MTU on attach to the
bridge but the interface can still be changed afterwards.

This falls under the 'dont do that' category but log an warning when INVARIANTS
is defined.

Approved by:	mlaier (mentor)
MFC after:	3 days
2005-07-25 02:22:37 +00:00
Robert Watson
cbbb4a0089 Rename UMA_MAX_NAME to UTH_MAX_NAME, since it's a maximum in the
monitoring API, which might or might not be the same as the internal
maximum (currently none).

Export flag information on UMA zones -- in particular, whether or
not this is a secondary zone, and so the keg free count should be
considered in that light.

MFC after:	1 day
2005-07-25 00:47:32 +00:00
Marius Strobl
8cfaff7d0b Remove NOP spl*() calls and add locking (making gem(4) MPSAFE).
Based on:	hme(4)
Reviewed by:	yongari
Tested on:	powerpc(grehan), sparc64
2005-07-24 18:45:15 +00:00
Marius Strobl
c3d5598aa8 - Wrap the handler and associated code for collecting completed RX
descriptors that are still marked owned in #ifdef GEM_RINT_TIMEOUT
  instead of #if 0 for convenience.
- Remove stale code and comment about relying on the preset XIF config.
- In case of a watchdog timeout call the init function instead of just
  the start function so the chip is properly reset.

Merge from hme(4):
- Convert to use bus_dmamap_load_mbuf_sg() for loading RX buffers.
- Protect from a duplicate mbuf free panic in case the DMA engine hangs.

Reviewed by:	yongari
Tested on:	powerpc(grehan), sparc64
MFC after:	1 week
2005-07-24 18:12:31 +00:00
Maxime Henrion
5a29706504 Add back ed(4) in amd64 GENERIC. It now works nicely and since those
chips are commonly found, it makes sense to have it in GENERIC.  This
is a candidate for a RELENG_6 MFC.

Approved by;	peter
Requested by:	pav
Tested by:	pav
2005-07-24 17:55:57 +00:00
Christian S.J. Peron
69f7644bc9 Introduce new sysctl variable: net.bpf.stats. This sysctl variable can
be used to pass statistics regarding dropped, matched and received
packet counts from the kernel to user-space. While we are here
introduce a new counter for filtered or matched packets. We currently
keep track of packets received or dropped by the bpf device, but not
how many packets actually matched the bpf filter.

-Introduce net.bpf.stats sysctl OID
-Move sysctl variables after the function prototypes so we can
 reference bpf_stats_sysctl(9) without build errors.
-Introduce bpf descriptor counter which is used mainly for sizing
 of the xbpf_d array.
-Introduce a xbpf_d structure which will act as an external
 representation of the bpf_d structure.
-Add a the following members to the bpfd structure:

	bd_fcount	- Number of packets which matched bpf filter
	bd_pid		- PID which opened the bpf device
	bd_pcomm	- Process name which opened the device.

It should be noted that it's possible that the process which opened
the device could be long gone at the time of stats collection. An
example might be a process that opens the bpf device forks then exits
leaving the child process with the bpf fd.

Reviewed by:	mdodd
2005-07-24 17:21:17 +00:00
Tim J. Robbins
d48c77b534 Speed up __wcsconv() (and hence the printf() %ls format):
- use wcsrtombs() instead of a wcrtomb() loop where possible.
- avoid wcrtomb() loop when output precision is small.
2005-07-24 12:12:44 +00:00
Sam Leffler
c59005e9c8 o fix setup of sc_diversity; the hal does not give us reliable
status after attach, only after a reset
o when setting diversity via the sysctl don't update sc_diversity
  until we know the hal requested worked
o while here eliminate sc_hasdiversity and sc_hastpc; just query
  the hal each time since these are the only places we need to know

MFC after:	3 days
2005-07-24 05:11:39 +00:00
Robert Watson
4f7ac59b50 Since libmemstat(3) now supports its own error management mechanism,
use that instead of trying to use errno, in order to produce a
sensible error message.

MFC after:	1 day
2005-07-24 01:42:42 +00:00
Robert Watson
e754c6bbb7 Having decided not to provide a libmemstat(3) error number to text
conversion routine, now change my mind and add one, memstat_strerror(3),
which returns a const char * pointer to a string describing the error,
to be used on the results of memstat_mtl_geterror().

While here, also correct a minor typo in the HISTORY man page.

Pointers on improving ease of internationalization would be
appreciated.

MFC after:	1 day
2005-07-24 01:41:47 +00:00
Robert Watson
70ee997ed4 Document additional aspects of libmemstat(3):
- Short description of each memory type access method.

- Descriptions of libmemstat(3) errors and memstat_mtl_geterror(3).

MFC after:	1 day
2005-07-24 01:29:30 +00:00
Robert Watson
345628080d Introduce more formal error handling for libmemstat(3):
- Define a set of libmemstat(3) error constants, which are used by all
  libmemstat(3) methods except for memstat_mtl_alloc(), which allocates
  a memory type list and may return ENOMEM via errno.

- Define a per-memory_type_list current error value, which is set when a
  call associated with a memory list fails.  This requires wrapping a
  structure around the queue(9) list head data structure, but this change
  is not visible to libmemstat(3) consumers due to using access methods.

- Add a new accessor method, memstat_mtl_geterror() to retrieve the error
  number.

- Consistently set the error number in a number of failure modes where
  previously some combination of setting errno and printf'ing error
  descriptions was used.  libmemstat(3) will now no longer print to stdio
  under any circumstances.  Returns of NULL/-1 for errors remain the
  same.

This avoids use of stdio, misuse of error numbers, and should make it
easier to program a libmemstat(3) consumer able to print useful error
messages.  Currently, no error-to-string function is provided, as I'm
unsure how to address internationalization concerns.

MFC after:	1 day
2005-07-24 01:28:54 +00:00
Doug Barton
f2e5413755 Add an entry for /usr/sbin/vttest
Submitted by:	Pawel Worach <pawel.worach@gmail.com>
2005-07-23 23:55:27 +00:00
Pawel Jakub Dawidek
9975a9a287 Better translation. 2005-07-23 21:30:35 +00:00
Robert Watson
ddefbc898a Prefix two non-static libmemstat(3) internal functions with '_' symbols, to
try and discourage use outside the library.

Remove duplicate declaration of memstat_mtl_free() from memstat_internal.h,
as it's not internal, and the memstat.h definition suffices.
2005-07-23 21:17:15 +00:00
Doug Barton
8a1ae47f87 Add an entry for the old fortunes2 files, and an entry
for the /usr/share/doc/bind directory from pre-BIND 9 days.
2005-07-23 19:42:39 +00:00
Nate Lawson
76f6fe4f31 Rewrite the acpi_battery interface to allow for other battery types
(i.e., smart battery) and fix various bugs found during the cleanup.

API changes:
* kernel access:
Access to individual batteries is now via devclass_find("battery").
Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and
ACPI_BATT_GET_INFO (for _BIF-formatted data).  The helper function
acpi_battery_get_battinfo() now takes a device_t instead of a unit #
argument.  If dev is NULL, this signifies all batteries.

* ioctl access:
The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been
removed.  Since there is now no need for a mapping between "virtual" unit
and physical unit, usermode programs can just specify the unit directly and
skip the old translation steps.  In fact, acpiconf(8) was actually already
doing this and virtual unit was the same as physical unit in all cases
since there was previously only one battery type (acpi_cmbat).  Additionally,
we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all
batteries, if they provide the associated methods.

* apm compatibility device/ioctls:  no change
* sysctl:  no change

Since most third-party applications use the apm(4) compat interface, there
should be very few affected applications (if any).

Reviewed by:	bruno
MFC after:	5 days
2005-07-23 19:36:00 +00:00
David E. O'Brien
d3a46d1253 Fix missing '=' in structure initialization. 2005-07-23 19:28:51 +00:00
Doug Barton
a2412a091e (More thoroughly) fix the problem with the EGREP lines that was reported
on -current by Ben Kaduk <minimarmot@gmail.com>.

Add a hack of my own to allow the user to supply the paths to the INF and
SYS files on the command line.
2005-07-23 18:47:18 +00:00
Andrey A. Chernov
f92c1adc15 My change, namely srandomdev() addition, was backed out even without
discussing with me, and I obviously disagree seeing that afterwards
(srandomdev() back out not fix any thing, it can only mask the problem).

So, back out the back out and return srandomdev().

People who have problems with repeated quotes should use -D fortune
option for debugging to see is the problem in (1) /dev/random initialization
or in (2) fortune code itself.

I will be glad to help, but I can't reproduce repeated quote situation
on my machine.

In either case found, (1) or (2) should be fixed instead of removing
srandomdev().
2005-07-23 18:24:47 +00:00
R. Imura
8fa523fb95 Temporary restore a part of rev 1.6.
We must not increase a capability of buffer size here,
because codes which call these functions expect that dst and src
are the same size.
This will cause problem when someone convert a character whose
length is different between charsets on smbfs which was changed
to use xlat16 converter.
2005-07-23 16:52:57 +00:00
Ken Smith
6c497be4ac Oops, bump __FreeBSD_version to mark shared library version bump.
Reminded by:	nork
2005-07-23 16:42:54 +00:00
Markus Brueffer
9ae07ea897 s/Lefler/Leffler/
Approved by:	brueffer
MFC after:	3 days
2005-07-23 15:09:27 +00:00
Alexander Leidinger
e2a3608153 Add delete-old and delete-old-libs targets:
- removes obsolete files/dirs or libraries.
  - works in interactive (default) and batch mode
  - respects DISTDIR
  - documented in UPDATING and build(7)

The head of the file ObsoleteFiles.inc contains instructions how to add
obsolete files/dirs/libs to the list. Obviously one should add obsolete
files to this list, when he removes a file/dir/lib from the basesystem.

Additionally add check-old target:
  - allows re@ to check if a file on the obsolete list resurfaces

Design goals:
  - allows full control by the user (default interactive mode)
  - possibility of scripted removal of obsolete files (batch mode)
  - opt-in removal of files (explicit list of files)
  - seperate removal of libs (2 delete targets)

Important design decissions:
  - structured list of files to remove instead of a plain text file:
    * allows to remove additional files if a NO_foo knob is specified
      without the need to change the targets (no NO_foo knob is respected
      yet)
  - not using mtree like NetBSD does:
    * mtree doesn't has an interactive mode

Discussed on:		arch (long ago), current (this year)
Additional input from:	re (hrs)
Approved by:		mentor (joerg)
2005-07-23 14:23:30 +00:00
Joseph Koshy
9133b63902 Sync usage message with the code and manual page.
Submitted by:	maxim
2005-07-23 13:49:04 +00:00
Pawel Jakub Dawidek
3c0a99e66e Change jail IP from 1.0.0.127 to 127.0.0.1, which shows, that this test
doesn't examine the real issue as it pass without problems.
2005-07-23 05:40:17 +00:00
Sam Leffler
4866e6c248 o move ath_sysctlattach down so variables it depends on are setup
o use any fixed tx antenna for beacons transmitted in adhoc mode

Submitted by:	David Young
MFC after:	3 days
2005-07-23 05:34:29 +00:00
Greg Lehey
8af732d13c Use a random number to seed the random number generator. Goodby, Rush
Limbaugh.

This should have already worked properly if random(4) has been
initialized correctly, but it seems that this is frequently not the
case.  Instead, use the microsecond part of the current time as the
seed.
2005-07-23 01:46:50 +00:00
Giorgos Keramidas
a09ad79379 Misc spelling and/or English fixes in comments.
Reviewed by:	glebius, andre
2005-07-23 00:59:13 +00:00
Sam Leffler
44b666cd0e the AREF flag is only meaningful in ap mode; adhoc neighbors now
are timed out of the sta/neighbor table
2005-07-23 00:16:46 +00:00
Sam Leffler
1686ab4639 update for recent additions 2005-07-22 23:37:03 +00:00
Sam Leffler
0b42c00c0e update with new msg classes 2005-07-22 23:33:33 +00:00
Sam Leffler
f66d97f6bc o move inactivity-related debug msgs under IEEE80211_MSG_INACT
o probe inactive neighbors in adhoc mode (they don't have an
  association id so previously were being timed out)

MFC after:	3 days
2005-07-22 23:25:46 +00:00
Peter Grehan
2fcb4181ad Make code match comment: make the smallest unit of page allocation
from OpenFirmware be 16 pages to avoid fragmentation in the list
of mappings returned when the kernel requests it in pmap_bootstrap.

This allows a static buffer to be used when obtaining the existing
mappings - very useful on the G5 when random physical pages can't
be grabbed because they can't be BAT-mapped.

MFC after:	3 days
2005-07-22 23:22:29 +00:00
Nate Lawson
a3ab9d1e3e Standardize __FBSDID identifiers.
MFC after:	2 days
2005-07-22 23:10:02 +00:00
Jonathan Chen
c5a096e0e0 fix innetgr() returning false positives and negatives when reverse netgroup
matching is used.

PR: 35506
MFC after: 3 days
2005-07-22 22:20:26 +00:00
Sam Leffler
af8418dcb1 split xmit of probe request frame out into a separate routine that
takes explicit parameters; this will be needed when scanning is
decoupled from the state machine to do bg scanning

MFC after:	3 days
2005-07-22 21:11:26 +00:00
Sam Leffler
add59d0875 split 802.11 frame xmit setup code into ieee80211_send_setup
MFC after:	3 days
2005-07-22 20:48:11 +00:00
Robert Watson
b7b85f242e Add a simple multicast socket regression test set:
- Test that the basic socket options have the right defaults, that we can
  change them, read them back, etc.

- Add and remove some multicast addresses.

- Send a loopback multicast address and make sure it arrives intact.

There's more that could be done here, but it's a start.

MFC after:	3 days
2005-07-22 19:36:29 +00:00
Nate Lawson
d551ef2b72 Use the current BST/BIF ioctls, not the deprecated ones.
MFC after:	2 days
2005-07-22 19:19:00 +00:00
Hajimu UMEMOTO
bb518265f1 mention getaddrinfo(3) ABI breakage on 64 bit arch. 2005-07-22 18:51:36 +00:00