summaryrefslogtreecommitdiff
path: root/usr.bin/unvis
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-06-21 01:11:51 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-06-21 01:11:51 +0000
commitfb789e398c2d1c19d122de28141d06a938ae6ed2 (patch)
tree0cb1fb2144082184961e825621eb8368e8dda6e8 /usr.bin/unvis
parent97171f909adcf7b3296c01b45a169111af4f43c1 (diff)
rework how the IFF_PROMISC and IFF_ALLMULTI flags are dealt with, and how
the multicast filter is programmed. IFF_ALLMULTI is for use by the driver and only the driver, meaning that we have to clear it when its not needed anymore. now that the ethernet layer counts the number of multicast address ranges we can check that early to determine if ALLMULTI is needed, rather than doing the stupid goto allmulti dance as we iterate over the multicast address list. the imperfect multicast filter is a 16 byte wide bitfield, so we can use the "setbit" macro to build it in memory, and then write it to the hardware as a bus_space region. this simplifies the code a lot and avoids confusing bitshifts on u_int32_ts to get the bits in the right place. tested by krw on amd64, naddy on alpha, deraadt on sparc64, and beck on various bits. ok beck
Diffstat (limited to 'usr.bin/unvis')
0 files changed, 0 insertions, 0 deletions