{
struct GNUNET_NAMESTORE_Header gns_header;
- /* The zone */
+ /**
+ * The zone
+ */
GNUNET_HashCode zone;
- /* Requested record type */
+ /**
+ * Requested record type
+ */
uint32_t record_type;
- /* Requested record type */
+ /**
+ * Length of the name
+ */
uint32_t name_len;
+
+ /* 0-terminated name here */
};
/**
* Lookup response
* Memory layout:
- * [struct LookupNameResponseMessage][struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded][char *name][rc_count * struct GNUNET_NAMESTORE_RecordData][struct GNUNET_CRYPTO_RsaSignature]
+ * [struct LookupNameResponseMessage][char *name][rc_count * struct GNUNET_NAMESTORE_RecordData]
*/
struct LookupNameResponseMessage
{
uint16_t rd_count;
- int32_t contains_sig;
+ int16_t contains_sig;
+
+ /**
+ * All zeros if 'contains_sig' is GNUNET_NO.
+ */
+ struct GNUNET_CRYPTO_RsaSignature signature;
- /* Requested record type */
+ /**
+ *
+ */
+ struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key;
+
+ /* 0-terminated name and serialized record data */
};
/**
* Put a record to the namestore
* Memory layout:
- * [struct RecordPutMessage][struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded][char *name][rc_count * struct GNUNET_NAMESTORE_RecordData]
+ * [struct RecordPutMessage][char *name][rc_count * struct GNUNET_NAMESTORE_RecordData]
*/
struct RecordPutMessage
{
*/
struct GNUNET_NAMESTORE_Header gns_header;
- /* Contenct starts here */
+ /**
+ *
+ */
+ struct GNUNET_TIME_AbsoluteNBO expire;
- /* name length */
+ /**
+ * name length
+ */
uint16_t name_len;
- /* Length of serialized rd data */
+ /**
+ * Length of serialized rd data
+ */
uint16_t rd_len;
- /* Number of records contained */
+ /**
+ * Number of records contained
+ */
uint16_t rd_count;
- /* Length of pubkey */
- uint16_t key_len;
-
- struct GNUNET_TIME_AbsoluteNBO expire;
+ /**
+ * always zero (for alignment)
+ */
+ uint16_t reserved;
+ /**
+ *
+ */
struct GNUNET_CRYPTO_RsaSignature signature;
+
+ /**
+ *
+ */
+ struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key;
+
+ /* name (0-terminated) followed by "rd_count" serialized records */
+
};
/**
* Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_PUT_RESPONSE
*/
- struct GNUNET_MessageHeader header;
-
- /**
- * Operation ID in NBO
- */
- uint32_t op_id;
-
- /* Contenct starts here */
+ struct GNUNET_NAMESTORE_Header gns_header;
/**
- * name length: GNUNET_NO (0) on error, GNUNET_OK (1) on success
+ * name length: GNUNET_NO (0) on error, GNUNET_OK (1) on success
*/
- uint16_t op_result;
+ int32_t op_result;
};
*/
struct GNUNET_NAMESTORE_Header gns_header;
- /* Contenct starts here */
+ struct GNUNET_TIME_AbsoluteNBO expire;
- /* name length */
+ /**
+ * name length
+ */
uint16_t name_len;
- /* Record data length */
+ /**
+ * Record data length
+ */
uint16_t rd_len;
- /* Record count */
+ /**
+ * Record count
+ */
uint16_t rd_count;
- /* private key length */
+ /**
+ * private key length
+ */
uint16_t pkey_len;
+
+ /* followed by: name and serialized record data --- PK??? */
};
*/
struct GNUNET_NAMESTORE_Header gns_header;
- /* Contenct starts here */
-
/**
- * name length: GNUNET_NO already existsw, GNUNET_YES on success, GNUNET_SYSERR error
+ * name length: GNUNET_NO already exists, GNUNET_YES on success, GNUNET_SYSERR error
*/
- int16_t op_result;
-
+ int32_t op_result;
};
*/
struct GNUNET_NAMESTORE_Header gns_header;
- /* Contenct starts here */
-
- /* Name length */
+ /**
+ * Name length
+ */
uint16_t name_len;
- /* Length of serialized rd data */
+ /**
+ * Length of serialized rd data
+ */
uint16_t rd_len;
- /* Number of records contained */
+ /**
+ * Number of records contained
+ */
uint16_t rd_count;
- /* Length of pubkey */
+ /**
+ * Length of pubkey
+ */
uint16_t key_len;
};
*/
struct GNUNET_NAMESTORE_Header gns_header;
- /* Contenct starts here */
-
/**
* result:
* 0 : successful
* 3 : Failed to create new signature
* 4 : Failed to put new set of records in database
*/
- uint16_t op_result;
+ int32_t op_result;
};
{
struct GNUNET_NAMESTORE_Header gns_header;
- /* The hash of public key of the zone to look up in */
+ /**
+ * The hash of public key of the zone to look up in
+ */
GNUNET_HashCode zone;
- /* The hash of the public key of the target zone */
+ /**
+ * The hash of the public key of the target zone
+ */
GNUNET_HashCode value_zone;
};
uint16_t rd_count;
- int32_t contains_sig;
-
/* result in NBO: GNUNET_OK on success, GNUNET_NO if there were no results, GNUNET_SYSERR on error */
int16_t res;
+ /**
+ *
+ */
+ struct GNUNET_CRYPTO_RsaSignature signature;
+
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded zone_key;
};
*/
struct GNUNET_NAMESTORE_Header gns_header;
- /* Contenct starts here */
+ GNUNET_HashCode zone;
uint16_t must_have_flags;
+
uint16_t must_not_have_flags;
- GNUNET_HashCode zone;
};
};
/**
- * Ask for next result of zone iteration for the given operation
+ * Next result of zone iteration for the given operation
+ * // FIXME: use 'struct LookupResponseMessage' instead? (identical except
+ * for having 'contains_sig' instead of 'reserved', but fully compatible otherwise).
*/
struct ZoneIterationResponseMessage
{
uint16_t name_len;
- uint16_t contains_sig;
-
/* Record data length */
uint16_t rd_len;
+ /**
+ * Number of records contained
+ */
+ uint16_t rd_count;
+
+ /**
+ * always zero (for alignment)
+ */
+ uint16_t reserved;
+
+ /**
+ * All zeros if 'contains_sig' is GNUNET_NO.
+ */
+ struct GNUNET_CRYPTO_RsaSignature signature;
+
+ /**
+ *
+ */
+ struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key;
+
+
+
};
GNUNET_NETWORK_STRUCT_END