GNUnet  0.10.x
Data Structures | Macros | Enumerations | Functions | Variables
gnunet_gnsrecord_lib.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_GNSRECORD_Data
 A GNS record. More...
 
struct  GNUNET_GNSRECORD_PlaceData
 Data stored in a PLACE record. More...
 
struct  GNUNET_GNSRECORD_Block
 Information we have in an encrypted block with record data (i.e. More...
 
struct  GNUNET_GNSRECORD_BoxRecord
 Record type used to box up SRV and TLSA records. More...
 
struct  GNUNET_GNSRECORD_ReverseRecord
 Record type used internally to keep track of reverse mappings into a namespace. More...
 

Macros

#define GNUNET_GNSRECORD_MAX_BLOCK_SIZE   (63 * 1024)
 Maximum size of a value that can be stored in a GNS block. More...
 
#define GNUNET_GNSRECORD_TYPE_ANY   0
 Record type indicating any record/'*'. More...
 
#define GNUNET_GNSRECORD_TYPE_PKEY   65536
 Record type for GNS zone transfer ("PKEY"). More...
 
#define GNUNET_GNSRECORD_TYPE_NICK   65537
 Record type for GNS nick names ("NICK"). More...
 
#define GNUNET_GNSRECORD_TYPE_LEHO   65538
 Record type for GNS legacy hostnames ("LEHO"). More...
 
#define GNUNET_GNSRECORD_TYPE_VPN   65539
 Record type for VPN resolution. More...
 
#define GNUNET_GNSRECORD_TYPE_GNS2DNS   65540
 Record type for delegation to DNS. More...
 
#define GNUNET_GNSRECORD_TYPE_BOX   65541
 Record type for a boxed record (see TLSA/SRV handling in GNS). More...
 
#define GNUNET_GNSRECORD_TYPE_PLACE   65542
 Record type for a social place. More...
 
#define GNUNET_GNSRECORD_TYPE_PHONE   65543
 Record type for a phone (of CONVERSATION). More...
 
#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR   65544
 Record type for identity attributes (of RECLAIM). More...
 
#define GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET   65545
 Record type for local ticket references. More...
 
#define GNUNET_GNSRECORD_TYPE_CREDENTIAL   65547
 65546 reserved More...
 
#define GNUNET_GNSRECORD_TYPE_POLICY   65548
 Record type for policies. More...
 
#define GNUNET_GNSRECORD_TYPE_ATTRIBUTE   65549
 Record type for reverse lookups. More...
 
#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR_REF   65550
 Record type for reclaim records. More...
 
#define GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER   65551
 Record type for RECLAIM master. More...
 
#define GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT   65552
 Record type for reclaim OIDC clients. More...
 
#define GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT   65553
 Record type for reclaim OIDC redirect URIs. More...
 
#define GNUNET_GNSRECORD_RF_RCMP_FLAGS   (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)
 

Enumerations

enum  GNUNET_GNSRECORD_Flags { GNUNET_GNSRECORD_RF_NONE = 0, GNUNET_GNSRECORD_RF_PRIVATE = 2, GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION = 8, GNUNET_GNSRECORD_RF_SHADOW_RECORD }
 Flags that can be set for a record. More...
 

Functions

char * GNUNET_GNSRECORD_value_to_string (uint32_t type, const void *data, size_t data_size)
 Convert the binary value data of a record of type type to a human-readable string. More...
 
int GNUNET_GNSRECORD_string_to_value (uint32_t type, const char *s, void **data, size_t *data_size)
 Convert human-readable version of the value s of a record of type type to the respective binary representation. More...
 
uint32_t GNUNET_GNSRECORD_typename_to_number (const char *dns_typename)
 Convert a type name (i.e. More...
 
const char * GNUNET_GNSRECORD_number_to_typename (uint32_t type)
 Convert a type number (i.e. More...
 
ssize_t GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
 Calculate how many bytes we will need to serialize the given records. More...
 
ssize_t GNUNET_GNSRECORD_records_serialize (unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd, size_t dest_size, char *dest)
 Serialize the given records to the given destination buffer. More...
 
int GNUNET_GNSRECORD_records_deserialize (size_t len, const char *src, unsigned int rd_count, struct GNUNET_GNSRECORD_Data *dest)
 Deserialize the given records to the given destination. More...
 
int GNUNET_GNSRECORD_is_expired (const struct GNUNET_GNSRECORD_Data *rd)
 Test if a given record is expired. More...
 
char * GNUNET_GNSRECORD_string_to_lowercase (const char *src)
 Convert a UTF-8 string to UTF-8 lowercase. More...
 
const char * GNUNET_GNSRECORD_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z)
 Convert a zone to a string (for printing debug messages). More...
 
const char * GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey)
 Convert public key to the respective absolute domain name in the ".zkey" pTLD. More...
 
int GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey, struct GNUNET_CRYPTO_EcdsaPublicKey *pkey)
 Convert an absolute domain name to the respective public key. More...
 
void GNUNET_GNSRECORD_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, const char *label, struct GNUNET_HashCode *query)
 Calculate the DHT query for a given label in a given zone. More...
 
void GNUNET_GNSRECORD_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, const char *label, struct GNUNET_HashCode *query)
 Calculate the DHT query for a given label in a given zone. More...
 
struct GNUNET_GNSRECORD_BlockGNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, struct GNUNET_TIME_Absolute expire, const char *label, const struct GNUNET_GNSRECORD_Data *rd, unsigned int rd_count)
 Sign name and records. More...
 
struct GNUNET_GNSRECORD_BlockGNUNET_GNSRECORD_block_create2 (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, struct GNUNET_TIME_Absolute expire, const char *label, const struct GNUNET_GNSRECORD_Data *rd, unsigned int rd_count)
 Sign name and records, cache derived public key (also keeps the private key in static memory, so do not use this function if keeping the private key in the process'es RAM is a major issue). More...
 
int GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block)
 Check if a signature is valid. More...
 
int GNUNET_GNSRECORD_block_decrypt (const struct GNUNET_GNSRECORD_Block *block, const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, const char *label, GNUNET_GNSRECORD_RecordCallback proc, void *proc_cls)
 Decrypt block. More...
 
int GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, const struct GNUNET_GNSRECORD_Data *b)
 Compares if two records are equal. More...
 
struct GNUNET_TIME_Absolute GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
 Returns the expiration time of the given block of records. More...
 

Variables

GNUNET_NETWORK_STRUCT_END typedef void(* GNUNET_GNSRECORD_RecordCallback )(void *cls, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
 Process a records that were decrypted from a block. More...
 

Detailed Description

Author
Christian Grothoff

API that can be used to manipulate GNS record data

Definition in file gnunet_gnsrecord_lib.h.

Macro Definition Documentation

◆ GNUNET_GNSRECORD_RF_RCMP_FLAGS

#define GNUNET_GNSRECORD_RF_RCMP_FLAGS   (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)