3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 22:59:41 +01:00
The iNet Wireless Daemon (iwd) project aims to provide a comprehensive Wi-Fi connectivity solution for Linux based devices. The core goal of the project is to optimize resource utilization: storage, runtime memory and link-time costs. https://iwd.wiki.kernel.org/
Go to file
Ravi kumar Veeramally 7eac75fa69 monitor: Print EAPoL key details
e.g.

< PAE: len 123
    Interface Index: 9
    EAPoL: len 123
        Version: 2 (802.11X-2004)
        Type: 3 (Key)
        Lenth: 119
        Descriptor Type: 2
        Key MIC: true
        Secure: false
        Error: false
        Request: false
        Encrypted Ket Data: false
        SMK Message: false
        Key Descriptor Version: 1 (01)
        Ket Type: true
        Install: false
        Key ACK: false
        Key Length: 0
        Key Replay Counter: 4
        Key NONCE
            af 38 0d 3a 24 1a f7 09 3e ad b9 6e e6 33 02 8b  .8.:$...>..n.3..
            fa 00 f6 40 71 38 e9 d5 d1 e3 ca 3b c2 16 83 d9  ...@q8.....;....
        Key IV
            00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        Key RSC
            00 00 00 00 00 00 00 00                          ........
        Key MIC Data
            86 b7 54 45 7c 37 45 c1 31 e7 65 4b 70 c8 43 c0  ..TE|7E.1.eKp.C.
        Key Data: len 24
            dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50  ...P.....P.....P
            f2 02 01 00 00 50 f2 02                          .....P..
        Vendor Specific: len 22
            Microsoft (00:50:f2)
                WPA:
                    Type: 1
                    Version: 1(0001)
                    Group Data Cipher Suite: len 4
                        TKIP (00:50:f2) suite  02
                    Pairwise Cipher Suite: len 4
                        TKIP (00:50:f2) suite  02
                    AKM Suite: len 4
                        PSK; RSNA PSK (00:50:f2) suite  02
2015-03-16 11:56:43 -05:00
client client: Open private bus connection if available 2014-05-20 23:08:14 -07:00
doc TODO: Mark agent task done 2015-03-02 21:00:39 -06:00
linux wiphy: Update nl80211.h 2014-12-22 11:48:09 -06:00
monitor monitor: Print EAPoL key details 2015-03-16 11:56:43 -05:00
src wiphy: Add enumeration of reason codes 2015-03-12 11:19:27 -05:00
test test: Python script that implements a basic agent 2015-02-27 10:45:40 -06:00
tools hwsim: Use new l_genl send() APIs 2015-02-27 11:00:58 -06:00
unit unit: Add setting of AP RSNE 2015-02-24 22:15:30 -06:00
.gitignore gitignore: Add unit/test-arc4 2015-02-17 16:53:15 -06:00
acinclude.m4 build: Avoid redefining _FORTIFY_SOURCE 2014-08-01 09:52:36 -05:00
AUTHORS AUTHORS: Mention Ravi's contributions 2014-12-16 08:58:15 -06:00
bootstrap build: Add support for internal ELL compilation 2014-05-11 11:01:11 -07:00
bootstrap-configure build: Add debug options to configure 2014-07-16 02:10:15 +02:00
ChangeLog build: Add ChangeLog file to satisfy distribution requirements 2014-05-22 19:53:56 -07:00
configure.ac build: Test for linux/types.h and linux/if_alg.h headers 2015-02-27 21:04:34 +01:00
COPYING build: Add COPYING and INSTALL template files 2014-05-22 10:09:24 -07:00
HACKING HACKING: Add Submitting Patches section 2015-01-22 08:53:10 -06:00
INSTALL build: Add COPYING and INSTALL template files 2014-05-22 10:09:24 -07:00
Makefile.am agent: Initial agent support 2015-02-27 09:37:32 -06:00
README README: Monitor interface is created automatically 2014-10-04 21:33:58 -05:00
TODO TODO: Add task for EAPoL transport 2015-03-03 10:16:49 -06:00

