[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r18935 - gnunet/src/dns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r18935 - gnunet/src/dns |
Date: |
Mon, 2 Jan 2012 11:38:00 +0100 |
Author: grothoff
Date: 2012-01-02 11:38:00 +0100 (Mon, 02 Jan 2012)
New Revision: 18935
Modified:
gnunet/src/dns/gnunet-service-dns.c
Log:
-minor cleanup
Modified: gnunet/src/dns/gnunet-service-dns.c
===================================================================
--- gnunet/src/dns/gnunet-service-dns.c 2012-01-02 10:34:48 UTC (rev 18934)
+++ gnunet/src/dns/gnunet-service-dns.c 2012-01-02 10:38:00 UTC (rev 18935)
@@ -43,55 +43,7 @@
#include "dns.h"
-
-
-struct answer_packet_list
-{
- struct answer_packet_list *next GNUNET_PACKED;
- struct answer_packet_list *prev GNUNET_PACKED;
- struct GNUNET_SERVER_Client *client;
- struct answer_packet pkt;
-};
-
-
-
-static struct GNUNET_MESH_Handle *mesh_handle;
-
-static struct GNUNET_CONNECTION_TransmitHandle *server_notify;
-
/**
- * The UDP-Socket through which DNS-Resolves will be sent if they are not to be
- * sent through gnunet. The port of this socket will not be hijacked.
- */
-static struct GNUNET_NETWORK_Handle *dnsout;
-static struct GNUNET_NETWORK_Handle *dnsout6;
-
-/**
- * The port bound to the socket dnsout
- */
-static unsigned short dnsoutport;
-
-/**
- * A handle to the DHT-Service
- */
-static struct GNUNET_DHT_Handle *dht;
-
-/**
- * The configuration to use
- */
-static const struct GNUNET_CONFIGURATION_Handle *cfg;
-
-/**
- * A list of DNS-Responses that have to be sent to the requesting client
- */
-static struct answer_packet_list *head;
-
-/**
- * The tail of the list of DNS-responses
- */
-static struct answer_packet_list *tail;
-
-/**
* A structure containing a mapping from network-byte-ordered DNS-id (16 bit)
to
* some information needed to handle this query
*
@@ -139,6 +91,65 @@
struct GNUNET_MESH_TransmitHandle *th;
};
+
+struct answer_packet_list
+{
+ struct answer_packet_list *next;
+ struct answer_packet_list *prev;
+ struct GNUNET_SERVER_Client *client;
+ struct answer_packet pkt;
+};
+
+GNUNET_NETWORK_STRUCT_BEGIN
+struct tunnel_cls
+{
+ struct GNUNET_MESH_Tunnel *tunnel;
+ struct GNUNET_MessageHeader hdr;
+ struct dns_pkt dns;
+};
+GNUNET_NETWORK_STRUCT_END
+
+struct tunnel_cls *remote_pending[UINT16_MAX];
+
+
+static struct GNUNET_MESH_Handle *mesh_handle;
+
+static struct GNUNET_CONNECTION_TransmitHandle *server_notify;
+
+/**
+ * The UDP-Socket through which DNS-Resolves will be sent if they are not to be
+ * sent through gnunet. The port of this socket will not be hijacked.
+ */
+static struct GNUNET_NETWORK_Handle *dnsout;
+
+static struct GNUNET_NETWORK_Handle *dnsout6;
+
+/**
+ * The port bound to the socket dnsout
+ */
+static unsigned short dnsoutport;
+
+/**
+ * A handle to the DHT-Service
+ */
+static struct GNUNET_DHT_Handle *dht;
+
+/**
+ * The configuration to use
+ */
+static const struct GNUNET_CONFIGURATION_Handle *cfg;
+
+/**
+ * A list of DNS-Responses that have to be sent to the requesting client
+ */
+static struct answer_packet_list *head;
+
+/**
+ * The tail of the list of DNS-responses
+ */
+static struct answer_packet_list *tail;
+
+
static size_t
send_answer (void *cls, size_t size, void *buf);
@@ -300,18 +311,7 @@
return len;
}
-GNUNET_NETWORK_STRUCT_BEGIN
-struct tunnel_cls
-{
- struct GNUNET_MESH_Tunnel *tunnel GNUNET_PACKED;
- struct GNUNET_MessageHeader hdr;
- struct dns_pkt dns;
-};
-GNUNET_NETWORK_STRUCT_END
-
-struct tunnel_cls *remote_pending[UINT16_MAX];
-
static size_t
mesh_send_response (void *cls, size_t size, void *buf)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r18935 - gnunet/src/dns,
gnunet <=