Skip to content

Commit

Permalink
Section on Netlink (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmegli authored Oct 14, 2016
1 parent e071c76 commit 0b01082
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Note that if library dies - *it also kills your program* and you have no chance

## Dependencies

The library depends on [libmnl](http://www.netfilter.org/projects/libmnl/) for netlink nl80211 user space - kernel communication.
The library depends on [libmnl](http://www.netfilter.org/projects/libmnl/) for netlink nl80211 user space - kernel space communication.

## Building Instructions

Expand Down Expand Up @@ -119,7 +119,7 @@ Normally you would call `wifi_scan_station` or `wifi_scan_all` in a loop.

### Compiling your code

Don't forget to link with lmnl
Don't forget to link with `lmnl`

C
``` bash
Expand All @@ -130,3 +130,16 @@ C++
``` bash
gxx wifi_scan.c your_program.cpp -lmnl -o your-program
```

## Understanding nl80211 Netlink

Here are some of the resources that helped writing this library:

- Netlink Library (libnl) [documentation](https://www.infradead.org/~tgr/libnl/doc/core.html)
- Minimalistic Netlink Library (libmnl) doxygen [documentation](https://www.netfilter.org/projects/libmnl/doxygen/) and [code](https://git.netfilter.org/libmnl/)
- nl80211 [header file](http://lxr.free-electrons.com/source/include/uapi/linux/nl80211.h)
- iw [code](http://git.kernel.org/?p=linux/kernel/git/jberg/iw.git)
- wavemon [code](https://github.com/uoaerg/wavemon)
- wpa_supplicant and hostapd [code](http://ftp.tku.edu.tw/NetBSD/NetBSD-current/src/external/bsd/wpa/dist/src/drivers/driver_nl80211_scan.c)

And finally the implementation `wifi-scan.c` has some comments that may be usefull to you.

1 comment on commit 0b01082

@bmegli
Copy link
Owner Author

@bmegli bmegli commented on 0b01082 Oct 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closes #7

Please sign in to comment.