Wireless daemon for Linux
*************************

Copyright (C) 2013-2014  Intel Corporation. All rights reserved.


Compilation and installation
============================

In order to compile the source code you need following software packages:
	- GCC compiler
	- GNU C library
	- Embedded Linux library

To configure run:
	./configure --prefix=/usr

Configure automatically searches for all required components and packages.

To compile and install run:
	make && make install


Embedded Linux library
======================

In order to compile the daemon and control utility the development version
of Embedded Linux library is required to be present. The development
repositories can be found here:

	git://git.kernel.org/pub/scm/libs/ell/ell.git
	https://kernel.googlesource.com/pub/scm/libs/ell/ell.git

The build systems requires that the Embedded Linux library source code
is available on the same top level directory as the Wireless daemon
source code:

	.
	|--- ell
	|    |--- ell
	|    `--- unit
	`--- iwd
	     |--- src
	     `--- client

It is not required to build or install Embedded Linux library. The build
will happen when building the Wireless daemon and it will then be linked
internally.


Kernel dependencies
===================

In order to use this daemon and control utility the kdbus kernel module
is required. The development repositories can be found here:

	https://github.com/gregkh/kdbus
	https://code.google.com/p/d-bus/

The daemon will start its own private bus that is located at the /dev/kdbus
device hierarchy:

	/dev/kdbus
	|--- control
	`--- 0-iwd
	     `--- bus

When started as root, the new private bus will be /dev/kdbus/0-iwd/bus
and it can be verified with the busctl utility from systemd:

	# busctl --address=kernel:path=/dev/kdbus/0-iwd/bus
	NAME       PID  PROCESS     USER      CONNECTION    CONNECTION-NAME
	:1.1     62151  iwd         root      :1.1          iwd
	:1.2     62153  busctl      root      :1.2          sd-busctl

Clients talking to the daemon must specifiy the private bus address.


Netlink monitoring
==================

The included iwmon utility can be used to monitor the 802.11 subsystem
generic netlink commands and events. It uses the nlmon kernel driver
from Linux 3.10 and later. On startup network monitor interface named
named 'nlmon' is created unless another interface name is given on the
command line. If the monitor interface was created by the iwmon utility,
it will be removed on program exit.

Manually the monitor interface can be created using the following
commands:

	ip link add name nlmon type nlmon
	ip link set dev nlmon allmulticast on
	ip link set dev nlmon up

It is possible to create netlink traces in PCAP format using tcpdump
and then read them via iwmon utility:

	tcpdump -i nlmon -w trace-file.pcap

The resulting PCAP files will use Linux cooked packet format containing
packets with ARPHRD_NETLINK type. They can be read using iwmon:

	iwmon -r trace-file.pcap

At this time iwmon is not able to write PCAP files by itself. This might
change in future versions.

When also the authentication protocol traffic on port 0x888e (ETH_P_PAE)
is needed, then a second capture is required:

	tcpdump -i any 'ether proto 0x888e' -w trace-pae.pcap

It is possible to combine these two PCAP files using the mergecap utility
and create a combined trace file:

	mergecap -F pcap -w trace.pcap trace-file.pcap trace-pae.pcap

This will create a trace.pcap file that includes the complete picture
of nl80211 netlink traffic and authentication messages. All packets are
merged in chronological order based on timestamps.

Unfortunately it is not possible to instruct tcpdump filtering to do
this in a single capture. Post-processing of the PCAP files is required
at the moment.


Simulating devices
==================

The Linux driver mac80211_hwsim provides the functionality to simulate
Wireless devices using fake virtual air. Just load the module.

	modprobe mac80211_hwsim radios=0

Provding the radios=0 is important since otherwise it starts out with
two new Wireless radios by default.

With the provided hwsim utility it is now possible to add and remove
virtual radio devices.

	hwsim --create
	hwsim --destroy=<radio-id>

The radio id assigned to each virtual device is its internal id used
by the Wireless device.