diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 21:03:50 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 21:03:50 +0100 |
commit | fef8c5c79d628ac0823fdae238fd0b70a1f1eb94 (patch) | |
tree | 4e05a8fc5f3254fbe2b3325a7c6f6f61f892b66a /src/namestore/gnunet-namestore.c | |
parent | e6b3fec9e4a573e1f0c594a3c2f345357c0c12b8 (diff) | |
download | gnunet-fef8c5c79d628ac0823fdae238fd0b70a1f1eb94.tar.gz gnunet-fef8c5c79d628ac0823fdae238fd0b70a1f1eb94.zip |
porting.
Diffstat (limited to 'src/namestore/gnunet-namestore.c')
-rw-r--r-- | src/namestore/gnunet-namestore.c | 125 |
1 files changed, 82 insertions, 43 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 457e77022..2ce3741f8 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -1130,49 +1130,88 @@ main (int argc, | |||
1130 | is_public = -1; | 1130 | is_public = -1; |
1131 | is_shadow = -1; | 1131 | is_shadow = -1; |
1132 | 1132 | ||
1133 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 1133 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1134 | {'a', "add", NULL, | 1134 | |
1135 | gettext_noop ("add record"), 0, | 1135 | GNUNET_GETOPT_OPTION_SET_ONE ('a', |
1136 | &GNUNET_GETOPT_set_one, &add}, | 1136 | "add", |
1137 | {'d', "delete", NULL, | 1137 | gettext_noop ("add record"), |
1138 | gettext_noop ("delete record"), 0, | 1138 | &add), |
1139 | &GNUNET_GETOPT_set_one, &del}, | 1139 | |
1140 | {'D', "display", NULL, | 1140 | GNUNET_GETOPT_OPTION_SET_ONE ('d', |
1141 | gettext_noop ("display records"), 0, | 1141 | "delete", |
1142 | &GNUNET_GETOPT_set_one, &list}, | 1142 | gettext_noop ("delete record"), |
1143 | {'e', "expiration", "TIME", | 1143 | &del), |
1144 | gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), 1, | 1144 | |
1145 | &GNUNET_GETOPT_set_string, &expirationstring}, | 1145 | GNUNET_GETOPT_OPTION_SET_ONE ('D', |
1146 | {'i', "nick", "NICKNAME", | 1146 | "display", |
1147 | gettext_noop ("set the desired nick name for the zone"), 1, | 1147 | gettext_noop ("display records"), |
1148 | &GNUNET_GETOPT_set_string, &nickstring}, | 1148 | &list), |
1149 | {'m', "monitor", NULL, | 1149 | |
1150 | gettext_noop ("monitor changes in the namestore"), 0, | 1150 | GNUNET_GETOPT_OPTION_STRING ('e', |
1151 | &GNUNET_GETOPT_set_one, &monitor}, | 1151 | "expiration", |
1152 | {'n', "name", "NAME", | 1152 | "TIME", |
1153 | gettext_noop ("name of the record to add/delete/display"), 1, | 1153 | gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), |
1154 | &GNUNET_GETOPT_set_string, &name}, | 1154 | &expirationstring), |
1155 | {'r', "reverse", "PKEY", | 1155 | |
1156 | gettext_noop ("determine our name for the given PKEY"), 1, | 1156 | GNUNET_GETOPT_OPTION_STRING ('i', |
1157 | &GNUNET_GETOPT_set_string, &reverse_pkey}, | 1157 | "nick", |
1158 | {'t', "type", "TYPE", | 1158 | "NICKNAME", |
1159 | gettext_noop ("type of the record to add/delete/display"), 1, | 1159 | gettext_noop ("set the desired nick name for the zone"), |
1160 | &GNUNET_GETOPT_set_string, &typestring}, | 1160 | &nickstring), |
1161 | {'u', "uri", "URI", | 1161 | |
1162 | gettext_noop ("URI to import into our zone"), 1, | 1162 | GNUNET_GETOPT_OPTION_SET_ONE ('m', |
1163 | &GNUNET_GETOPT_set_string, &uri}, | 1163 | "monitor", |
1164 | {'V', "value", "VALUE", | 1164 | gettext_noop ("monitor changes in the namestore"), |
1165 | gettext_noop ("value of the record to add/delete"), 1, | 1165 | &monitor), |
1166 | &GNUNET_GETOPT_set_string, &value}, | 1166 | |
1167 | {'p', "public", NULL, | 1167 | GNUNET_GETOPT_OPTION_STRING ('n', |
1168 | gettext_noop ("create or list public record"), 0, | 1168 | "name", |
1169 | &GNUNET_GETOPT_set_one, &is_public}, | 1169 | "NAME", |
1170 | {'s', "shadow", NULL, | 1170 | gettext_noop ("name of the record to add/delete/display"), |
1171 | gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), 0, | 1171 | &name), |
1172 | &GNUNET_GETOPT_set_one, &is_shadow}, | 1172 | |
1173 | {'z', "zone", "EGO", | 1173 | GNUNET_GETOPT_OPTION_STRING ('r', |
1174 | gettext_noop ("name of the ego controlling the zone"), 1, | 1174 | "reverse", |
1175 | &GNUNET_GETOPT_set_string, &ego_name}, | 1175 | "PKEY", |
1176 | gettext_noop ("determine our name for the given PKEY"), | ||
1177 | &reverse_pkey), | ||
1178 | |||
1179 | |||
1180 | |||
1181 | GNUNET_GETOPT_OPTION_STRING ('t', | ||
1182 | "type", | ||
1183 | "TYPE", | ||
1184 | gettext_noop ("type of the record to add/delete/display"), | ||
1185 | &typestring), | ||
1186 | |||
1187 | GNUNET_GETOPT_OPTION_STRING ('u', | ||
1188 | "uri", | ||
1189 | "URI", | ||
1190 | gettext_noop ("URI to import into our zone"), | ||
1191 | &uri), | ||
1192 | |||
1193 | GNUNET_GETOPT_OPTION_STRING ('V', | ||
1194 | "value", | ||
1195 | "VALUE", | ||
1196 | gettext_noop ("value of the record to add/delete"), | ||
1197 | &value), | ||
1198 | |||
1199 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | ||
1200 | "public", | ||
1201 | gettext_noop ("create or list public record"), | ||
1202 | &is_public), | ||
1203 | |||
1204 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | ||
1205 | "shadow", | ||
1206 | gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), | ||
1207 | &is_shadow), | ||
1208 | |||
1209 | GNUNET_GETOPT_OPTION_STRING ('z', | ||
1210 | "zone", | ||
1211 | "EGO", | ||
1212 | gettext_noop ("name of the ego controlling the zone"), | ||
1213 | &ego_name), | ||
1214 | |||
1176 | GNUNET_GETOPT_OPTION_END | 1215 | GNUNET_GETOPT_OPTION_END |
1177 | }; | 1216 | }; |
1178 | 1217 | ||