GNUnet GNS service.
More...
Go to the source code of this file.
GNUnet GNS service.
- Author
- Martin Schanzenbach
Definition in file gnunet-service-gns_interceptor.h.
◆ GNS_interceptor_init()
Initialize DNS interceptor.
- Parameters
-
- Returns
- GNUNET_YES on success GNUNET_SYSERR on error
Definition at line 386 of file gnunet-service-gns_interceptor.c.
387{
389 "DNS hijacking enabled. Connecting to DNS service.\n");
393 NULL);
395 {
397 _ (
"Failed to connect to the DNS service!\n"));
399 }
401}
static void handle_dns_request(void *cls, struct GNUNET_DNS_RequestHandle *rh, size_t request_length, const char *request)
The DNS request handler.
static struct GNUNET_DNS_Handle * dns_handle
Our handle to the DNS handler library.
struct GNUNET_DNS_Handle * GNUNET_DNS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, enum GNUNET_DNS_Flags flags, GNUNET_DNS_RequestHandler rh, void *rh_cls)
Connect to the service-dns.
@ GNUNET_DNS_FLAG_PRE_RESOLUTION
This client should be called on requests that have not yet been resolved as this client provides a re...
#define GNUNET_log(kind,...)
@ GNUNET_ERROR_TYPE_ERROR
References _, dns_handle, GNUNET_DNS_connect(), GNUNET_DNS_FLAG_PRE_RESOLUTION, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_SYSERR, GNUNET_YES, and handle_dns_request().
Referenced by run().
◆ GNS_interceptor_done()
void GNS_interceptor_done |
( |
void |
| ) |
|
Stops the interceptor.
Stops the interceptor.
Definition at line 408 of file gnunet-service-gns_interceptor.c.
409{
411
413 {
416 ilh);
421 }
423 {
426 }
427}
static struct InterceptLookupHandle * ilh_head
Head of the DLL.
static struct InterceptLookupHandle * ilh_tail
Tail of the DLL.
void GNS_resolver_lookup_cancel(struct GNS_ResolverHandle *rh)
Cancel active resolution (i.e.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
void GNUNET_DNSPARSER_free_packet(struct GNUNET_DNSPARSER_Packet *p)
Free memory taken by a packet.
void GNUNET_DNS_disconnect(struct GNUNET_DNS_Handle *dh)
Disconnect from the DNS service.
void GNUNET_DNS_request_drop(struct GNUNET_DNS_RequestHandle *rh)
If a GNUNET_DNS_RequestHandler calls this function, the request is to be dropped and no response shou...
#define GNUNET_free(ptr)
Wrapper around free.
Handle to a DNS intercepted resolution request.
struct GNUNET_DNSPARSER_Packet * packet
the dns parser packet received
struct GNS_ResolverHandle * lookup
Handle for the lookup operation.
struct GNUNET_DNS_RequestHandle * request_handle
the request handle to reply to
References dns_handle, GNS_resolver_lookup_cancel(), GNUNET_CONTAINER_DLL_remove, GNUNET_DNS_disconnect(), GNUNET_DNS_request_drop(), GNUNET_DNSPARSER_free_packet(), GNUNET_free, ilh_head, ilh_tail, InterceptLookupHandle::lookup, InterceptLookupHandle::packet, and InterceptLookupHandle::request_handle.
Referenced by shutdown_task().