Commit Graph

1063 Commits

Author SHA1 Message Date
thorpej 2d655f566e In bpf_setdlt(), preserve the promiscuous mode setting of the
descriptor.

From David Young <dyoung@ojctech.com>, slight change by me.
2002-09-15 23:44:12 +00:00
thorpej 4c3ae4bbc8 Add new ioctls:
* SIOCS80211CHANNEL, SIOCG80211CHANNEL -- set/get the 802.11 channel.
* SIOCS80211BSSID, SIOCG80211BSSID -- set desired/get current BSSID.

From David Young <dyoung@ojctech.com>.
2002-09-15 23:27:08 +00:00
itojun 0319b78e54 copyright clarification. from openbsd
1.
Paul Mackerras and the Australian National University have worked things
out, and as a result, Paul now owns copyright on all these files, with the
proper terms.

2.
and... we managed to contact "Eric Rosenquist" <eric@rosenquist.com> through
the help of people who found him: first one was nick.stott@cogeco.ca
This now has a better license.  Two authors left to go.
2002-09-13 14:32:11 +00:00
itojun 822449ac65 KNF - return is not a function. 2002-09-11 05:36:26 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
onoe 26ebf5f371 Several fixes hostap for awi driver:
- aging ang clear inactivity stations
- DTIM field in beacon/probe response.
- ignore IFF_PROMISC for hostap mode, since 802.11 has 3 address fields,
  so that promisc mode is not required for AP function.
2002-09-03 14:54:00 +00:00
onoe efcfc3e1c8 Add experimental support of Host-AP mode for awi driver.
It works also with WEP enabled.
But aging the associated clients is not implemented yet, so that the number
of clients may increase unlimitedly..
2002-09-02 13:37:35 +00:00
martin 1caaa903fa If the peer did not answer LCP echo requests in-time, but we got user
data through within the last LCP keepalive interval, do not count this
as a keepalive failure.

Addresses parts of kern/17723.
2002-09-01 18:54:12 +00:00
martin adb5933cbb Apply patch from Todd Vierling in PR kern/17665:
remove a test that has been obsoleted by the authentication failure
counter - enter slow retry mode always, not only if we already transfered
data successfully (the test was designed to disable retries when the
initial authentication setting was not correct, the auth failure counter
does this job better).
2002-09-01 18:06:59 +00:00
martin ac83580ea9 Add an option PPPOE_TERM_UNKNOWN_SESSIONS to forcefully disconnect sessions
we don't know anything about with a PADT packet.

Use with care, this is pretty dangerous and will kill all userland PPPoE
implementations. Therefore it is not enabled by default nor added as
a commented out option to GENERIC kernels.

But it is highly usefull if you have a fixed IP, an ISP that does not use
LCP echo requests for link monitoring and you want to recover quickly after
a crash or otherwise ungracefull disconnect.
2002-09-01 17:21:40 +00:00
onoe fd9daca7ea Attach another DLTs for bpf: DLT_IEEE802_11 to capture raw 802.11 frame. 2002-08-28 09:38:08 +00:00
onoe 5d6bb1fbc3 Define new kernel interface bpfattach2() to register another data link
type for the driver, which will be used for 802.11 drivers.
Also add 2 APIs to get a list of available DLTs and use one for them.
	BIOCGDLTLIST (struct bpf_dltlist)
	BIOCSDLT (u_int)
2002-08-28 09:34:57 +00:00
onoe b4c41e0480 Define new DLT: DLT_IEEE802_11, DLT_PRISM_HEADER, and DLT_AIRONET_HEADER
from tcpdump.org
2002-08-28 09:31:20 +00:00
thorpej 83b3b86fd6 Fix a signed/unsigned comparison warning from GCC 3.3. 2002-08-26 01:42:28 +00:00
thorpej f3420f21a5 Fix some signed/unsigned comparison warnings from GCC 3.3. 2002-08-26 01:39:39 +00:00
thorpej 2371f92317 Fix signed/unsigned comparison warnings from GCC 3.3. 2002-08-26 01:36:37 +00:00
tron 56999645f0 Fix typo in a comment. 2002-08-25 19:21:47 +00:00
martin f54ddc3c17 Add a function to lookup bridge members by struct ifnet * and use
it at all call sites that have such a pointer readily available.
This avoids unnecessary strcmp()s in critical paths, and removes
some XXX comments.
2002-08-24 19:00:31 +00:00
onoe 63a1f2ed02 Delete IFM_IEEE80211_IBSS [ibss] and IFM_IEEE80211_IBSSMASTER [ibss-master]
from media options, since IEEE80211_ADHOC [adhoc] is already defined for
IBSS.  Instead, [ibss] is assigned as an alias for IEEE80211_ADHOC.
2002-08-21 03:22:04 +00:00
kristerw 6cf8d48ed9 #if 0 a couple of unused functions. 2002-08-20 03:52:26 +00:00
kristerw 81244d0b17 Make it compile for the __NO_STRICT_ALIGNMENT case. 2002-08-20 03:32:08 +00:00
thorpej c59bd1a572 In ether_output(), don't bother calling memcpy() to plop the ethertype
into the packet: On system with no strict alignment constraints, just
assign the value, and on others, do an inline 2 byte copy.
2002-08-19 18:58:50 +00:00
itojun c00fa8dfd9 avoid swapping endian of ip_len and ip_off on mbuf, to meet with M_LEADINGSPACE
optimization made last year.  should solve PR 17867 and 10195.

