void sprkl_record_freepairs(struct sprkl_record *record, bool freevalues)
Frees all the pairs in a record (but not the record itself).
Definition service.c:115
int sprkl_record_write(struct sprkl_record *record, FILE *stream)
Encodes and writes a record in wire format to a stream.
Definition service.c:83
int sprkl_service_write(struct sprkl_service *service, FILE *stream)
Encodes and writes a service in wire format to a stream.
Definition service.c:6
int sprkl_service_printdebug(struct sprkl_service *service, FILE *stream)
Prints out a service for debugging purposes.
Definition service.c:34
void sprkl_service_freeparts(struct sprkl_service *service, bool records, bool signature)
Frees all the records and/or signature of a service (but not the service itself).
Definition service.c:59
int sprkl_record_read(struct sprkl_record *record, FILE *stream)
Reads and decodes a record in wire format from a stream.
Definition service.c:97
void sprkl_service_freeall(struct sprkl_service *service)
Frees all the stuff in the service, and then the service itself.
Definition service.c:77
void sprkl_record_freeall(struct sprkl_record *record)
Frees all the pairs in a record, and then the record itself.
Definition service.c:124
int sprkl_service_read(struct sprkl_service *service, FILE *stream)
Reads and decodes a service in wire format from a stream.
Definition service.c:19
A record, made up of multiple tag-value pairs.
Definition service.h:25
struct sprkl_tagval_pair * pairs
Array of pairs.
Definition service.h:27
uint16_t paircnt
Number of pairs in the record.
Definition service.h:26
A service, contains a collection of related records and is cryptographically signed.
Definition service.h:32
struct sprkl_record * records
Array of records.
Definition service.h:41
uint16_t sigsz
Length (in bytes) of the signature.
Definition service.h:33
uint8_t * signature
Signature (no terminator).
Definition service.h:34
uint32_t flags
Flags (bitfield).
Definition service.h:39
uint16_t index
Service index within its zone.
Definition service.h:35
uint16_t reccnt
Number of records in the service.
Definition service.h:40
A tag (as seen in records), aka a fancy 128-bit integer.
Definition service.h:12
uint64_t lower
Least significant half of the tag.
Definition service.h:14
uint64_t upper
Most significant half of the tag.
Definition service.h:13
A tag-value pair, contains one labelled piece of data.
Definition service.h:18
uint32_t valuesz
Length (in bytes) of the value.
Definition service.h:20
uint8_t * value
Raw value (no terminator).
Definition service.h:21