gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r20242 - in gnunet: doc/man src/gns src/util


From: gnunet
Subject: [GNUnet-SVN] r20242 - in gnunet: doc/man src/gns src/util
Date: Sun, 4 Mar 2012 17:19:07 +0100

Author: grothoff
Date: 2012-03-04 17:19:07 +0100 (Sun, 04 Mar 2012)
New Revision: 20242

Modified:
   gnunet/doc/man/gnunet-gns.1
   gnunet/src/gns/
   gnunet/src/gns/gnunet-gns.c
   gnunet/src/util/
Log:
-adding options to gnunet-gns

Modified: gnunet/doc/man/gnunet-gns.1
===================================================================
--- gnunet/doc/man/gnunet-gns.1 2012-03-04 15:02:08 UTC (rev 20241)
+++ gnunet/doc/man/gnunet-gns.1 2012-03-04 16:19:07 UTC (rev 20242)
@@ -13,20 +13,41 @@
 
 .SH OPTIONS
 .B
-.IP "\-z FILENAME, \-\-zonekey=FILENAME"
-Specifies the filename with the private key for the zone (mandatory option)
+.IP "\-a, \-\-add"
+Desired operation is adding a record
 .B
 .IP "\-c FILENAME,  \-\-config=FILENAME"
 Use the configuration file FILENAME.
 .B
+.IP "\-d, \-\-delete"
+Desired operation is deleting a record
+.B
+.IP "\-D, \-\-display"
+Desired operation is listing of matching records
+.B
+.IP "\-e TIME, \-\-expiration=TIME"
+Specifies expiration time of record to add; format is relative time, i.e "1 h" 
or "7 d 30 m".  Supported units are "ms", "s", "min" or "minutes", "h" (hours), 
"d" (days) and "a" (years).
+.B
 .IP "\-h, \-\-help"
 Print short help on options.
 .B
 .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL"
 Use LOGLEVEL for logging.  Valid values are DEBUG, INFO, WARNING and ERROR.
 .B
+.IP "\-n NAME, \-\-name=NAME"
+Name of the record to add/delete/display
+.B
+.IP "\-t TYPE, \-\-type=TYPE"
+Type of the record to add/delete/display (i.e. "A", "AAAA", "NS", "PKEY", "MX" 
etc.)
+.B
 .IP "\-v, \-\-version"
 Print GNUnet version number.
+.B
+.IP "\-V VALUE, \-\-value=VALUE"
+Value to store or remove from the GNS zone.  Specific format depends on the 
record type.  A records expect a dotted decimal IPv4 address, AAAA records an 
IPv6 address, PKEY a public key in GNUnet's printable format, and CNAME and NS 
records should be a domain name.
+.B
+.IP "\-z FILENAME, \-\-zonekey=FILENAME"
+Specifies the filename with the private key for the zone (mandatory option)
 
 
 .SH BUGS


Property changes on: gnunet/src/gns
___________________________________________________________________
Modified: svn:ignore
   - gns.conf
gnunet-service-gns
Makefile.in
Makefile
.deps

   + gnunet-gns-fcfsd
gnunet-gns
gns.conf
gnunet-service-gns
Makefile.in
Makefile
.deps


Modified: gnunet/src/gns/gnunet-gns.c
===================================================================
--- gnunet/src/gns/gnunet-gns.c 2012-03-04 15:02:08 UTC (rev 20241)
+++ gnunet/src/gns/gnunet-gns.c 2012-03-04 16:19:07 UTC (rev 20242)
@@ -48,6 +48,41 @@
  * Keyfile to manipulate.
  */
 static char *keyfile;  
