[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33111 - in gnunet: doc/man src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33111 - in gnunet: doc/man src/namestore |
Date: |
Fri, 18 Apr 2014 14:20:18 +0200 |
Author: grothoff
Date: 2014-04-18 14:20:18 +0200 (Fri, 18 Apr 2014)
New Revision: 33111
Modified:
gnunet/doc/man/gnunet-namestore.1
gnunet/src/namestore/gnunet-namestore.c
Log:
hack namestore pending capability
Modified: gnunet/doc/man/gnunet-namestore.1
===================================================================
--- gnunet/doc/man/gnunet-namestore.1 2014-04-18 09:51:04 UTC (rev 33110)
+++ gnunet/doc/man/gnunet-namestore.1 2014-04-18 12:20:18 UTC (rev 33111)
@@ -1,4 +1,4 @@
-.TH GNUNET\-NAMESTORE 1 "Mar 5, 2012" "GNUnet"
+.TH GNUNET\-NAMESTORE 1 "Apr 15, 2014" "GNUnet"
.SH NAME
gnunet\-namestore \- manipulate GNUnet zones
@@ -9,7 +9,7 @@
.br
.SH DESCRIPTION
-\fBgnunet\-namestore\fP can be used to create and manipulate a GNS zone.
+\fBgnunet\-namestore\fP can be used to manipulate records in a GNS zone.
.SH OPTIONS
.B
@@ -31,6 +31,9 @@
.IP "\-h, \-\-help"
Print short help on options.
.B
+.IP "\-i NICKNAME, \-\-nick=NICKNAME"
+Set the desired NICKNAME for the zone. The nickname will be included in all
(public) records and used as the suggested name for this zone.
+.B
.IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL"
Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR.
.B
@@ -40,9 +43,18 @@
.IP "\-n NAME, \-\-name=NAME"
Name of the record to add/delete/display
.B
+.IP "\-p, \-\-public"
+Create a record that is public (shared with other users that know the label)
+.B
+.IP "\-P, \-\-pending"
+Create a record that is pending approval (stored in the namestore but
unavailable for resolution to anyone)
+.B
.IP "\-r PKEY, \-\-reverse=PKEY"
Determine our GNS name for the given public key (reverse lookup of the PKEY)
in the given zone.
.B
+.IP "\-s, \-\-shadow"
+Create a record that is a shadow record. Shadow records are only used once
all other records of the same type under the same label have expired.
+.B
.IP "\-t TYPE, \-\-type=TYPE"
Type of the record to add/delete/display (i.e. "A", "AAAA", "NS", "PKEY", "MX"
etc.)
.B
@@ -64,4 +76,5 @@
.SH "SEE ALSO"
-\fBgnunet\-gns\fP(1)
+\fBgnunet\-gns\fP(1), \fBgnunet\-namestore\-gtk\fP(1)
+
Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c 2014-04-18 09:51:04 UTC (rev
33110)
+++ gnunet/src/namestore/gnunet-namestore.c 2014-04-18 12:20:18 UTC (rev
33111)
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- (C) 2012, 2013 Christian Grothoff (and other contributing authors)
+ (C) 2012, 2013, 2014 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
@@ -102,14 +102,19 @@
/**
* Is record public (opposite of #GNUNET_GNSRECORD_RF_PRIVATE)
*/
-static int public;
+static int is_public;
/**
* Is record a shadow record (#GNUNET_GNSRECORD_RF_SHADOW_RECORD)
*/
-static int shadow;
+static int is_shadow;
/**
+ * Is record pending approval (#GNUNET_GNSRECORD_RF_PENDING)
+ */
+static int is_pending;
+
+/**
* Queue entry for the 'del' operation.
*/
static struct GNUNET_NAMESTORE_QueueEntry *del_qe;
@@ -475,10 +480,12 @@
rde->data = data;
rde->data_size = data_size;
rde->record_type = type;
- if (1 == shadow)
+ if (1 == is_shadow)
rde->flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
- if (1 != public)
+ if (1 != is_public)
rde->flags |= GNUNET_GNSRECORD_RF_PRIVATE;
+ if (1 == is_pending)
+ rde->flags |= GNUNET_GNSRECORD_RF_PENDING;
if (GNUNET_YES == etime_is_rel)
{
rde->expiration_time = etime_rel.rel_value_us;
@@ -732,7 +739,7 @@
else
rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
- if (1 == shadow)
+ if (1 == is_shadow)
rd.flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
add_qe_uri = GNUNET_NAMESTORE_records_store (ns,
&zone_pkey,
@@ -905,8 +912,9 @@
int
main (int argc, char *const *argv)
{
- public = -1;
- shadow = -1;
+ is_public = -1;
+ is_pending = -1;
+ is_shadow = -1;
static const struct GNUNET_GETOPT_CommandLineOption options[] = {
{'a', "add", NULL,
@@ -944,10 +952,13 @@
&GNUNET_GETOPT_set_string, &value},
{'p', "public", NULL,
gettext_noop ("create or list public record"), 0,
- &GNUNET_GETOPT_set_one, &public},
+ &GNUNET_GETOPT_set_one, &is_public},
+ {'P', "pending", NULL,
+ gettext_noop ("create record that is pending approval (and thus for now
inactive)"), 0,
+ &GNUNET_GETOPT_set_one, &is_pending},
{'s', "shadow", NULL,
gettext_noop ("create shadow record (only valid if all other records of
the same type have expired"), 0,
- &GNUNET_GETOPT_set_one, &shadow},
+ &GNUNET_GETOPT_set_one, &is_shadow},
{'z', "zone", "EGO",
gettext_noop ("name of the ego controlling the zone"), 1,
&GNUNET_GETOPT_set_string, &ego_name},
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33111 - in gnunet: doc/man src/namestore,
gnunet <=