program to send via WLAN as much as possible (to test physical/theoretical throughput) More...
Go to the source code of this file.
Macros | |
#define | WLAN_MTU 1500 |
#define | WLAN_LLC_DSAP_FIELD 0x1f |
LLC fields for better compatibility. More... | |
#define | WLAN_LLC_SSAP_FIELD 0x1f |
#define | IEEE80211_ADDR_LEN 6 /* size of 802.11 address */ |
#define | IEEE80211_FC0_VERSION_MASK 0x03 |
#define | IEEE80211_FC0_VERSION_SHIFT 0 |
#define | IEEE80211_FC0_VERSION_0 0x00 |
#define | IEEE80211_FC0_TYPE_MASK 0x0c |
#define | IEEE80211_FC0_TYPE_SHIFT 2 |
#define | IEEE80211_FC0_TYPE_MGT 0x00 |
#define | IEEE80211_FC0_TYPE_CTL 0x04 |
#define | IEEE80211_FC0_TYPE_DATA 0x08 |
Functions | |
static int | getRadiotapHeader (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *header, uint16_t size) |
function to fill the radiotap header More... | |
static int | getWlanHeader (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *Header, const struct GNUNET_TRANSPORT_WLAN_MacAddress *to_mac_addr, const struct GNUNET_TRANSPORT_WLAN_MacAddress *mac, unsigned int size) |
function to generate the wlan hardware header for one packet More... | |
int | main (int argc, char *argv[]) |
program to send via WLAN as much as possible (to test physical/theoretical throughput)
Definition in file gnunet-transport-wlan-sender.c.
#define WLAN_MTU 1500 |
Definition at line 30 of file gnunet-transport-wlan-sender.c.
#define WLAN_LLC_DSAP_FIELD 0x1f |
LLC fields for better compatibility.
Definition at line 35 of file gnunet-transport-wlan-sender.c.
#define WLAN_LLC_SSAP_FIELD 0x1f |
Definition at line 36 of file gnunet-transport-wlan-sender.c.
Definition at line 38 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_VERSION_MASK 0x03 |
Definition at line 40 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_VERSION_SHIFT 0 |
Definition at line 41 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_VERSION_0 0x00 |
Definition at line 42 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_TYPE_MASK 0x0c |
Definition at line 43 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_TYPE_SHIFT 2 |
Definition at line 44 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_TYPE_MGT 0x00 |
Definition at line 45 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_TYPE_CTL 0x04 |
Definition at line 46 of file gnunet-transport-wlan-sender.c.
#define IEEE80211_FC0_TYPE_DATA 0x08 |
Definition at line 47 of file gnunet-transport-wlan-sender.c.
|
static |
function to fill the radiotap header
header | pointer to the radiotap header |
size | total message size |
Definition at line 57 of file gnunet-transport-wlan-sender.c.
References GNUNET_TRANSPORT_WLAN_RadiotapSendMessage::antenna, GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER, GNUNET_YES, GNUNET_TRANSPORT_WLAN_RadiotapSendMessage::header, GNUNET_TRANSPORT_WLAN_RadiotapSendMessage::rate, GNUNET_MessageHeader::size, size, GNUNET_TRANSPORT_WLAN_RadiotapSendMessage::tx_power, and GNUNET_MessageHeader::type.
Referenced by main().
|
static |
function to generate the wlan hardware header for one packet
Header | address to write the header to |
to_mac_addr | pointer to the address of the recipient |
mac | pointer to the mac address to send from (normally overwritten over by helper) |
size | size of the whole packet, needed to calculate the time to send the packet |
Definition at line 78 of file gnunet-transport-wlan-sender.c.
References GNUNET_TRANSPORT_WLAN_Ieee80211Frame::addr1, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::addr2, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::addr3, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::duration, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::frame_control, GNUNET_htole16, GNUNET_YES, IEEE80211_FC0_TYPE_DATA, GNUNET_TRANSPORT_WLAN_Ieee80211Frame::llc, mac_bssid_gnunet, size, WLAN_LLC_DSAP_FIELD, and WLAN_LLC_SSAP_FIELD.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 99 of file gnunet-transport-wlan-sender.c.
References GNUNET_TRANSPORT_WLAN_RadiotapSendMessage::frame, getRadiotapHeader(), getWlanHeader(), GNUNET_TRANSPORT_WLAN_HelperControlMessage::mac, GNUNET_TRANSPORT_WLAN_MacAddress::mac, pid, ret, start, and WLAN_MTU.