bpf_mtap() gets called with not-well-initialized mbuf, so we need to go through
it without touching m->m_pkthdr.len and such. it's part of our bpf_mtap() API
(at least today).
years now.) Use _rtld_pagesz instead of getpagesize() to determine the page
size in our local malloc(). Saves a system call.
Also, since we're now relocated early, we don't need to be careful to avoid
globals, so most of the VARPSZ hacks are eliminated.
l_addr is always supposed to be obj->relocbase -- or so says the GDB code that
uses it. So, set it to this on all platforms. It already was on VAX
explicitly, and on everything else except MIPS implicitly (because
mapbase==relocbase for all existing shlibs). For some silly/stupid reason, a
new field was created that the MIPS GDB currently uses.
Another MD #ifdef bites it.
* Rename _rtld_find_library() to _rtld_load_library(). It now calls
_rtld_load_object() if necessary to actually load the object, rather
than having the caller do it. To do this, it also takes the `mode'
argument that gets passed to _rtld_load_object().
* On a related note, remove _rtld_check_library(), and instead call
_rtld_load_object() to instead try actually loading the object. We
save two extra namei's and a bunch of redundant work (almost
literally the same code) this way.
* In _rtld_map_object(), mmap(2) the first page read-only, rather than
read(2)ing it.
* In _rtld_symlook_obj(), compare the *second* character of the symbol
name before calling strcmp(). (This first character is too
frequently `_', and turns out to not be helpful, in libc.)
* Also in _rtld_symlook_obj(), remove the bogus STT_FUNC special case
-- this also allows removing the `in_plt' argument to
_rtld_symlook_list() and _rtld_symlook_obj().
Also:
* In _rtld_obj_from_addr(), rather than trying to look up `_end' in
the each object, instead use obj->mapsize as the upper bound.
by me:
* Speed up reading/writing buffers from the hardware by avoiding
slow forward seeks. In preparation to use the optimization, do
not read overlapping bytes. This is currently disabled, but can
be enabled with OPTIMIZE_RW_DATA.
* Hand 802.11 and Prism-specific frames to BPF. User can watch these
frames by specifying an alternate DLT to e.g. tcpdump(8).
* Add support for SIOC[SG]80211BSSID and SIOC[SG]80211CHANNEL.
* Issue join requests and track join/create state through link-status
notifications.
* Split wi_rxeof into separate routines for receiving Ethernet II,
802.11 data, and 802.11 management frames.
* Bug fix: Account for aligning m_data to a word boundary in the Rx
buffer size check.
* Bug fix: Check for LLC/SNAP even if the firmware tells us the frame
is Ethernet II, as the firmware sometimes gets this wrong.
* Process as many events as possible when we get an interrupt, using
a simple heuristic to avoid reprocessing an event (which can have
bad side-effects). Clamp the time spent in the interrupt handler
to 4ms.
* Redo the timeout loops to be consistent and less prone to error.
* Add delays to timeout loops which were missing them, so that a
fast CPU won't win the race.
* Borrow some timeout loop values from the linux-wlan-ng driver,
which seems to reflect a high level of clue (due to direct support
from Intersil).
* Get rid of silly wi_read_data(..., len + 2) idiom; simply round up
in wi_read_data() and wi_write_data(). Also, protect against a
length of 0.
* Name some frequently-used constants. Correct spelling. Other style nits.
* Bug fix: On Prism, set Create IBSS register to 0 *always*. The meaning
of Create IBSS == 1 is join an IBSS or *ESS*, and we do not want to
join an ESS, because that would put us in an inconsistent state. 0
is the right value for Prism.
* Bug fix: Clean up state at the top of wi_init(), in the event that
we don't reach the bottom.
* Simplify wi_start() by always providing an RFC1042-encoded 802.11
frame to the firmware.
* Larval powersave support for HostAP mode, enabled by WI_HOSTAP_POWERSAVE.
* Bug fix: Call wi_stop() from wi_shutdown().
* Bug fix: sync media options with HostAP mode in wi_sync_media().
* In wi_media_status(), inquire firmware for current media state if
media == auto. From FreeBSD.
* Clean up the way buffer lengths are computed by using pointer
arithmetic rather than magic constants.
* Swap the order of comparisons in addr_cmp() for speed.
* Bug fix: Send ReAssoc Response instead of Assoc Response to a
ReAssoc Request.
* Bug fix: Copy SSID using the correct size.
* Give more meaningful names to offsets in a wi_frame.
* Bug fix: Assign the right values to the named constants for
Rx frame encoding.
* Get rid of useless SNAP constants.
there's an error. Store the result of this function in a signed
variable instead of an unsigned variable before checking if the return
value is greater than zero.