Changes to update Tomato RAF.
[tomato.git] / release / src / router / dnscrypt / src / proxy / tcp_request_p.h
blobc2667b45c6dae586bd65409bde8ee4c401a0296d
2 #ifndef __TCP_REQUEST_H_P__
3 #define __TCP_REQUEST_H_P__ 1
5 #include <sys/types.h>
7 #include <stdint.h>
9 #include <event2/event.h>
11 #include "dnscrypt.h"
12 #include "queue.h"
14 typedef struct TCPRequestStatus_ {
15 _Bool has_dns_query_len : 1;
16 _Bool has_dns_reply_len : 1;
17 _Bool is_in_queue : 1;
18 _Bool is_dying : 1;
19 } TCPRequestStatus;
21 typedef struct TCPRequest_ {
22 uint8_t client_nonce[crypto_box_HALF_NONCEBYTES];
23 TAILQ_ENTRY(TCPRequest_) queue;
24 struct bufferevent *client_proxy_bev;
25 struct bufferevent *proxy_resolver_bev;
26 struct evbuffer *proxy_resolver_query_evbuf;
27 ProxyContext *proxy_context;
28 struct event *timeout_timer;
29 TCPRequestStatus status;
30 size_t dns_query_len;
31 size_t dns_reply_len;
32 } TCPRequest;
34 #endif