#include "util.h"
+#if 0
static const uint8_t wire[] = {
0xd0, 0x0e, 0x81, 0x80, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00,
0x02, 0x03, 0x77, 0x77, 0x77, 0x0b, 0x6b, 0x61, 0x6e, 0x61, 0x72,
0x00, 0x04, 0xd5, 0x85, 0x27, 0xcb, 0xc0, 0x41, 0x00, 0x01, 0x00,
0x01, 0x00, 0x00, 0xfb, 0x2c, 0x00, 0x04, 0xd4, 0xcc, 0xdb, 0x5b
};
+#endif
int
main(void)
return LDNS_STATUS_OK;
}
+#if 0
+ldns_status
+zparser_conv_long(ldns_rdf *rd, const char *longstr)
+{
+ char *end; /* Used to parse longs, ttls, etc. */
+ uint16_t *r = NULL;
+ uint32_t l;
+
+ r = (uint16_t *) region_alloc(region,
+ sizeof(uint16_t) + sizeof(uint32_t));
+ l = htonl((uint32_t)strtol(longstr, &end, 0));
+
+ if(*end != 0) {
+ error_prev_line("Long decimal value is expected");
+ } else {
+ memcpy(r + 1, &l, sizeof(uint32_t));
+ *r = sizeof(uint32_t);
+ }
+ return r;
+}
+
+ldns_status
+zparser_conv_byte(ldns_rdf *rd, const char *bytestr)
+{
+
+ /* convert a byte value to wireformat */
+ char *end; /* Used to parse longs, ttls, etc. */
+ uint16_t *r = NULL;
+
+ r = (uint16_t *) region_alloc(region,
+ sizeof(uint16_t) + sizeof(uint8_t));
+
+ *((uint8_t *)(r+1)) = (uint8_t)strtol(bytestr, &end, 0);
+
+ if(*end != 0) {
+ error_prev_line("Decimal value is expected");
+ } else {
+ *r = sizeof(uint8_t);
+ }
+ return r;
+}
+
#if 0
/**
}
-uint16_t *
-zparser_conv_long(region_type *region, const char *longstr)
-{
- char *end; /* Used to parse longs, ttls, etc. */
- uint16_t *r = NULL;
- uint32_t l;
-
- r = (uint16_t *) region_alloc(region,
- sizeof(uint16_t) + sizeof(uint32_t));
- l = htonl((uint32_t)strtol(longstr, &end, 0));
-
- if(*end != 0) {
- error_prev_line("Long decimal value is expected");
- } else {
- memcpy(r + 1, &l, sizeof(uint32_t));
- *r = sizeof(uint32_t);
- }
- return r;
-}
-
-uint16_t *
-zparser_conv_byte(region_type *region, const char *bytestr)
-{
-
- /* convert a byte value to wireformat */
- char *end; /* Used to parse longs, ttls, etc. */
- uint16_t *r = NULL;
-
- r = (uint16_t *) region_alloc(region,
- sizeof(uint16_t) + sizeof(uint8_t));
-
- *((uint8_t *)(r+1)) = (uint8_t)strtol(bytestr, &end, 0);
-
- if(*end != 0) {
- error_prev_line("Decimal value is expected");
- } else {
- *r = sizeof(uint8_t);
- }
- return r;
-}
-
uint16_t *
zparser_conv_algorithm(region_type *region, const char *algstr)
{