+
+/**
+ * Desired action is to add a record.
+ */
+static int add;
+
+/**
+ * Desired action is to list records.
+ */
+static int list;
+
+/**
+ * Desired action is to remove a record.
+ */
+static int del;
+
+/**
+ * Name of the records to add/list/remove.
+ */
+static char *name;
+
+/**
+ * Value of the record to add/remove.
+ */
+static char *value;
+
+/**
+ * Type of the record to add/remove, NULL to remove all.
+ */
+static char *typestring;
+
+/**
+ * Desired expiration time.
+ */
+static char *expirationstring;
                
 
 /**
@@ -113,8 +148,7 @@
                  _("Failed to connect to namestore\n"));
       return;
     }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                               &do_shutdown, NULL);
+  GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
 }
 
 
@@ -129,6 +163,27 @@
 main (int argc, char *const *argv)
 {
   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
+    {'a', "add", NULL,
+     gettext_noop ("add record"), 0,
+     &GNUNET_GETOPT_set_one, &add},   
+    {'d', "delete", NULL,
+     gettext_noop ("delete record"), 0,
+     &GNUNET_GETOPT_set_one, &del},   
+    {'D', "display", NULL,
+     gettext_noop ("display records"), 0,
+     &GNUNET_GETOPT_set_one, &list},   
+    {'e', "expiration", "TIME",
+     gettext_noop ("expiration time to use (for adding only)"), 1,
+     &GNUNET_GETOPT_set_string, &expirationstring},   
+    {'n', "name", "NAME",
+     gettext_noop ("name of the record to add/delete/display"), 1,
+     &GNUNET_GETOPT_set_string, &name},   
+    {'t', "type", "TYPE",
+     gettext_noop ("type of the record to add/delete/display"), 1,
+     &GNUNET_GETOPT_set_string, &typestring},   
+    {'V', "value", "VALUE",
+     gettext_noop ("value of the record to add/delete"), 1,
+     &GNUNET_GETOPT_set_string, &value},   
     {'z', "zonekey", "FILENAME",
      gettext_noop ("filename with the zone key"), 1,
      &GNUNET_GETOPT_set_string, &keyfile},   


Property changes on: gnunet/src/util
___________________________________________________________________
Modified: svn:ignore
   - resolver.conf
test_common_logging_runtime_loglevels
test_common_logging_dummy
gnunet-config-diff
test_server_with_client_unix
gnunet-resolver
test_crypto_hkdf
test_os_start_process
test_peer.gcno
test_peer.gcda
test_peer
test_bio.gcno
test_bio.gcda
gnunet-service-resolver.gcda
test_bio
resolver_api.gcno
resolver_api.gcda
peer.gcno
peer.gcda
container_slist.gcno
container_slist.gcda
container_heap.gcno
container_heap.gcda
connection.gcno
connection.gcda
bio.gcno
bio.gcda
test_resolver_api.gcno
test_resolver_api.gcda
test_container_slist.gcno
test_container_slist.gcda
test_container_heap.gcno
test_container_heap.gcda
test_connection_transmit_cancel.gcno
test_connection_transmit_cancel.gcda
test_connection_timeout_no_connect.gcno
test_connection_timeout_no_connect.gcda
test_connection_timeout.gcno
test_connection_timeout.gcda
test_connection_receive_cancel.gcno
test_connection_receive_cancel.gcda
test_connection_addressing.gcno
test_connection_addressing.gcda
test_connection.gcno
test_connection.gcda
gnunet-service-resolver.gcno
test_resolver_api
test_container_slist
test_container_heap
gnunet-service-resolver
test_container_vector
test_connection_transmit_cancel
test_connection_timeout_no_connect
test_connection_timeout
test_connection_receive_cancel
test_connection_addressing
test_connection
time.gcno
time.gcda
test_plugin_plug.gcno
test_plugin_plug.gcda
strings.gcno
strings.gcda
signal.gcno
signal.gcda
service.gcno
service.gcda
server_tc.gcno
server_tc.gcda
server.gcno
server.gcda
scheduler.gcno
scheduler.gcda
pseudonym.gcno
pseudonym.gcda
program.gcno
program.gcda
plugin.gcno
plugin.gcda
os_priority.gcno
os_priority.gcda
os_network.gcno
os_network.gcda
os_load.gcno
os_load.gcda
os_installation.gcno
os_installation.gcda
network.gcno
network.gcda
getopt_helpers.gcno
getopt_helpers.gcda
getopt.gcno
getopt.gcda
disk.gcno
disk.gcda
crypto_rsa.gcno
crypto_rsa.gcda
crypto_random.gcno
crypto_random.gcda
crypto_ksk.gcno
crypto_ksk.gcda
crypto_hash.gcno
crypto_hash.gcda
crypto_crc.gcno
crypto_crc.gcda
crypto_aes.gcno
crypto_aes.gcda
container_multihashmap.gcno
container_multihashmap.gcda
container_meta_data.gcno
container_meta_data.gcda
container_bloomfilter.gcno
container_bloomfilter.gcda
configuration.gcno
configuration.gcda
common_logging.gcno
common_logging.gcda
common_gettext.gcno
common_gettext.gcda
common_endian.gcno
common_endian.gcda
common_allocation.gcno
common_allocation.gcda
client.gcno
client.gcda
test_time.gcda
test_strings.gcda
test_service.gcda
test_server_with_client.gcda
test_server_disconnect.gcda
test_server.gcda
test_scheduler_delay.gcda
test_scheduler.gcda
test_pseudonym.gcda
test_program.gcda
test_plugin.gcda
test_os_priority.gcda
test_os_network.gcda
test_os_load.gcda
perf_crypto_hash.gcda
test_time.gcno
test_time
test_strings.gcno
test_strings
test_service.gcno
test_service
test_server_with_client.gcno
test_server_with_client
test_server_disconnect.gcno
test_server_disconnect
test_server.gcno
test_server
test_scheduler_delay.gcno
test_scheduler_delay
test_scheduler.gcno
test_scheduler
test_pseudonym.gcno
test_pseudonym
test_program.gcno
test_program
test_plugin.gcno
test_plugin
test_os_priority.gcno
test_os_priority
test_os_network.gcno
test_os_network
test_os_load.gcno
test_os_load
test_network_transmit_cancel.gcno
test_network_transmit_cancel.gcda
test_network_transmit_cancel
test_network_timeout_no_connect.gcno
test_network_timeout_no_connect.gcda
test_network_timeout_no_connect
test_network_timeout.gcno
test_network_timeout.gcda
test_network_timeout
test_network_receive_cancel.gcno
test_network_receive_cancel.gcda
test_network_receive_cancel
test_network_addressing.gcno
test_network_addressing.gcda
test_network_addressing
test_network.gcno
test_network.gcda
test_network
test_getopt.gcno
test_getopt.gcda
test_getopt
test_disk.gcno
test_disk.gcda
test_disk
test_crypto_rsa.gcno
test_crypto_rsa.gcda
test_crypto_rsa
test_crypto_random.gcno
test_crypto_random.gcda
test_crypto_random
test_crypto_ksk.gcno
test_crypto_ksk.gcda
test_crypto_ksk
test_crypto_hash.gcno
test_crypto_hash.gcda
test_crypto_hash
test_crypto_crc.gcno
test_crypto_crc.gcda
test_crypto_crc
test_crypto_aes_weak.gcno
test_crypto_aes_weak.gcda
test_crypto_aes_weak
test_crypto_aes.gcno
test_crypto_aes.gcda
test_crypto_aes
test_container_multihashmap.gcno
test_container_multihashmap.gcda
test_container_multihashmap
test_container_meta_data.gcno
test_container_meta_data.gcda
test_container_meta_data
test_container_bloomfilter.gcno
test_container_bloomfilter.gcda
test_container_bloomfilter
test_configuration.gcno
test_configuration.gcda
test_configuration
test_common_logging.gcno
test_common_logging.gcda
test_common_logging
test_common_endian.gcno
test_common_endian.gcda
test_common_endian
test_common_allocation.gcno
test_common_allocation.gcda
test_common_allocation
test_client.gcno
test_client.gcda
test_client
perf_crypto_hash.gcno
perf_crypto_hash
Makefile.in
Makefile
.deps

   + gnunet-rsa
resolver.conf
test_common_logging_runtime_loglevels
test_common_logging_dummy
gnunet-config-diff
test_server_with_client_unix
gnunet-resolver
test_crypto_hkdf
test_os_start_process
test_peer.gcno
test_peer.gcda
test_peer
test_bio.gcno
test_bio.gcda
gnunet-service-resolver.gcda
test_bio
resolver_api.gcno
resolver_api.gcda
peer.gcno
peer.gcda
container_slist.gcno
container_slist.gcda
container_heap.gcno
container_heap.gcda
connection.gcno
connection.gcda
bio.gcno
bio.gcda
test_resolver_api.gcno
test_resolver_api.gcda
test_container_slist.gcno
test_container_slist.gcda
test_container_heap.gcno
test_container_heap.gcda
test_connection_transmit_cancel.gcno
test_connection_transmit_cancel.gcda
test_connection_timeout_no_connect.gcno
test_connection_timeout_no_connect.gcda
test_connection_timeout.gcno
test_connection_timeout.gcda
test_connection_receive_cancel.gcno
test_connection_receive_cancel.gcda
test_connection_addressing.gcno
test_connection_addressing.gcda
test_connection.gcno
test_connection.gcda
gnunet-service-resolver.gcno
test_resolver_api
test_container_slist
test_container_heap
gnunet-service-resolver
test_container_vector
test_connection_transmit_cancel
test_connection_timeout_no_connect
test_connection_timeout
test_connection_receive_cancel
test_connection_addressing
test_connection
time.gcno
time.gcda
test_plugin_plug.gcno
test_plugin_plug.gcda
strings.gcno
strings.gcda
signal.gcno
signal.gcda
service.gcno
service.gcda
server_tc.gcno
server_tc.gcda
server.gcno
server.gcda
scheduler.gcno
scheduler.gcda
pseudonym.gcno
pseudonym.gcda
program.gcno
program.gcda
plugin.gcno
plugin.gcda
os_priority.gcno
os_priority.gcda
os_network.gcno
os_network.gcda
os_load.gcno
os_load.gcda
os_installation.gcno
os_installation.gcda
network.gcno
network.gcda
getopt_helpers.gcno
getopt_helpers.gcda
getopt.gcno
getopt.gcda
disk.gcno
disk.gcda
crypto_rsa.gcno
crypto_rsa.gcda
crypto_random.gcno
crypto_random.gcda
crypto_ksk.gcno
crypto_ksk.gcda
crypto_hash.gcno
crypto_hash.gcda
crypto_crc.gcno
crypto_crc.gcda
crypto_aes.gcno
crypto_aes.gcda
container_multihashmap.gcno
container_multihashmap.gcda
container_meta_data.gcno
container_meta_data.gcda
container_bloomfilter.gcno
container_bloomfilter.gcda
configuration.gcno
configuration.gcda
common_logging.gcno
common_logging.gcda
common_gettext.gcno
common_gettext.gcda
common_endian.gcno
common_endian.gcda
common_allocation.gcno
common_allocation.gcda
client.gcno
client.gcda
test_time.gcda
test_strings.gcda
test_service.gcda
test_server_with_client.gcda
test_server_disconnect.gcda
test_server.gcda
test_scheduler_delay.gcda
test_scheduler.gcda
test_pseudonym.gcda
test_program.gcda
test_plugin.gcda
test_os_priority.gcda
test_os_network.gcda
test_os_load.gcda
perf_crypto_hash.gcda
test_time.gcno
test_time
test_strings.gcno
test_strings
test_service.gcno
test_service
test_server_with_client.gcno
test_server_with_client
test_server_disconnect.gcno
test_server_disconnect
test_server.gcno
test_server
test_scheduler_delay.gcno
test_scheduler_delay
test_scheduler.gcno
test_scheduler
test_pseudonym.gcno
test_pseudonym
test_program.gcno
test_program
test_plugin.gcno
test_plugin
test_os_priority.gcno
test_os_priority
test_os_network.gcno
test_os_network
test_os_load.gcno
test_os_load
test_network_transmit_cancel.gcno
test_network_transmit_cancel.gcda
test_network_transmit_cancel
test_network_timeout_no_connect.gcno
test_network_timeout_no_connect.gcda
test_network_timeout_no_connect
test_network_timeout.gcno
test_network_timeout.gcda
test_network_timeout
test_network_receive_cancel.gcno
test_network_receive_cancel.gcda
test_network_receive_cancel
test_network_addressing.gcno
test_network_addressing.gcda
test_network_addressing
test_network.gcno
test_network.gcda
test_network
test_getopt.gcno
test_getopt.gcda
test_getopt
test_disk.gcno
test_disk.gcda
test_disk
test_crypto_rsa.gcno
test_crypto_rsa.gcda
test_crypto_rsa
test_crypto_random.gcno
test_crypto_random.gcda
test_crypto_random
test_crypto_ksk.gcno
test_crypto_ksk.gcda
test_crypto_ksk
test_crypto_hash.gcno
test_crypto_hash.gcda
test_crypto_hash
test_crypto_crc.gcno
test_crypto_crc.gcda
test_crypto_crc
test_crypto_aes_weak.gcno
test_crypto_aes_weak.gcda
test_crypto_aes_weak
test_crypto_aes.gcno
test_crypto_aes.gcda
test_crypto_aes
test_container_multihashmap.gcno
test_container_multihashmap.gcda
test_container_multihashmap
test_container_meta_data.gcno
test_container_meta_data.gcda
test_container_meta_data
test_container_bloomfilter.gcno
test_container_bloomfilter.gcda
test_container_bloomfilter
test_configuration.gcno
test_configuration.gcda
test_configuration
test_common_logging.gcno
test_common_logging.gcda
test_common_logging
test_common_endian.gcno
test_common_endian.gcda
test_common_endian
test_common_allocation.gcno
test_common_allocation.gcda
test_common_allocation
test_client.gcno
test_client.gcda
test_client
perf_crypto_hash.gcno
perf_crypto_hash
Makefile.in
Makefile
.deps





reply via email to

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