GNUnet  0.11.x
Data Structures | Macros | Functions
gnsrecord_serialization.c File Reference

API to serialize and deserialize GNS records. More...

#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_constants.h"
#include "gnunet_signatures.h"
#include "gnunet_arm_service.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_dnsparser_lib.h"
#include "gnunet_tun_lib.h"
Include dependency graph for gnsrecord_serialization.c:

Go to the source code of this file.

Data Structures

struct  NetworkRecord
 Internal format of a record in the serialized form. More...
 

Macros

#define LOG(kind, ...)   GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__)
 
#define DEBUG_GNSRECORDS   0
 Set to 1 to check that all records are well-formed (can be converted to string) during serialization/deserialization. More...
 

Functions

GNUNET_NETWORK_STRUCT_END 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...
 

Detailed Description

API to serialize and deserialize GNS records.

Author
Martin Schanzenbach
Matthias Wachs
Christian Grothoff

Definition in file gnsrecord_serialization.c.

Macro Definition Documentation

◆ LOG

#define LOG (   kind,
  ... 
)    GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__)

◆ DEBUG_GNSRECORDS

#define DEBUG_GNSRECORDS   0

Set to 1 to check that all records are well-formed (can be converted to string) during serialization/deserialization.

Definition at line 44 of file gnsrecord_serialization.c.