gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27679 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r27679 - gnunet/src/transport
Date: Fri, 28 Jun 2013 16:16:32 +0200

Author: wachs
Date: 2013-06-28 16:16:32 +0200 (Fri, 28 Jun 2013)
New Revision: 27679

Modified:
   gnunet/src/transport/plugin_transport_template.c
Log:
updating template with address options


Modified: gnunet/src/transport/plugin_transport_template.c
===================================================================
--- gnunet/src/transport/plugin_transport_template.c    2013-06-28 14:02:06 UTC 
(rev 27678)
+++ gnunet/src/transport/plugin_transport_template.c    2013-06-28 14:16:32 UTC 
(rev 27679)
@@ -42,6 +42,7 @@
  */
 #define LEARNED_ADDRESS_EXPIRATION GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_HOURS, 6)
 
+#define PLUGIN_NAME "template"
 
 /**
  * Encapsulation of all of the state of the plugin.
@@ -106,6 +107,20 @@
 
 };
 
+#define GNUNET_NETWORK_STRUCT_BEGIN
+
+struct TemplateAddress
+{
+       /**
+        * Address options in NBO
+        */
+       uint32_t options GNUNET_PACKED;
+
+       /* Add address here */
+};
+
+GNUNET_NETWORK_STRUCT_END
+
 /**
  * Encapsulation of all of the state of the plugin.
  */
@@ -121,6 +136,10 @@
    */
   struct Session *sessions;
 
+  /**
+   * Options in HBO to be used with addresses
+   */
+
 };
 
 
@@ -231,8 +250,7 @@
 {
   /* struct Plugin *plugin = cls; */
 
-  /* check if the address is plausible; if so,
-   * add it to our list! */
+  /* check if the address is belonging to the plugin*/
   return GNUNET_OK;
 }
 
@@ -251,6 +269,10 @@
 static const char *
 template_plugin_address_to_string (void *cls, const void *addr, size_t addrlen)
 {
+       /*
+        * Parse string in format template.options.address
+        */
+
   GNUNET_break (0);
   return NULL;
 }
@@ -272,6 +294,11 @@
 template_plugin_string_to_address (void *cls, const char *addr, uint16_t 
addrlen,
     void **buf, size_t *added)
 {
+
+       /*
+        * Print address in format template.options.address
+        */
+
   GNUNET_break (0);
   return GNUNET_SYSERR;
 }




reply via email to

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