aboutsummaryrefslogtreecommitdiff
path: root/src/transport/wlan/helper_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-25 09:18:53 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-25 09:18:53 +0000
commitbd4822b448a18c28b07754efff1d962630a0da31 (patch)
treeacc3f6657d374038bee5aac68c731487925a6d1a /src/transport/wlan/helper_common.c
parenta26f62fb03c3570f7792d3a94c177cb40ade9297 (diff)
downloadgnunet-bd4822b448a18c28b07754efff1d962630a0da31.tar.gz
gnunet-bd4822b448a18c28b07754efff1d962630a0da31.zip
inlining files from wlan, preparing to obsolete wlan subdirectory
Diffstat (limited to 'src/transport/wlan/helper_common.c')
-rw-r--r--src/transport/wlan/helper_common.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/transport/wlan/helper_common.c b/src/transport/wlan/helper_common.c
deleted file mode 100644
index 8e1c59421..000000000
--- a/src/transport/wlan/helper_common.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * helper_common.c
3 *
4 * Created on: 28.03.2011
5 * Author: David Brodski
6 */
7
8#include <sys/socket.h>
9#include <stdint.h>
10#include <stdio.h>
11#include <stdlib.h>
12#include <errno.h>
13#include <resolv.h>
14#include <string.h>
15#include <utime.h>
16#include <unistd.h>
17#include <getopt.h>
18
19#include "platform.h"
20#include "gnunet_constants.h"
21#include "gnunet_os_lib.h"
22#include "gnunet_transport_plugin.h"
23#include "transport.h"
24#include "gnunet_util_lib.h"
25#include "plugin_transport_wlan.h"
26#include "gnunet_common.h"
27#include "gnunet_transport_plugin.h"
28//#include "gnunet_util_lib.h"
29
30/**
31 * function to create GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL message for plugin
32 * @param buffer pointer to buffer for the message
33 * @param mac pointer to the mac address
34 * @return number of bytes written
35 */
36int
37send_mac_to_plugin (char *buffer, struct MacAddress *mac)
38{
39
40 struct Wlan_Helper_Control_Message macmsg;
41
42 memcpy (&macmsg.mac, (char *) mac, sizeof (struct MacAddress));
43 macmsg.hdr.size = htons (sizeof (struct Wlan_Helper_Control_Message));
44 macmsg.hdr.type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL);
45
46 memcpy (buffer, &macmsg, sizeof (struct Wlan_Helper_Control_Message));
47 return sizeof (struct Wlan_Helper_Control_Message);
48}