projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix more 'make dist' issues
[oweals/gnunet.git]
/
src
/
include
/
gnunet_dnsstub_lib.h
diff --git
a/src/include/gnunet_dnsstub_lib.h
b/src/include/gnunet_dnsstub_lib.h
index ffe82dbbe68fb3294f957831377ea27e182fca2a..1c3305f7b18735f7709637400e1b687b90fec405 100644
(file)
--- a/
src/include/gnunet_dnsstub_lib.h
+++ b/
src/include/gnunet_dnsstub_lib.h
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet
/*
This file is part of GNUnet
- (C) 2012 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2012 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@
-14,14
+14,19
@@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
*/
/**
- * @file include/gnunet_dnsstub_lib.h
- * @brief API for helper library to send DNS requests to DNS resolver
* @author Christian Grothoff
* @author Christian Grothoff
+ *
+ * @file
+ * API for helper library to send DNS requests to DNS resolver
+ *
+ * @defgroup dns-stub DNS Stub library
+ * Helper library to send DNS requests to DNS resolver
+ * @{
*/
#ifndef GNUNET_DNSSTUB_LIB_H
#define GNUNET_DNSSTUB_LIB_H
*/
#ifndef GNUNET_DNSSTUB_LIB_H
#define GNUNET_DNSSTUB_LIB_H
@@
-31,12
+36,12
@@
/**
* Opaque handle to the stub resolver.
/**
* Opaque handle to the stub resolver.
- */
+ */
struct GNUNET_DNSSTUB_Context;
/**
* Opaque handle to a socket doing UDP requests.
struct GNUNET_DNSSTUB_Context;
/**
* Opaque handle to a socket doing UDP requests.
- */
+ */
struct GNUNET_DNSSTUB_RequestSocket;
struct GNUNET_DNSSTUB_RequestSocket;
@@
-65,23
+70,25
@@
GNUNET_DNSSTUB_stop (struct GNUNET_DNSSTUB_Context *ctx);
* @param cls closure
* @param rs socket that received the response
* @param dns dns response, never NULL
* @param cls closure
* @param rs socket that received the response
* @param dns dns response, never NULL
- * @param dns_len number of bytes in
'dns'
+ * @param dns_len number of bytes in
@a dns
*/
*/
-typedef void (*GNUNET_DNSSTUB_ResultCallback)(void *cls,
- struct GNUNET_DNSSTUB_RequestSocket *rs,
- const struct GNUNET_TUN_DnsHeader *dns,
- size_t dns_len);
+typedef void
+(*GNUNET_DNSSTUB_ResultCallback)(void *cls,
+ struct GNUNET_DNSSTUB_RequestSocket *rs,
+ const struct GNUNET_TUN_DnsHeader *dns,
+ size_t dns_len);
/**
* Perform DNS resolution using given address.
*
* @param ctx stub resolver to use
/**
* Perform DNS resolution using given address.
*
* @param ctx stub resolver to use
- * @param af address family to use
+ * @param sa the socket address
+ * @param sa_len the socket length
* @param request DNS request to transmit
* @param request_len number of bytes in msg
* @param rc function to call with result
* @param request DNS request to transmit
* @param request_len number of bytes in msg
* @param rc function to call with result
- * @param rc_cls closure for
'rc'
+ * @param rc_cls closure for
@a rc
* @return socket used for the request, NULL on error
*/
struct GNUNET_DNSSTUB_RequestSocket *
* @return socket used for the request, NULL on error
*/
struct GNUNET_DNSSTUB_RequestSocket *
@@
-101,7
+108,7
@@
GNUNET_DNSSTUB_resolve (struct GNUNET_DNSSTUB_Context *ctx,
* @param request DNS request to transmit
* @param request_len number of bytes in msg
* @param rc function to call with result
* @param request DNS request to transmit
* @param request_len number of bytes in msg
* @param rc function to call with result
- * @param rc_cls closure for
'rc'
+ * @param rc_cls closure for
@a rc
* @return socket used for the request, NULL on error
*/
struct GNUNET_DNSSTUB_RequestSocket *
* @return socket used for the request, NULL on error
*/
struct GNUNET_DNSSTUB_RequestSocket *
@@
-112,4
+119,15
@@
GNUNET_DNSSTUB_resolve2 (struct GNUNET_DNSSTUB_Context *ctx,
void *rc_cls);
void *rc_cls);
+/**
+ * Cancel DNS resolution.
+ *
+ * @param rs resolution to cancel
+ */
+void
+GNUNET_DNSSTUB_resolve_cancel (struct GNUNET_DNSSTUB_RequestSocket *rs);
+
+
#endif
#endif
+
+/** @} */ /* end of group */