mediator between the wlan interface and gnunet; must run as root (SUID will do) This code will work under GNU/Linux only. More...
#include "platform.h"
#include "gnunet_private_config.h"
#include <netpacket/packet.h>
#include <linux/if_ether.h>
#include <linux/wireless.h>
#include "gnunet_protocols.h"
#include "plugin_transport_wlan.h"
Go to the source code of this file.
Data Structures | |
struct | PrismValue |
Values in the 'struct PrismHeader'. More... | |
struct | PrismHeader |
Prism header format ('struct p80211msg' in Linux). More... | |
struct | Ieee80211RadiotapHeader |
Generic header for radiotap messages (receiving and sending). More... | |
struct | RadiotapTransmissionHeader |
Format of the header we need to prepend to messages to be sent to the Kernel. More... | |
struct | Ieee80211RadiotapHeaderIterator |
struct Ieee80211RadiotapHeaderIterator - tracks walk through present radiotap arguments in the radiotap header. More... | |
struct | HardwareInfos |
struct for storing the information of the hardware. More... | |
struct | SendBuffer |
IO buffer used for buffering data in transit (to wireless or to stdout). More... | |
struct | MessageStreamTokenizer |
Handle to a message stream tokenizer. More... | |
Macros | |
#define | ARPHRD_ETHER 1 |
Packet format type for the messages we receive from the kernel. More... | |
#define | ARPHRD_IEEE80211 801 |
Packet format type for the messages we receive from the kernel. More... | |
#define | ARPHRD_IEEE80211_PRISM 802 |
Packet format type for the messages we receive from the kernel. More... | |
#define | ARPHRD_IEEE80211_FULL 803 |
Packet format type for the messages we receive from the kernel. More... | |
#define | MAXLINE 4096 |
Maximum size of a message allowed in either direction (used for our receive and sent buffers). More... | |
#define | PRISM_DEVICE_NAME_LENGTH 16 |
Device name length in PRISM frames. More... | |
#define | PRISM_MSGCODE_MONITOR 0x0041 |
Monitor Frame (indicator that we have a 'struct PrismHeader'). More... | |
#define | PRISM_DID_MACTIME 0x2041 |
Mac time element. More... | |
#define | PRISM_DID_CHANNEL 0x3041 |
Channel element. More... | |
#define | PRISM_DID_SIGNAL 0x6041 |
Signal element. More... | |
#define | PRISM_DID_NOISE 0x7041 |
Noise element. More... | |
#define | PRISM_DID_RATE 0x8041 |
Rate element, in units/multiples of 500Khz. More... | |
#define | PRISM_STATUS_OK 0 |
Value is set (supplied) More... | |
#define | PRISM_STATUS_NO_VALUE 1 |
Value not supplied. More... | |
#define | IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK (1 << IEEE80211_RADIOTAP_EXT) |
Bitmask indicating an extension of the bitmask is used. More... | |
#define | IEEE80211_RADIOTAP_F_CFP 0x01 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present'). More... | |
#define | IEEE80211_RADIOTAP_F_SHORTPRE 0x02 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present'). More... | |
#define | IEEE80211_RADIOTAP_F_WEP 0x04 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present'). More... | |
#define | IEEE80211_RADIOTAP_F_FRAG 0x08 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present'). More... | |
#define | IEEE80211_RADIOTAP_F_FCS 0x10 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present'). More... | |
#define | IEEE80211_RADIOTAP_F_DATAPAD 0x20 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present'). More... | |
#define | IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 |
For IEEE80211_RADIOTAP_RX_FLAGS: frame failed crc check. More... | |
#define | IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): failed due to excessive retries. More... | |
#define | IEEE80211_RADIOTAP_F_TX_CTS 0x0002 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): used cts 'protection'. More... | |
#define | IEEE80211_RADIOTAP_F_TX_RTS 0x0004 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): used rts/cts handshake. More... | |
#define | IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): frame should not be ACKed. More... | |
#define | IEEE80211_RADIOTAP_F_TX_NOSEQ 0x0010 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): sequence number handled by userspace. More... | |
#define | IEEE80211_RADIOTAP_OUR_TRANSMISSION_HEADER_MASK |
The above 'struct RadiotapTransmissionHeader' should have the following value for 'header.it_present' based on the presence of the 'rate' and 'txflags' in the overall struct. More... | |
#define | ALIGN_FACTOR 8 |
To what multiple do we align messages? 8 byte should suffice for everyone for now. More... | |
#define | MIN_BUFFER_SIZE sizeof(struct GNUNET_MessageHeader) |
Smallest supported message. More... | |
Typedefs | |
typedef void(* | MessageTokenizerCallback) (void *cls, const struct GNUNET_MessageHeader *message) |
Functions with this signature are called whenever a complete message is received by the tokenizer. More... | |
Enumerations | |
enum | RadiotapType { IEEE80211_RADIOTAP_TSFT = 0 , IEEE80211_RADIOTAP_FLAGS = 1 , IEEE80211_RADIOTAP_RATE = 2 , IEEE80211_RADIOTAP_CHANNEL = 3 , IEEE80211_RADIOTAP_FHSS = 4 , IEEE80211_RADIOTAP_DBM_ANTSIGNAL = 5 , IEEE80211_RADIOTAP_DBM_ANTNOISE = 6 , IEEE80211_RADIOTAP_LOCK_QUALITY = 7 , IEEE80211_RADIOTAP_TX_ATTENUATION = 8 , IEEE80211_RADIOTAP_DB_TX_ATTENUATION = 9 , IEEE80211_RADIOTAP_DBM_TX_POWER = 10 , IEEE80211_RADIOTAP_ANTENNA = 11 , IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12 , IEEE80211_RADIOTAP_DB_ANTNOISE = 13 , IEEE80211_RADIOTAP_RX_FLAGS = 14 , IEEE80211_RADIOTAP_TX_FLAGS = 15 , IEEE80211_RADIOTAP_RTS_RETRIES = 16 , IEEE80211_RADIOTAP_DATA_RETRIES = 17 , IEEE80211_RADIOTAP_EXT = 31 } |
Bits in the 'it_present' bitmask from the 'struct Ieee80211RadiotapHeader'. More... | |
Functions | |
struct PrismValue | __attribute__ ((packed)) |
static struct MessageStreamTokenizer * | mst_create (MessageTokenizerCallback cb, void *cb_cls) |
Create a message stream tokenizer. More... | |
static int | mst_receive (struct MessageStreamTokenizer *mst, const char *buf, size_t size) |
Add incoming data to the receive buffer and call the callback for all complete messages. More... | |
static void | mst_destroy (struct MessageStreamTokenizer *mst) |
Destroys a tokenizer. More... | |
static int | ieee80211_radiotap_iterator_init (struct Ieee80211RadiotapHeaderIterator *iterator, const struct Ieee80211RadiotapHeader *radiotap_header, size_t max_length) |
Radiotap header iteration. More... | |
static int | ieee80211_radiotap_iterator_next (struct Ieee80211RadiotapHeaderIterator *iterator) |
Returns the next radiotap parser iterator arg. More... | |
static unsigned long | calc_crc_osdep (const unsigned char *buf, size_t len) |
Calculate crc32, the start of the calculation. More... | |
static int | check_crc_buf_osdep (const unsigned char *buf, size_t len) |
Calculate and check crc of the wlan packet. More... | |
static int | get_channel_from_frequency (int32_t frequency) |
Return the channel from the frequency (in Mhz) More... | |
static int | linux_get_channel (const struct HardwareInfos *dev) |
Get the channel used by our WLAN interface. More... | |
static ssize_t | linux_read (struct HardwareInfos *dev, unsigned char *buf, size_t buf_size, struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage *ri) |
Read from the raw socket (the wlan card), parse the packet and put the result into the buffer for transmission to 'stdout'. More... | |
static int | open_device_raw (struct HardwareInfos *dev) |
Open the wireless network interface for reading/writing. More... | |
static int | test_wlan_interface (const char *iface) |
Test if the given interface name really corresponds to a wireless device. More... | |
static int | mac_test (const struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *taIeeeHeader, const struct HardwareInfos *dev) |
Test incoming packets mac for being our own. More... | |
static void | mac_set (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *taIeeeHeader, const struct HardwareInfos *dev) |
Set the wlan header to sane values to make attacks more difficult. More... | |
static void | stdin_send_hw (void *cls, const struct GNUNET_MessageHeader *hdr) |
Process data from the stdin. More... | |
int | main (int argc, char *argv[]) |
Main function of the helper. More... | |
Variables | |
uint32_t | did |
This has a different ID for each parameter, see PRISM_DID_* constants. More... | |
uint16_t | status |
See PRISM_STATUS_*-constants. More... | |
uint16_t | len |
length of data (which is always a uint32_t, but presumably this can be used to specify that fewer bytes are used (with values in 'len' from 0-4). More... | |
uint32_t | data |
The data value. More... | |
uint32_t | msgcode |
We expect this to be a PRISM_MSGCODE_*. More... | |
uint32_t | msglen |
The length of the entire header. More... | |
char | devname [16] |
Name of the device that captured the packet. More... | |
enum RadiotapType | __attribute__ |
static struct SendBuffer | write_pout |
Buffer for data read from stdin to be transmitted to the wirless card. More... | |
static struct SendBuffer | write_std |
Buffer for data read from the wireless card to be transmitted to stdout. More... | |
mediator between the wlan interface and gnunet; must run as root (SUID will do) This code will work under GNU/Linux only.
This program will allow receiving and sending traffic from the WLAN interface. It will force traffic to be in 'ad-hoc' mode, use the proper MAC address of the WLAN interface and use a GNUnet-specific SSID (and a GNUnet-specific SNAP header). It only takes a single argument, which is the name of the WLAN interface to use. The program detects if the interface is not a WLAN interface and exits with an error in that case.
Once initialized, the program will first send a 'struct GNUNET_TRANSPORT_WLAN_HelperControlMessage' to 'stdout'. That message contains the MAC address of the WLAN interface. It will then read messages from the WLAN interface and send them together with performance information as 'struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage' messages to 'stdout'. Furthermore, it will read a stream of messages from 'stdin' that have the format from 'struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage'. Those messages will then be sent via the WLAN interface; however, the sender MAC address will be forced to be the correct address from our WLAN card. If 'stdin' closes, receiving from the WLAN interface will continue. If 'stdout' causes a SIGPIPE, the process dies from the signal. Errors cause an error message to be reported to 'stderr', in most cases the process also exits (with status code '1'). The program never terminates normally; it is safe to kill the process with SIGTERM or SIGKILL at any time.
Since it uses RAW sockets, the binary must be installed SUID or run as 'root'. In order to keep the security risk of the resulting SUID binary minimal, the program ONLY opens the RAW socket with root privileges, then drops them and only then starts to process command line arguments. The code also does not link against any shared libraries (except libc) and is strictly minimal (except for checking for errors). The following list of people have reviewed this code and considered it safe since the last modification (if you reviewed it, please have your name added to the list):
Definition in file gnunet-helper-transport-wlan.c.
#define ARPHRD_ETHER 1 |
Packet format type for the messages we receive from the kernel.
This is for Ethernet 10Mbps format (no performance information included).
Definition at line 126 of file gnunet-helper-transport-wlan.c.
#define ARPHRD_IEEE80211 801 |
Packet format type for the messages we receive from the kernel.
This is for plain messages (with no performance information included).
Definition at line 134 of file gnunet-helper-transport-wlan.c.
#define ARPHRD_IEEE80211_PRISM 802 |
Packet format type for the messages we receive from the kernel.
This is for the PRISM format.
Definition at line 141 of file gnunet-helper-transport-wlan.c.
#define ARPHRD_IEEE80211_FULL 803 |
Packet format type for the messages we receive from the kernel.
This is for messages with a 'struct Ieee80211RadiotapHeader' (see below).
Definition at line 148 of file gnunet-helper-transport-wlan.c.
#define MAXLINE 4096 |
Maximum size of a message allowed in either direction (used for our receive and sent buffers).
Definition at line 155 of file gnunet-helper-transport-wlan.c.
#define PRISM_DEVICE_NAME_LENGTH 16 |
Device name length in PRISM frames.
(In the kernel, this is "WLAN_DEVNAMELEN_MAX")
Definition at line 164 of file gnunet-helper-transport-wlan.c.
#define PRISM_MSGCODE_MONITOR 0x0041 |
Monitor Frame (indicator that we have a 'struct PrismHeader').
Definition at line 169 of file gnunet-helper-transport-wlan.c.
#define PRISM_DID_MACTIME 0x2041 |
Mac time element.
In micro-seconds. Drivers appear to use a 64bit counter to hold mactime internal the then fill the prism header with the lower 32 bits
Definition at line 176 of file gnunet-helper-transport-wlan.c.
#define PRISM_DID_CHANNEL 0x3041 |
Channel element.
Definition at line 181 of file gnunet-helper-transport-wlan.c.
#define PRISM_DID_SIGNAL 0x6041 |
Signal element.
Should be the signal strength in dbm, some people suggest that instead "100 - (strength in dbm)" is used (to make this a positive integer).
Definition at line 188 of file gnunet-helper-transport-wlan.c.
#define PRISM_DID_NOISE 0x7041 |
Noise element.
Definition at line 193 of file gnunet-helper-transport-wlan.c.
#define PRISM_DID_RATE 0x8041 |
Rate element, in units/multiples of 500Khz.
Definition at line 198 of file gnunet-helper-transport-wlan.c.
#define PRISM_STATUS_OK 0 |
Value is set (supplied)
Definition at line 204 of file gnunet-helper-transport-wlan.c.
#define PRISM_STATUS_NO_VALUE 1 |
Value not supplied.
Definition at line 209 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK (1 << IEEE80211_RADIOTAP_EXT) |
Bitmask indicating an extension of the bitmask is used.
(Mask corresponding to IEEE80211_RADIOTAP_EXT).
Definition at line 443 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_CFP 0x01 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present').
The radiotap flags are an 8-bit field.
Frame was sent/received during CFP (Contention Free Period)
Definition at line 454 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_SHORTPRE 0x02 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present').
The radiotap flags are an 8-bit field.
Frame was sent/received with short preamble
Definition at line 464 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_WEP 0x04 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present').
The radiotap flags are an 8-bit field.
Frame was sent/received with WEP encryption
Definition at line 474 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_FRAG 0x08 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present').
The radiotap flags are an 8-bit field.
Frame was sent/received with fragmentation
Definition at line 484 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_FCS 0x10 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present').
The radiotap flags are an 8-bit field.
Frame includes FCS (CRC at the end that needs to be removeD).
Definition at line 494 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_DATAPAD 0x20 |
Bit in IEEE80211_RADIOTAP_FLAGS (which we might get as part of a 'struct Ieee80211RadiotapHeader' extension if the IEEE80211_RADIOTAP_FLAGS bit is set in 'it_present').
The radiotap flags are an 8-bit field.
Frame has padding between 802.11 header and payload (to 32-bit boundary)
Definition at line 505 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 |
For IEEE80211_RADIOTAP_RX_FLAGS: frame failed crc check.
Definition at line 512 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): failed due to excessive retries.
Definition at line 518 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): used cts 'protection'.
Definition at line 524 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): used rts/cts handshake.
Definition at line 530 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): frame should not be ACKed.
Definition at line 536 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_F_TX_NOSEQ 0x0010 |
For IEEE80211_RADIOTAP_TX_FLAGS ('txflags' in 'struct RadiotapTransmissionHeader'): sequence number handled by userspace.
Definition at line 542 of file gnunet-helper-transport-wlan.c.
#define IEEE80211_RADIOTAP_OUR_TRANSMISSION_HEADER_MASK |
The above 'struct RadiotapTransmissionHeader' should have the following value for 'header.it_present' based on the presence of the 'rate' and 'txflags' in the overall struct.
Definition at line 623 of file gnunet-helper-transport-wlan.c.
#define ALIGN_FACTOR 8 |
To what multiple do we align messages? 8 byte should suffice for everyone for now.
Definition at line 755 of file gnunet-helper-transport-wlan.c.
#define MIN_BUFFER_SIZE sizeof(struct GNUNET_MessageHeader) |
Smallest supported message.
Definition at line 760 of file gnunet-helper-transport-wlan.c.
typedef void(* MessageTokenizerCallback) (void *cls, const struct GNUNET_MessageHeader *message) |
Functions with this signature are called whenever a complete message is received by the tokenizer.
cls | closure |
message | the actual message |
Definition at line 770 of file gnunet-helper-transport-wlan.c.
enum RadiotapType |
Bits in the 'it_present' bitmask from the 'struct Ieee80211RadiotapHeader'.
For each value, we give the name, data type, unit and then a description below. Note that the actual size of the extension can be bigger as arguments must be padded so that args of a given length must begin at a boundary of that length. However, note that compound args are allowed (eg, 2 x uint16_t for IEEE80211_RADIOTAP_CHANNEL) so total argument length is not a reliable indicator of alignment requirement. See also 'man 9 ieee80211_radiotap'.
Definition at line 284 of file gnunet-helper-transport-wlan.c.
struct PrismValue __attribute__ | ( | (packed) | ) |
|
static |
Create a message stream tokenizer.
cb | function to call on completed messages |
cb_cls | closure for cb |
Definition at line 820 of file gnunet-helper-transport-wlan.c.
References MessageStreamTokenizer::cb, MessageStreamTokenizer::cb_cls, MIN_BUFFER_SIZE, and ret.
Referenced by main().
|
static |
Add incoming data to the receive buffer and call the callback for all complete messages.
mst | tokenizer to use |
buf | input data to add |
size | number of bytes in buf |
Definition at line 855 of file gnunet-helper-transport-wlan.c.
References ALIGN_FACTOR, buf, MessageStreamTokenizer::cb, MessageStreamTokenizer::cb_cls, MessageStreamTokenizer::curr_buf, delta, do_align(), GNUNET_memcpy, GNUNET_MIN, GNUNET_NO, GNUNET_OK, GNUNET_YES, MessageStreamTokenizer::hdr, MessageStreamTokenizer::off, MessageStreamTokenizer::pos, ret, GNUNET_MessageHeader::size, and size.
Referenced by main().
|
static |
Destroys a tokenizer.
mst | tokenizer to destroy |
Definition at line 1003 of file gnunet-helper-transport-wlan.c.
References MessageStreamTokenizer::hdr.
Referenced by main().
|
static |
Radiotap header iteration.
call __ieee80211_radiotap_iterator_init() to init a semi-opaque iterator struct Ieee80211RadiotapHeaderIterator (no need to init the struct beforehand) then loop calling __ieee80211_radiotap_iterator_next()... it returns -1 if there are no more args in the header, or the next argument type index that is present. The iterator's this_arg member points to the start of the argument associated with the current argument index that is present, which can be found in the iterator's this_arg_index member. This arg index corresponds to the IEEE80211_RADIOTAP_... defines.
iterator | iterator to initialize |
radiotap_header | message to parse |
max_length | number of valid bytes in radiotap_header |
Definition at line 1033 of file gnunet-helper-transport-wlan.c.
References GNUNET_le16toh, GNUNET_le32toh, IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK, Ieee80211RadiotapHeader::it_len, Ieee80211RadiotapHeader::it_present, Ieee80211RadiotapHeader::it_version, and iterator().
Referenced by linux_read().
|
static |
Returns the next radiotap parser iterator arg.
This function returns the next radiotap arg index (IEEE80211_RADIOTAP_...) and sets iterator->this_arg to point to the payload for the arg. It takes care of alignment handling and extended present fields. interator->this_arg can be changed by the caller. The args pointed to are in little-endian format.
iterator | radiotap_iterator to move to next arg (if any) |
Definition at line 1098 of file gnunet-helper-transport-wlan.c.
References GNUNET_le32toh, IEEE80211_RADIOTAP_ANTENNA, IEEE80211_RADIOTAP_CHANNEL, IEEE80211_RADIOTAP_DATA_RETRIES, IEEE80211_RADIOTAP_DB_ANTNOISE, IEEE80211_RADIOTAP_DB_ANTSIGNAL, IEEE80211_RADIOTAP_DB_TX_ATTENUATION, IEEE80211_RADIOTAP_DBM_ANTNOISE, IEEE80211_RADIOTAP_DBM_ANTSIGNAL, IEEE80211_RADIOTAP_DBM_TX_POWER, IEEE80211_RADIOTAP_FHSS, IEEE80211_RADIOTAP_FLAGS, IEEE80211_RADIOTAP_LOCK_QUALITY, IEEE80211_RADIOTAP_RATE, IEEE80211_RADIOTAP_RTS_RETRIES, IEEE80211_RADIOTAP_RX_FLAGS, IEEE80211_RADIOTAP_TSFT, IEEE80211_RADIOTAP_TX_ATTENUATION, IEEE80211_RADIOTAP_TX_FLAGS, and iterator().
Referenced by linux_read().
|
static |
Calculate crc32, the start of the calculation.
buf | buffer to calc the crc |
len | len of the buffer |
Definition at line 1246 of file gnunet-helper-transport-wlan.c.
Referenced by check_crc_buf_osdep().
|
static |
Calculate and check crc of the wlan packet.
buf | buffer of the packet, with len + 4 bytes of data, the last 4 bytes being the checksum |
len | length of the payload in data |
Definition at line 1332 of file gnunet-helper-transport-wlan.c.
References buf, calc_crc_osdep(), and len.
Referenced by linux_read().
|
static |
Return the channel from the frequency (in Mhz)
frequency | of the channel |
Definition at line 1357 of file gnunet-helper-transport-wlan.c.
Referenced by linux_get_channel().
|
static |
Get the channel used by our WLAN interface.
dev | pointer to the dev struct of the card |
Definition at line 1376 of file gnunet-helper-transport-wlan.c.
References HardwareInfos::fd_raw, get_channel_from_frequency(), and HardwareInfos::iface.
Referenced by linux_read().
|
static |
Read from the raw socket (the wlan card), parse the packet and put the result into the buffer for transmission to 'stdout'.
dev | pointer to the struct of the wlan card |
buf | buffer to read to; first bytes will be the 'struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame', followed by the actual payload |
buf_size | size of the buffer |
ri | where to write radiotap_rx info |
Definition at line 1408 of file gnunet-helper-transport-wlan.c.
References ARPHRD_ETHER, ARPHRD_IEEE80211, ARPHRD_IEEE80211_FULL, ARPHRD_IEEE80211_PRISM, HardwareInfos::arptype_in, buf, check_crc_buf_osdep(), PrismValue::data, PrismValue::did, HardwareInfos::fd_raw, GNUNET_le16toh, GNUNET_le64toh, GNUNET_memcpy, IEEE80211_RADIOTAP_ANTENNA, IEEE80211_RADIOTAP_CHANNEL, IEEE80211_RADIOTAP_DB_ANTNOISE, IEEE80211_RADIOTAP_DB_ANTSIGNAL, IEEE80211_RADIOTAP_DBM_ANTNOISE, IEEE80211_RADIOTAP_DBM_ANTSIGNAL, IEEE80211_RADIOTAP_F_FCS, IEEE80211_RADIOTAP_F_RX_BADFCS, IEEE80211_RADIOTAP_FLAGS, ieee80211_radiotap_iterator_init(), ieee80211_radiotap_iterator_next(), IEEE80211_RADIOTAP_RATE, IEEE80211_RADIOTAP_RX_FLAGS, IEEE80211_RADIOTAP_TSFT, Ieee80211RadiotapHeader::it_len, iterator(), linux_get_channel(), ph, PRISM_DID_CHANNEL, PRISM_DID_MACTIME, PRISM_DID_NOISE, PRISM_DID_RATE, PRISM_DID_SIGNAL, PRISM_MSGCODE_MONITOR, PRISM_STATUS_OK, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::ri_antenna, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::ri_channel, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::ri_mactime, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::ri_noise, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::ri_power, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::ri_rate, and PrismValue::status.
Referenced by main().
|
static |
Open the wireless network interface for reading/writing.
dev | pointer to the device struct |
Definition at line 1640 of file gnunet-helper-transport-wlan.c.
References ARPHRD_ETHER, ARPHRD_IEEE80211, ARPHRD_IEEE80211_FULL, ARPHRD_IEEE80211_PRISM, HardwareInfos::arptype_in, HardwareInfos::fd_raw, GNUNET_memcpy, HardwareInfos::iface, MAC_ADDR_SIZE, and HardwareInfos::pl_mac.
Referenced by main().
|
static |
Test if the given interface name really corresponds to a wireless device.
iface | name of the interface |
Definition at line 1768 of file gnunet-helper-transport-wlan.c.
References ret.
Referenced by main().
|
static |
Test incoming packets mac for being our own.
taIeeeHeader | buffer of the packet |
dev | the Hardware_Infos struct |
Definition at line 1796 of file gnunet-helper-transport-wlan.c.
References GNUNET_TRANSPORT_WLAN_Ieee80211Frame::addr1, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::addr3, all_zeros, bc_all_mac, MAC_ADDR_SIZE, mac_bssid_gnunet, and HardwareInfos::pl_mac.
Referenced by main().
|
static |
Set the wlan header to sane values to make attacks more difficult.
taIeeeHeader | pointer to the header of the packet |
dev | pointer to the Hardware_Infos struct |
Definition at line 1821 of file gnunet-helper-transport-wlan.c.
References GNUNET_TRANSPORT_WLAN_Ieee80211Frame::addr2, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::addr3, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::frame_control, IEEE80211_FC0_TYPE_DATA, mac_bssid_gnunet, and HardwareInfos::pl_mac.
Referenced by stdin_send_hw().
|
static |
Process data from the stdin.
Takes the message, prepends the radiotap transmission header, forces the sender MAC to be correct and puts it into our buffer for transmission to the kernel.
cls | pointer to the device struct ('struct HardwareInfos*') |
hdr | pointer to the start of the packet |
Definition at line 1839 of file gnunet-helper-transport-wlan.c.
References ARPHRD_ETHER, ARPHRD_IEEE80211, ARPHRD_IEEE80211_FULL, ARPHRD_IEEE80211_PRISM, HardwareInfos::arptype_in, SendBuffer::buf, GNUNET_TRANSPORT_WLAN_Ieee8023Frame::dst, GNUNET_htole16, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER, RadiotapTransmissionHeader::header, GNUNET_TRANSPORT_WLAN_RadiotapSendMessage::header, IEEE80211_RADIOTAP_F_TX_NOACK, IEEE80211_RADIOTAP_F_TX_NOSEQ, IEEE80211_RADIOTAP_OUR_TRANSMISSION_HEADER_MASK, Ieee80211RadiotapHeader::it_len, Ieee80211RadiotapHeader::it_pad, Ieee80211RadiotapHeader::it_present, Ieee80211RadiotapHeader::it_version, mac_set(), MAXLINE, RadiotapTransmissionHeader::pad1, HardwareInfos::pl_mac, RadiotapTransmissionHeader::rate, GNUNET_MessageHeader::size, SendBuffer::size, GNUNET_TRANSPORT_WLAN_Ieee8023Frame::src, RadiotapTransmissionHeader::txflags, GNUNET_MessageHeader::type, GNUNET_TRANSPORT_WLAN_Ieee8023Frame::type, and write_pout.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function of the helper.
This code accesses a WLAN interface in monitoring mode (layer 2) and then forwards traffic in both directions between the WLAN interface and stdin/stdout of this process. Error messages are written to stdout.
argc | number of arguments, must be 2 |
argv | arguments only argument is the name of the interface (e.g. 'mon0') |
Definition at line 1923 of file gnunet-helper-transport-wlan.c.
References SendBuffer::buf, HardwareInfos::fd_raw, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::frame, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER, GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL, GNUNET_TRANSPORT_WLAN_HelperControlMessage::hdr, GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage::header, HardwareInfos::iface, linux_read(), GNUNET_TRANSPORT_WLAN_HelperControlMessage::mac, mac_test(), MAXLINE, mst_create(), mst_destroy(), mst_receive(), open_device_raw(), HardwareInfos::pl_mac, SendBuffer::pos, ret, GNUNET_MessageHeader::size, SendBuffer::size, stdin_mst, stdin_send_hw(), test_wlan_interface(), GNUNET_MessageHeader::type, write_pout, and write_std.
uint32_t did |
This has a different ID for each parameter, see PRISM_DID_* constants.
Definition at line 4 of file gnunet-helper-transport-wlan.c.
uint16_t status |
See PRISM_STATUS_*-constants.
Note that they are unusual: 0 = set; 1 = not set
Definition at line 9 of file gnunet-helper-transport-wlan.c.
Referenced by add_revocation(), barrier2_cb(), barrier_cb(), barrier_wait_cb(), broadcast_status(), cb_intersection_element_removed(), check_barrier_status(), check_status(), completed_cb(), conn_2s(), controller_status_cb(), cr_cont(), create_did_cb(), deserialize_download(), enc_2s(), end_cb(), exit_status(), fork_and_exec(), gen_topo_from_file(), get_url_benchmark_data(), GNUNET_PQ_exec_prepared(), GNUNET_TESTBED_barrier_wait(), handle_auto_result(), handle_barrier_status(), handle_cadet_hangup_message(), handle_monitor_notify(), handle_response(), handle_status(), host_habitable_cb(), list_callback(), load_member_session_history(), main(), maint_child_death(), pabc_create_presentation(), plugin_callback(), print_did_document(), process_result_message(), process_status_message(), put_continuation(), remove_continuation(), requester_callback(), responder_callback(), send_ack(), send_client_element(), send_client_status_msg(), set_result_cb(), sigchld_handler(), slave_status_cb(), solver_info_cb(), srv_status(), try_reconnect(), and wbarrier_status_cb().
uint16_t len |
length of data (which is always a uint32_t, but presumably this can be used to specify that fewer bytes are used (with values in 'len' from 0-4).
We ignore this field.
Definition at line 16 of file gnunet-helper-transport-wlan.c.
Referenced by gnunet-chk.Chk::__init__(), gnunet-chk.AESKey::__init__(), typescriptdomain.LinkingHtmlFormatter::_format_lines(), address_notification(), address_to_regex(), gnunet-chk::aes_pad_(), block_create_ecdsa(), block_create_eddsa(), calc_crc_osdep(), check_crc_buf_osdep(), check_edge(), check_union_p2p_strata_estimator(), clear_from_s5r_rbuf(), client_receive(), client_send_cb(), gnunet-chk::compute_rootchk(), connect_probe_continuation(), create_keys(), create_response(), create_string_array(), curl_upload_cb(), CustomPeerMap_create(), dfa_move(), dfa_state_create(), dht_get_string_handler(), dns_value_to_string(), do_accept(), do_dns_read(), do_write(), gnunet-chk::encode_data_to_string(), encrypt_existing_match(), exchange(), expand_dollar(), gnunet_pyexpect.pexpect::expect(), expect_data_dynamic(), find_typedefs::find_typedefs(), GCP_path_entry_add(), get_cb(), get_message(), gnunet_janitor::get_process_list(), find_typedefs::get_td_from_function_signature(), find_typedefs::get_td_from_simple_type(), gn_crc32(), GNUNET_ABD_delegates_deserialize(), GNUNET_ABD_delegation_chain_deserialize(), GNUNET_ABD_delegation_set_deserialize(), GNUNET_BIO_read(), GNUNET_buffer_write(), GNUNET_buffer_write_path(), GNUNET_buffer_write_str(), GNUNET_CONFIGURATION_expand_dollar(), GNUNET_CONFIGURATION_serialize(), GNUNET_CONTAINER_multihashmap32_create(), GNUNET_CONTAINER_multihashmap_create(), GNUNET_CONTAINER_multipeermap_create(), GNUNET_CONTAINER_multishortmap_create(), GNUNET_CONTAINER_multiuuidmap_create(), GNUNET_CRYPTO_crc16_n(), GNUNET_CRYPTO_crc16_step(), GNUNET_CRYPTO_crc32_n(), GNUNET_CRYPTO_crc8_n(), GNUNET_CRYPTO_rsa_private_key_create(), GNUNET_CRYPTO_rsa_public_key_decode(), GNUNET_DISK_file_map(), GNUNET_DISK_file_read(), GNUNET_DISK_file_read_non_blocking(), GNUNET_DISK_fn_read(), GNUNET_DNSPARSER_builder_add_name(), GNUNET_FS_search_start_probe_(), GNUNET_GNSRECORD_records_deserialize(), GNUNET_GNSRECORD_records_deserialize_get_size(), GNUNET_HELLO_builder_from_url(), GNUNET_IDENTITY_read_private_key_from_buffer(), GNUNET_IDENTITY_read_signature_from_buffer(), GNUNET_IDENTITY_sign_(), GNUNET_IDENTITY_write_private_key_to_buffer(), GNUNET_JSON_from_data64(), GNUNET_memcmp_ct_(), GNUNET_NAT_register(), GNUNET_NAT_stun_handle_packet_(), GNUNET_OS_process_status(), GNUNET_PQ_exec_prepared(), GNUNET_PQ_query_param_array_abs_time(), GNUNET_RECLAIM_attribute_list_serialize(), GNUNET_RECLAIM_attribute_list_serialize_get_size(), GNUNET_RECLAIM_credential_list_serialize(), GNUNET_RECLAIM_credential_list_serialize_get_size(), GNUNET_RECLAIM_presentation_list_serialize(), GNUNET_RECLAIM_presentation_list_serialize_get_size(), GNUNET_RECLAIM_write_ticket_to_buffer(), GNUNET_REST_create_response(), GNUNET_STRINGS_base64_decode(), GNUNET_STRINGS_base64_encode(), GNUNET_STRINGS_base64url_decode(), GNUNET_STRINGS_base64url_encode(), GNUNET_STRINGS_check_filename(), GNUNET_STRINGS_conv(), GNUNET_STRINGS_filename_expand(), GNUNET_STRINGS_from_utf8(), GNUNET_STRINGS_parse_ipv4_policy(), GNUNET_STRINGS_parse_ipv6_policy(), GNUNET_STRINGS_to_utf8(), GNUNET_STRINGS_urldecode(), GNUNET_STRINGS_utf8_normalize(), GNUNET_xstrndup_(), httpdomain.httpdomain.HTTPIndex::grouping_prefix(), GST_stats_init(), handle_client_accept(), handle_connection_broken(), handle_connection_create_ack(), handle_connection_destroy(), handle_data(), httpdomain.httpdomain.HTTPResource::handle_signature(), handle_tunnel_encrypted(), handle_tunnel_kx(), handle_tunnel_kx_auth(), handle_union_p2p_strata_estimator(), http_common_address_from_socket(), initialize_key_to_element(), libgnunet_plugin_transport_tcp_init(), libgnunet_plugin_transport_unix_done(), load_list_messages(), load_list_tunnels(), load_member_session_history(), main(), modify_request(), nat_register(), natoi(), needs_parens(), neighbours_connect_notification(), on_appsink_new_sample(), packetizer(), parse_name(), prepare_ipv4_packet(), prepare_ipv6_packet(), print_peer_list(), process_sblock(), put_cb(), httpdomain.autohttp.flask_base::quickref_directive(), read_from_buffer(), read_from_file(), read_from_the_socket(), recv_message(), regex_add(), REGEX_BLOCK_create(), REGEX_BLOCK_get_key(), REGEX_BLOCK_iterate(), regex_combine(), regex_edge_iterator(), REGEX_INTERNAL_construct_dfa(), REGEX_INTERNAL_construct_nfa(), REGEX_INTERNAL_search(), regex_split(), REGEX_TEST_generate_random_string(), REGEX_TEST_read_from_file(), reply_to_dns(), resolver_lookup_get_next_label(), typescriptdomain.TypeScriptDefinition::run(), run(), s2i_full(), find_typedefs::scan_dir(), select_write_cb(), send_icmp_packet_via_tun(), send_lookup_response(), send_tcp_packet_via_tun(), send_udp_packet_via_tun(), setup_data_transfer(), start_insert(), t_ax_hmac_hash(), t_hmac_derive_key(), try_old_ax_keys(), try_top_down_reconstruction(), union_accept(), unix_plugin_get_network(), View_change_len(), View_create(), write_pid_file(), and write_to_buffer().
uint32_t data |
The data value.
Definition at line 21 of file gnunet-helper-transport-wlan.c.
Referenced by abd_string_to_value(), abd_value_to_string(), add_dns_result(), add_host(), add_record(), add_to_meta_counter(), basic_string_to_value(), basic_value_to_string(), bind_abstime(), bind_fixed_blob(), bind_nbotime(), bind_rsa_pub(), bind_rsa_sig(), bind_string(), bind_u16(), bind_u32(), bind_u64(), buffer_append(), buffer_init(), cadet_reply_proc(), calc_checksum(), check_dht_p2p_hello(), check_dht_p2p_put(), check_phone_ring(), check_pkey(), check_tcp_back(), check_tcp_data(), checkvec(), cleanup_recordinfo(), client_response_handler(), collect_tickets_cb(), configuration_receiver(), consistency_iter(), conversation_string_to_value(), conversation_value_to_string(), copy_from_reader(), count_and_separate_strings(), create_string_array(), d2j(), decoder_ogg_pad_added(), decrypt_block_with_keyword(), dht_get_id_handler(), dht_get_string_accept_handler(), dht_get_string_handler(), DID_resolve(), display_records_from_block(), dns_string_to_value(), dns_value_to_string(), do_read(), do_shutdown(), do_udp_read(), dv_hmac(), ego_sign_data(), ego_sign_data_cb(), expect_data_dynamic(), expect_data_fixed(), expi_proc(), extract_result_cb(), filter_tickets_cb(), find_full_data(), forward_resolution(), full_recursive_download(), gather_uri_data(), gen_topo_from_file(), get_any(), get_cb(), get_resp_callback(), get_result_iterator(), get_typed(), gns_string_to_value(), gns_value_to_string(), GNUNET_ABD_delegate_deserialize(), GNUNET_ABD_delegate_serialize(), GNUNET_buffer_write(), GNUNET_buffer_write_data_encoded(), GNUNET_CONTAINER_bloomfilter_get_raw_data(), GNUNET_CRYPTO_crc8_n(), GNUNET_CRYPTO_ecc_ecdh(), GNUNET_CRYPTO_mpi_scan_unsigned(), GNUNET_CRYPTO_mpi_scan_unsigned_le(), GNUNET_CRYPTO_rsa_public_key_decode(), GNUNET_CRYPTO_rsa_signature_decode(), GNUNET_DATASTORE_put(), GNUNET_DATASTORE_remove(), GNUNET_DHT_put(), GNUNET_DHT_verify_path(), GNUNET_DNSPARSER_bin_to_hex(), GNUNET_DNSPARSER_hex_to_bin(), GNUNET_FRIENDS_parse(), GNUNET_FS_data_reader_copy_(), GNUNET_FS_directory_builder_add(), GNUNET_FS_directory_builder_finish(), GNUNET_FS_directory_list_contents(), GNUNET_FS_file_information_create_from_data(), GNUNET_FS_handle_on_demand_block(), GNUNET_FS_meta_data_delete(), GNUNET_FS_meta_data_deserialize(), GNUNET_FS_meta_data_insert(), GNUNET_GNSRECORD_JSON_from_gnsrecord(), GNUNET_GNSRECORD_records_deserialize(), GNUNET_GNSRECORD_records_get_size(), GNUNET_GNSRECORD_records_serialize(), GNUNET_GNSRECORD_string_to_value(), GNUNET_GNSRECORD_value_to_string(), GNUNET_HELLO_extract_address(), GNUNET_JSON_from_data(), GNUNET_JSON_from_data64(), GNUNET_NAT_stun_handle_packet(), GNUNET_NAT_stun_handle_packet_(), GNUNET_OP_result(), GNUNET_PQ_query_param_absolute_time(), GNUNET_PQ_query_param_array_abs_time(), GNUNET_PQ_query_param_bool(), GNUNET_PQ_query_param_null(), GNUNET_PQ_query_param_relative_time(), GNUNET_PQ_query_param_rsa_public_key(), GNUNET_PQ_query_param_rsa_signature(), GNUNET_PQ_query_param_uint16(), GNUNET_PQ_query_param_uint32(), GNUNET_PQ_query_param_uint64(), GNUNET_RECLAIM_attribute_deserialize(), GNUNET_RECLAIM_attribute_list_add(), GNUNET_RECLAIM_attribute_list_deserialize(), GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_attribute_string_to_value(), GNUNET_RECLAIM_attribute_value_to_string(), GNUNET_RECLAIM_credential_deserialize(), GNUNET_RECLAIM_credential_list_deserialize(), GNUNET_RECLAIM_credential_new(), GNUNET_RECLAIM_credential_string_to_value(), GNUNET_RECLAIM_credential_value_to_string(), GNUNET_RECLAIM_presentation_deserialize(), GNUNET_RECLAIM_presentation_list_deserialize(), GNUNET_RECLAIM_presentation_new(), GNUNET_RECLAIM_presentation_string_to_value(), GNUNET_RECLAIM_presentation_value_to_string(), GNUNET_REST_create_response(), GNUNET_SECRETSHARING_share_read(), GNUNET_SQ_bind(), GNUNET_STRINGS_base64_decode(), GNUNET_STRINGS_base64_encode(), GNUNET_STRINGS_base64url_decode(), GNUNET_STRINGS_data_to_string(), GNUNET_STRINGS_urldecode(), GNUNET_STRINGS_urlencode(), GNUNET_TESTBED_controller_link(), GNUNET_TESTBED_extract_config_(), GNUNET_TESTBED_forward_operation_msg_(), GNUNET_TESTBED_get_slave_config_(), GNUNET_TESTBED_hosts_load_from_file(), GNUNET_TESTBED_LOGGER_write(), GNUNET_TESTBED_overlay_connect(), GNUNET_TESTBED_peer_create(), GNUNET_TESTBED_peer_get_information(), GNUNET_TESTBED_peer_manage_service(), GNUNET_TESTBED_peer_start(), GNUNET_TESTBED_peer_stop(), GNUNET_TESTBED_peer_update_configuration(), GNUNET_TESTBED_service_connect(), GNUNET_TESTBED_shutdown_peers(), GNUNET_TESTING_get_topo_from_file(), GNUNET_TESTING_get_topo_from_string(), GNUNET_try_compression(), handle_client_insert(), handle_datastore_reply(), handle_delegate_collection_cb(), handle_dht_p2p_put(), handle_dht_reply(), handle_dht_response(), handle_dht_result(), handle_gns_resolution_result(), handle_link_controllers_result(), handle_op_fail_event(), handle_opsuccess(), handle_p2p_reply(), handle_peer_conevent(), handle_peer_config(), handle_peer_create_success(), handle_peer_event(), handle_results(), handle_tcp_back(), handle_tcp_data(), heap_plugin_put(), heap_plugin_remove_key(), issue_ticket(), item_printer(), iter_finished(), jwt_get_issuer(), jwt_parse_attributes(), jwt_string_to_value(), jwt_value_to_string(), load_search_strings(), lookup_authz_cb(), lookup_records(), lookup_redirect_uri_result(), main(), make_file(), match_full_data(), merge_helper(), merge_with_nick_records(), messenger_string_to_value(), messenger_value_to_string(), meta_printer(), mpi_to_sexp(), mysql_plugin_put(), mysql_plugin_remove_key(), normalize_metadata(), ogg_pad_added(), op_result(), oprelease_link_controllers(), oprelease_manage_service(), oprelease_overlay_connect(), oprelease_peer_getinfo(), oprelease_peer_reconfigure(), oprelease_service_connect(), opstart_get_slave_config(), opstart_link_controllers(), opstart_manage_service(), opstart_overlay_connect(), opstart_peer_create(), opstart_peer_getinfo(), opstart_peer_reconfigure(), opstart_peer_start(), opstart_peer_stop(), opstart_service_connect(), output_vectors(), pabc_get_issuer(), pabc_parse_attributes(), pabc_string_to_value(), pabc_value_to_string(), parse(), parse_attr(), parse_credential(), parse_gnsrecordobject(), parse_jwt(), parse_record(), parse_record_data(), parsehex(), play(), policy_filename_cb(), post_data_iter(), postgres_plugin_put(), postgres_plugin_remove_key(), process_dht_put_content(), process_kblock_for_unindex(), process_local_reply(), process_lookup_result(), process_migration_content(), process_parallel_lookup_result(), process_result(), process_tickets(), put_callback(), put_cb(), record(), recursive_gns2dns_resolution(), repl_proc(), reply_to_dns(), result_processor(), revoke_attrs_cb(), rsa_sign_mpi(), run(), run_zbar(), rvk_move_attr_cb(), rvk_ticket_update(), sign_path(), sqlite_plugin_get_closest(), sqlite_plugin_put(), sqlite_plugin_remove_key(), stdin_receiver(), store_and_free_entries(), stream_read_callback(), string_to_value(), transmit_call_audio(), transmit_item(), try_match_block(), try_reconnect(), try_send_tcp(), try_send_udp(), unindex_process(), update_tickets(), value_to_string(), and write_message().
uint32_t msgcode |
We expect this to be a PRISM_MSGCODE_*.
Definition at line 3 of file gnunet-helper-transport-wlan.c.
uint32_t msglen |
The length of the entire header.
Definition at line 8 of file gnunet-helper-transport-wlan.c.
char devname[16] |
Name of the device that captured the packet.
Definition at line 13 of file gnunet-helper-transport-wlan.c.
struct PrismHeader __attribute__ |
|
static |
Buffer for data read from stdin to be transmitted to the wirless card.
Definition at line 1 of file gnunet-helper-transport-wlan.c.
Referenced by main(), and stdin_send_hw().
|
static |
Buffer for data read from the wireless card to be transmitted to stdout.
Definition at line 1 of file gnunet-helper-transport-wlan.c.
Referenced by main().