IP_HDRINCL behavior of raw ip socket is kept unchanged.  we may want to
provide IP_HDRINCL variant that does not swap endian.
2002-08-14 00:23:27 +00:00
itojun dddc4be003 to be consistent with other sources, use "struct ip *ip", not inp.
(inp is usually used for pointing struct inpcb)
2002-08-12 05:22:57 +00:00
drochner 5f33ace021 rename WI_ ioctl to make it compile again 2002-08-11 12:08:55 +00:00
thorpej 2faddb9f3d * Additional frame control types.
* BEACON and AUTH management packet info.
* Add ioctl for configuring 802.11 auth mode.

From OpenBSD.
2002-08-11 03:39:21 +00:00
thorpej 0eee4f1a69 Add "hostap", "ibss", and "ibss-master" 802.11 media options.
From OpenBSD.
2002-08-10 23:21:58 +00:00
soren f969160bd2 <net/if.h> needs <sys/socket.h> for struct sockaddr.
PR kern/3377 from der Mouse.
2002-08-09 22:43:15 +00:00
itojun cf8807954f backout previous. i was looking at the wrong RFC. 2002-08-06 04:58:57 +00:00
itojun fa5ffb82e4 based on RFC2529, stf(4) should have 1480 as MTU, not 1280.
tron found it, sync w/kame
2002-08-05 23:37:48 +00:00
onoe 248c861292 Fix IBSS for awi driver. 2002-08-05 06:55:05 +00:00
christos d64bbf607d Fix async map handling. Many thanks to Joerg Wunsch for the explanation. 2002-07-30 13:16:35 +00:00
atatat 6675196afb Make tun interfaces perform auto-creation. This means that if a
program opens /dev/tun# and tun# has not been SIOCIFCREATE'd already,
it will be SIOCIFCREATE'd automatically.  FreeBSD's tun interfaces
behave in a somewhat similar fashion.
2002-07-29 16:53:30 +00:00
christos 42f6b6f836 Patches from Frank Kardel:
- length was one off in names and secrets.
- add win 98 kludge but we keep it disabled for now.
- setup the authorization bit early so that we don't end up doing ppp
  negotiations without authorization.
2002-07-28 22:16:47 +00:00
christos 59d3d6c274 Don't throw away the name and the secret lengths. This eliminates all the
strlen() calls, and there was a whole bunch of them.
2002-07-28 19:54:47 +00:00
christos 450091b937 avoid modifying the buffers, by checking for matching lengths first. From
Frank Kardel.
2002-07-28 15:12:29 +00:00
christos ca989d9a38 Use strcmp() instead of memcmp() because if we get passed a 0 length name
and secret, we'll authenticate successfully! While there, rename passwd to
secret so that code looks nicer.
2002-07-27 19:09:07 +00:00
wiz 645df36eff Spell '[Rr]ight' correctly. From Jim Bernard. 2002-07-26 14:11:34 +00:00
tron e5e66e171b Increase interface output error count in case of a failure. 2002-07-23 06:59:51 +00:00
tron 5126e6107d Increase interface output counter for every encapsulated packet sent to IP. 2002-07-23 06:44:53 +00:00
martin 5d9a5f68c8 Use "mono_time" instead of "time" for timeout calculations. 2002-07-13 11:08:03 +00:00
yamt 43b3a8007f don't access freed memory. 2002-07-11 21:37:51 +00:00
yamt c56faa76d8 don't access freed memory. 2002-07-11 21:21:53 +00:00
itojun db705b375f use iana-assigned value for IFT_STF. sync w/kame 2002-07-10 21:01:06 +00:00
itojun c6f53f281c correct tcp header chasing in pp_fastq processing. should fix kern/17491. 2002-07-06 18:33:45 +00:00
itojun fb05cd3dd3 new copyright boilerplate from CMU. from openbsd 2002-07-01 22:09:31 +00:00
onoe b00ef6acdd Fill ar_hrd for AF_ARP. 2002-06-25 03:42:28 +00:00
enami 92912a1744 Actually inject the arp packet into softintr queue. 2002-06-24 12:00:49 +00:00
itojun 0143dfc42f integrate IEEE1394 ARP into generic ARP logic.
XXX there's no check at all in ar_hrd, and we don't set ar_hrd on outgoing.
it seems like a bad thing.
2002-06-24 08:06:20 +00:00
itojun 39cf9ef1f5 g/c last bit of old ipv6 prefix management. 2002-06-23 23:34:08 +00:00