{
char *ret;
char *name, *unique_name;
- int getinfo_result;
if (uri->type != sks)
return NULL;
- getinfo_result = GNUNET_PSEUDONYM_get_info (cfg, &uri->data.sks.namespace,
- NULL, NULL, &name, NULL);
+ (void) GNUNET_PSEUDONYM_get_info (cfg, &uri->data.sks.namespace,
+ NULL, NULL, &name, NULL);
unique_name = GNUNET_PSEUDONYM_name_uniquify (cfg, &uri->data.sks.namespace, name, NULL);
GNUNET_free (name);
GNUNET_asprintf (&ret, "%s: %s", unique_name, uri->data.sks.identifier);
******************************************************************************/
/**
- * Type of messages between the gnunet-wlan-helper and the daemon
- *
+ * Type of data messages from the plugin to the gnunet-wlan-helper
*/
-#define GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA 40
+#define GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER 39
/**
- * Control messages between the gnunet-wlan-helper and the daemon
+ * Type of data messages from the gnunet-wlan-helper to the plugin
+ */
+#define GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER 40
+
+/**
+ * Control message between the gnunet-wlan-helper and the daemon (with the MAC).
*/
#define GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL 41
struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage newheader;
in = (const struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *) hdr;
- if ( (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs (hdr->type)) ||
+ if ( (GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER != ntohs (hdr->type)) ||
(sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage) < ntohs (hdr->size)) )
{
fprintf (stderr, "Function stdin_send: wrong packet type or size\n");
}
memset (&newheader, 0, sizeof (newheader));
newheader.header.size = htons (payload_size + sizeof (newheader));
- newheader.header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA);
+ newheader.header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER);
newheader.frame = in->frame;
memcpy (write_pout->buf + write_pout->size,
&newheader,
uint16_t sendsize;
sendsize = ntohs (hdr->size);
-
- if (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs (hdr->type))
- {
- fprintf (stderr, "Function file_in_send: wrong packet type\n");
- exit (1);
- }
if ((sendsize + write_std->size) > MAXLINE * 2)
{
fprintf (stderr, "Function file_in_send: Packet too big for buffer\n");
sendsize = ntohs (hdr->size);
if ( (sendsize <
sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage)) ||
- (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs (hdr->type)) )
+ (GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER != ntohs (hdr->type)) )
{
fprintf (stderr, "Received malformed message\n");
exit (1);
+ sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage)
- sizeof (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame);
rrm->header.size = htons (write_std.size);
- rrm->header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA);
+ rrm->header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER);
}
}
}
uint16_t size)
{
header->header.size = htons (size);
- header->header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA);
+ header->header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER);
header->rate = 255;
header->tx_power = 0;
header->antenna = 0;
struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *header,
uint16_t size)
{
- header->header.type = ntohs (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA);
+ header->header.type = ntohs (GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER);
header->header.size = ntohs (size);
if (endpoint != NULL)
{
GNUNET_assert (plugin != NULL);
switch (ntohs (hdr->type))
{
- case GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA:
+ case GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER:
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
- "Func wlan_process_helper got GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA size: %u\n",
+ "Got data message from helper with %u bytes\n",
ntohs (hdr->size));
GNUNET_STATISTICS_update (plugin->env->stats,
- _("# wlan WLAN_HELPER_DATA received"), 1,
+ _("# wlan data messages received"), 1,
GNUNET_NO);
//call wlan_process_helper with the message inside, later with wlan: analyze signal
if (ntohs (hdr->size) < sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage))
{
/**
- * Type is 'GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA'.
+ * Type is 'GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER'.
*/
struct GNUNET_MessageHeader header;
{
/**
- * Type is 'GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA'.
+ * Type is 'GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER'.
*/
struct GNUNET_MessageHeader header;