#include "uv.h"
#include "task.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
|
static void | addrsp (write_req_t *wr, char *hdr) |
|
static void | after_read (uv_stream_t *, ssize_t nread, const uv_buf_t *buf) |
|
static void | after_shutdown (uv_shutdown_t *req, int status) |
|
static void | after_write (uv_write_t *req, int status) |
|
static void | buf_alloc (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) |
|
static int | dns_start (int port) |
|
| HELPER_IMPL (dns_server) |
|
static void | on_close (uv_handle_t *peer) |
|
static void | on_connection (uv_stream_t *, int status) |
|
static void | process_req (uv_stream_t *handle, ssize_t nread, const uv_buf_t *buf) |
|
◆ DNSREC_LEN
◆ LEN_OFFSET
◆ QUERYID_OFFSET
◆ WRITE_BUF_LEN
#define WRITE_BUF_LEN (64*1024) |
◆ addrsp()
◆ after_read()
◆ after_shutdown()
◆ after_write()
◆ buf_alloc()
◆ dns_start()
static int dns_start |
( |
int |
port | ) |
|
|
static |
◆ HELPER_IMPL()
HELPER_IMPL |
( |
dns_server |
| ) |
|
◆ on_close()
◆ on_connection()
◆ process_req()
◆ arecord
Initial value:= {
0xc0, 0x0c, 0, 1, 0, 1, 0, 0, 5, 0xbd, 0, 4, 10, 0, 1, 1
}
Definition at line 75 of file dns-server.c.
◆ DNSRsp
Initial value:= {
0, 43, 0, 0, 0x81, 0x80, 0, 1, 0, 1, 0, 0, 0, 0
}
Definition at line 67 of file dns-server.c.
◆ loop
◆ qrecord
Initial value:= {
5, 'e', 'c', 'h', 'o', 's', 3, 's', 'r', 'v', 0, 0, 1, 0, 1
}
Definition at line 71 of file dns-server.c.
◆ server