gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18904 - in gnunet: . src/dns src/include


From: gnunet
Subject: [GNUnet-SVN] r18904 - in gnunet: . src/dns src/include
Date: Mon, 2 Jan 2012 00:07:37 +0100

Author: grothoff
Date: 2012-01-02 00:07:37 +0100 (Mon, 02 Jan 2012)
New Revision: 18904

Modified:
   gnunet/configure.ac
   gnunet/src/dns/gnunet-service-dns.c
   gnunet/src/include/gnunet_dns_service.h
   gnunet/src/include/gnunet_dnsparser_lib.h
Log:
-some code cleanup

Modified: gnunet/configure.ac
===================================================================
--- gnunet/configure.ac 2012-01-01 23:01:19 UTC (rev 18903)
+++ gnunet/configure.ac 2012-01-01 23:07:37 UTC (rev 18904)
@@ -820,6 +820,7 @@
 src/datacache/Makefile
 src/datastore/Makefile
 src/dht/Makefile
+src/dns/Makefile
 src/dv/Makefile
 src/fragmentation/Makefile
 src/fs/Makefile

Modified: gnunet/src/dns/gnunet-service-dns.c
===================================================================
--- gnunet/src/dns/gnunet-service-dns.c 2012-01-01 23:01:19 UTC (rev 18903)
+++ gnunet/src/dns/gnunet-service-dns.c 2012-01-01 23:07:37 UTC (rev 18904)
@@ -41,10 +41,14 @@
 #include "gnunet_mesh_service.h"
 #include "gnunet_signatures.h"
 
-struct GNUNET_MESH_Handle *mesh_handle;
 
-struct GNUNET_CONNECTION_TransmitHandle *server_notify;
 
+
+
+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.

Modified: gnunet/src/include/gnunet_dns_service.h
===================================================================
--- gnunet/src/include/gnunet_dns_service.h     2012-01-01 23:01:19 UTC (rev 
18903)
+++ gnunet/src/include/gnunet_dns_service.h     2012-01-01 23:07:37 UTC (rev 
18904)
@@ -1,6 +1,33 @@
-#ifndef GN_DNS_SERVICE_P_H
-#define GN_DNS_SERVICE_P_H
+/*
+      This file is part of GNUnet
+      (C) 2010, 2011, 2012 Christian Grothoff (and other contributing authors)
 
+      GNUnet is free software; you can redistribute it and/or modify
+      it under the terms of the GNU General Public License as published
+      by the Free Software Foundation; either version 2, or (at your
+      option) any later version.
+
+      GNUnet is distributed in the hope that it will be useful, but
+      WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      General Public License for more details.
+
+      You should have received a copy of the GNU General Public License
+      along with GNUnet; see the file COPYING.  If not, write to the
+      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+      Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file include/gnunet_dns_service.h
+ * @brief API to access the DNS service.  Not finished at all,
+ *        currently only contains the structs for the IPC, which
+ *        don't even belong here (legacy code in transition)
+ * @author Philipp Toelke
+ */
+#ifndef GNUNET_DNS_SERVICE_H
+#define GNUNET_DNS_SERVICE_H
+
 #include "gnunet_common.h"
 
 GNUNET_NETWORK_STRUCT_BEGIN

Modified: gnunet/src/include/gnunet_dnsparser_lib.h
===================================================================
--- gnunet/src/include/gnunet_dnsparser_lib.h   2012-01-01 23:01:19 UTC (rev 
18903)
+++ gnunet/src/include/gnunet_dnsparser_lib.h   2012-01-01 23:07:37 UTC (rev 
18904)
@@ -1,6 +1,31 @@
-#ifndef _GNVPN_DNSP_H_
-#define _GNVPN_DNSP_H_
+/*
+      This file is part of GNUnet
+      (C) 2010, 2011, 2012 Christian Grothoff (and other contributing authors)
 
+      GNUnet is free software; you can redistribute it and/or modify
+      it under the terms of the GNU General Public License as published
+      by the Free Software Foundation; either version 2, or (at your
+      option) any later version.
+
+      GNUnet is distributed in the hope that it will be useful, but
+      WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      General Public License for more details.
+
+      You should have received a copy of the GNU General Public License
+      along with GNUnet; see the file COPYING.  If not, write to the
+      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+      Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file include/gnunet_dnsparse_lib.h
+ * @brief API for helper library to parse DNS packets. 
+ * @author Philipp Toelke
+ */
+#ifndef GNUNET_DNSPARSER_LIB_H
+#define GNUNET_DNSPARSER_LIB_H
+
 #include "platform.h"
 #include "gnunet_common.h"
 
@@ -50,24 +75,24 @@
 
 struct dns_query_line
 {
-  unsigned short type;
-  unsigned short class;
+  uint16_t type;
+  uint16_t class;
 };
 
 struct dns_query
 {
   char *name;
   unsigned char namelen;
-  unsigned short qtype;
-  unsigned short qclass;
+  uint16_t qtype;
+  uint16_t qclass;
 };
 
 struct dns_record_line
 {
-  unsigned short type;
-  unsigned short class;
-  unsigned int ttl;
-  unsigned short data_len;
+  uint16_t type;
+  uint16_t class;
+  uint32_t ttl;
+  uint16_t data_len;
   unsigned char data;
 };
 
@@ -75,10 +100,10 @@
 {
   char *name;
   unsigned char namelen;
-  unsigned short type;
-  unsigned short class;
-  unsigned int ttl;
-  unsigned short data_len;
+  uint16_t type;
+  uint16_t class;
+  uint32_t ttl;
+  uint16_t data_len;
   unsigned char *data;
 };
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]