Bitcoin ABC 0.30.5
P2P Digital Currency
|
#include <seeder/dns.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <strings.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <util/time.h>
#include <cctype>
#include <cstdbool>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
Go to the source code of this file.
Classes | |
union | control_data |
Macros | |
#define | BUFLEN 512 |
Enumerations | |
enum | dns_class { CLASS_IN = 1 , QCLASS_ANY = 255 } |
enum | dns_type { TYPE_A = 1 , TYPE_NS = 2 , TYPE_CNAME = 5 , TYPE_SOA = 6 , TYPE_MX = 15 , TYPE_AAAA = 28 , TYPE_SRV = 33 , QTYPE_ANY = 255 } |
enum class | DNSResponseCode : uint8_t { OK = 0 , FORMAT_ERROR = 1 , SERVER_FAILURE = 2 , NAME_ERROR = 3 , NOT_IMPLEMENTED = 4 , REFUSED = 5 } |
Functions | |
ParseNameStatus | parse_name (const uint8_t **inpos, const uint8_t *inend, const uint8_t *inbuf, char *buf, size_t bufsize) |
int | write_name (uint8_t **outpos, const uint8_t *outend, const char *name, int offset) |
static int | write_record (uint8_t **outpos, const uint8_t *outend, const char *name, int offset, dns_type typ, dns_class cls, int ttl) |
static int | write_record_a (uint8_t **outpos, const uint8_t *outend, const char *name, int offset, dns_class cls, int ttl, const addr_t *ip) |
static int | write_record_aaaa (uint8_t **outpos, const uint8_t *outend, const char *name, int offset, dns_class cls, int ttl, const addr_t *ip) |
static int | write_record_ns (uint8_t **outpos, const uint8_t *outend, const char *name, int offset, dns_class cls, int ttl, const char *ns) |
static int | write_record_soa (uint8_t **outpos, const uint8_t *outend, const char *name, int offset, dns_class cls, int ttl, const char *mname, const char *rname, uint32_t serial, uint32_t refresh, uint32_t retry, uint32_t expire, uint32_t minimum) |
static ssize_t | dnshandle (dns_opt_t *opt, const uint8_t *inbuf, size_t insize, uint8_t *outbuf) |
int | dnsserver (dns_opt_t *opt) |
Variables | |
static int | listenSocket = -1 |
enum dns_type |
|
strong |
|
static |
int dnsserver | ( | dns_opt_t * | opt | ) |
ParseNameStatus parse_name | ( | const uint8_t ** | inpos, |
const uint8_t * | inend, | ||
const uint8_t * | inbuf, | ||
char * | buf, | ||
size_t | bufsize | ||
) |
int write_name | ( | uint8_t ** | outpos, |
const uint8_t * | outend, | ||
const char * | name, | ||
int | offset | ||
) |
|
static |
|
static |