aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-04 19:29:40 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-04 19:29:40 +0000
commitb766cf70853e0732c0785648acd74c6958fea5a7 (patch)
tree8eb92fc0f768bd1b0382bdbba3a95a6a6fc49260 /src/transport/plugin_transport_wlan.c
parent59e32c55941cd3927480d3971cec387e458914c9 (diff)
downloadgnunet-b766cf70853e0732c0785648acd74c6958fea5a7.tar.gz
gnunet-b766cf70853e0732c0785648acd74c6958fea5a7.zip
implementing plugins subsystem
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index d90522062..2f32b53c2 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1353,8 +1353,10 @@ send_hello_beacon(struct Plugin * plugin)
1353 struct ieee80211_frame * ieeewlanheader; 1353 struct ieee80211_frame * ieeewlanheader;
1354 struct Radiotap_Send * radioHeader; 1354 struct Radiotap_Send * radioHeader;
1355 struct GNUNET_MessageHeader * msgheader2; 1355 struct GNUNET_MessageHeader * msgheader2;
1356 const struct GNUNET_MessageHeader *hello;
1356 1357
1357 hallo_size = GNUNET_HELLO_size(*(plugin->env->our_hello)); 1358 hello = plugin->env->get_our_hello ();
1359 hallo_size = GNUNET_HELLO_size(hello);
1358 GNUNET_assert(sizeof(struct WlanHeader) + hallo_size <= WLAN_MTU); 1360 GNUNET_assert(sizeof(struct WlanHeader) + hallo_size <= WLAN_MTU);
1359 size = sizeof(struct GNUNET_MessageHeader) + sizeof(struct Radiotap_Send) 1361 size = sizeof(struct GNUNET_MessageHeader) + sizeof(struct Radiotap_Send)
1360 + sizeof(struct ieee80211_frame) + sizeof(struct GNUNET_MessageHeader) 1362 + sizeof(struct ieee80211_frame) + sizeof(struct GNUNET_MessageHeader)
@@ -1370,12 +1372,11 @@ send_hello_beacon(struct Plugin * plugin)
1370 getWlanHeader(ieeewlanheader, &bc_all_mac, plugin, size); 1372 getWlanHeader(ieeewlanheader, &bc_all_mac, plugin, size);
1371 1373
1372 msgheader2 = (struct GNUNET_MessageHeader*) &ieeewlanheader[1]; 1374 msgheader2 = (struct GNUNET_MessageHeader*) &ieeewlanheader[1];
1373 msgheader2->size = htons( 1375 msgheader2->size = htons(GNUNET_HELLO_size(hello)
1374 GNUNET_HELLO_size(*(plugin->env->our_hello))
1375 + sizeof(struct GNUNET_MessageHeader)); 1376 + sizeof(struct GNUNET_MessageHeader));
1376 1377
1377 msgheader2->type = htons(GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT); 1378 msgheader2->type = htons(GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT);
1378 memcpy(&msgheader2[1], *plugin->env->our_hello, hallo_size); 1379 memcpy(&msgheader2[1], hello, hallo_size);
1379 1380
1380 bytes = GNUNET_DISK_file_write(plugin->server_stdin_handle, msgheader, size); 1381 bytes = GNUNET_DISK_file_write(plugin->server_stdin_handle, msgheader, size);
1381 1382