15 #ifndef LDNS_STR2WIRE_H
16 #define LDNS_STR2WIRE_H
27 #define LDNS_RR_BUF_SIZE 65535
28 #define LDNS_DEFAULT_TTL 3600
57 uint8_t* origin,
size_t origin_len);
88 size_t origin_len,
uint8_t* prev,
size_t prev_len);
107 size_t* dname_len,
uint8_t* origin,
size_t origin_len,
uint8_t* prev,
170 #define LDNS_WIREPARSE_MASK 0x0fff
171 #define LDNS_WIREPARSE_SHIFT 12
172 #define LDNS_WIREPARSE_ERROR(e) ((e)&LDNS_WIREPARSE_MASK)
173 #define LDNS_WIREPARSE_OFFSET(e) (((e)&~LDNS_WIREPARSE_MASK)>>LDNS_WIREPARSE_SHIFT)
175 #define LDNS_WIREPARSE_ERR_OK 0
176 #define LDNS_WIREPARSE_ERR_GENERAL 342
177 #define LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW 343
178 #define LDNS_WIREPARSE_ERR_DOMAINNAME_UNDERFLOW 344
179 #define LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL 345
180 #define LDNS_WIREPARSE_ERR_LABEL_OVERFLOW 346
181 #define LDNS_WIREPARSE_ERR_EMPTY_LABEL 347
182 #define LDNS_WIREPARSE_ERR_SYNTAX_BAD_ESCAPE 348
183 #define LDNS_WIREPARSE_ERR_SYNTAX 349
184 #define LDNS_WIREPARSE_ERR_SYNTAX_TTL 350
185 #define LDNS_WIREPARSE_ERR_SYNTAX_TYPE 351
186 #define LDNS_WIREPARSE_ERR_SYNTAX_CLASS 352
187 #define LDNS_WIREPARSE_ERR_SYNTAX_RDATA 353
188 #define LDNS_WIREPARSE_ERR_SYNTAX_MISSING_VALUE 354
189 #define LDNS_WIREPARSE_ERR_INVALID_STR 355
190 #define LDNS_WIREPARSE_ERR_SYNTAX_B64 356
191 #define LDNS_WIREPARSE_ERR_SYNTAX_B32_EXT 357
192 #define LDNS_WIREPARSE_ERR_SYNTAX_HEX 358
193 #define LDNS_WIREPARSE_ERR_CERT_BAD_ALGORITHM 359
194 #define LDNS_WIREPARSE_ERR_SYNTAX_TIME 360
195 #define LDNS_WIREPARSE_ERR_SYNTAX_PERIOD 361
196 #define LDNS_WIREPARSE_ERR_SYNTAX_ILNP64 362
197 #define LDNS_WIREPARSE_ERR_SYNTAX_EUI48 363
198 #define LDNS_WIREPARSE_ERR_SYNTAX_EUI64 364
199 #define LDNS_WIREPARSE_ERR_SYNTAX_TAG 365
200 #define LDNS_WIREPARSE_ERR_NOT_IMPL 366
201 #define LDNS_WIREPARSE_ERR_SYNTAX_INT 367
202 #define LDNS_WIREPARSE_ERR_SYNTAX_IP4 368
203 #define LDNS_WIREPARSE_ERR_SYNTAX_IP6 369
204 #define LDNS_WIREPARSE_ERR_SYNTAX_INTEGER_OVERFLOW 370
205 #define LDNS_WIREPARSE_ERR_INCLUDE 371
206 #define LDNS_WIREPARSE_ERR_PARENTHESIS 372
#define LDNS_MAX_DOMAINLEN
enum sldns_enum_rdf_type sldns_rdf_type
int sldns_str2wire_dname_buf_origin(const char *str, uint8_t *buf, size_t *len, uint8_t *origin, size_t origin_len)
int sldns_str2wire_str_buf(const char *str, uint8_t *rd, size_t *len)
uint32_t sldns_wirerr_get_ttl(uint8_t *rr, size_t len, size_t dname_len)
int sldns_str2wire_eui64_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_aaaa_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_cert_alg_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_tsigtime_buf(const char *str, uint8_t *rd, size_t *len)
uint8_t * sldns_str2wire_dname(const char *str, size_t *len)
uint16_t sldns_wirerr_get_class(uint8_t *rr, size_t len, size_t dname_len)
uint16_t sldns_wirerr_get_type(uint8_t *rr, size_t len, size_t dname_len)
int sldns_str2wire_nsec_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_alg_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_tsigerror_buf(const char *str, uint8_t *rd, size_t *len)
uint8_t * sldns_wirerr_get_rdata(uint8_t *rr, size_t len, size_t dname_len)
int sldns_str2wire_apl_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_period_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_b32_ext_buf(const char *str, uint8_t *rd, size_t *len)
const char * sldns_get_errorstr_parse(int e)
int sldns_str2wire_eui48_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_time_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_wks_buf(const char *str, uint8_t *rd, size_t *len)
char * sldns_strip_ws(char *line)
int sldns_str2wire_hip_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_int32_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_rr_question_buf(const char *str, uint8_t *rr, size_t *len, size_t *dname_len, uint8_t *origin, size_t origin_len, uint8_t *prev, size_t prev_len)
int sldns_str2wire_ipseckey_buf(const char *str, uint8_t *rd, size_t *len)
uint8_t * sldns_wirerr_get_rdatawl(uint8_t *rr, size_t len, size_t dname_len)
int sldns_str2wire_dname_buf(const char *str, uint8_t *buf, size_t *len)
int sldns_fp2wire_rr_buf(FILE *in, uint8_t *rr, size_t *len, size_t *dname_len, struct sldns_file_parse_state *parse_state)
int sldns_str2wire_int16_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_int8_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_int16_data_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_hex_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_a_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_b64_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_tag_buf(const char *str, uint8_t *rd, size_t *len)
uint16_t sldns_wirerr_get_rdatalen(uint8_t *rr, size_t len, size_t dname_len)
int sldns_str2wire_loc_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_rr_buf(const char *str, uint8_t *rr, size_t *len, size_t *dname_len, uint32_t default_ttl, uint8_t *origin, size_t origin_len, uint8_t *prev, size_t prev_len)
int sldns_str2wire_long_str_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_nsap_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_nsec3_salt_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_atma_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_ilnp64_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_type_buf(const char *str, uint8_t *rd, size_t *len)
int sldns_str2wire_rdf_buf(const char *str, uint8_t *rd, size_t *len, sldns_rdf_type rdftype)
int sldns_str2wire_class_buf(const char *str, uint8_t *rd, size_t *len)
uint8_t origin[LDNS_MAX_DOMAINLEN+1]
uint8_t prev_rr[LDNS_MAX_DOMAINLEN+1]