libdht
|
bencoding value. More...
#include <bencode.h>
Public Types | |
enum | { BVALUE_INTEGER, BVALUE_STRING, BVALUE_LIST, BVALUE_DICTIONARY } |
Type of the value contained. | |
Data Fields | |
enum bvalue:: { ... } | type |
Type of the value contained. | |
union { | |
long long int i | |
Integer value. | |
struct { | |
unsigned char * bytes | |
string pointer (zero-terminated) | |
size_t len | |
length of the string | |
} s | |
String value. | |
struct { | |
struct bvalue ** array | |
array of elements | |
size_t len | |
number of elements | |
} l | |
List value. | |
struct { | |
char ** key | |
array of keys (in lexicographical order) | |
struct bvalue ** val | |
array of values | |
size_t len | |
number of key-value pairs | |
} d | |
Dictionary value. | |
}; | |
Type-specific data. | |
bencoding value.
A bencoding value representation capable of holding one of 4 types: "integer", "string", "list", and "dictionary".
size_t bvalue::len |
length of the string
number of key-value pairs
number of elements