diff options
Diffstat (limited to 'src/include/gnunet_resolver_service.h')
-rw-r--r-- | src/include/gnunet_resolver_service.h | 60 |
1 files changed, 24 insertions, 36 deletions
diff --git a/src/include/gnunet_resolver_service.h b/src/include/gnunet_resolver_service.h index f24bf5c5e..e55a014e6 100644 --- a/src/include/gnunet_resolver_service.h +++ b/src/include/gnunet_resolver_service.h | |||
@@ -63,13 +63,15 @@ struct GNUNET_RESOLVER_RequestHandle; | |||
63 | * | 63 | * |
64 | * @param cfg configuration to use | 64 | * @param cfg configuration to use |
65 | */ | 65 | */ |
66 | void GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c); | 66 | void |
67 | GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c); | ||
67 | 68 | ||
68 | 69 | ||
69 | /** | 70 | /** |
70 | * Destroy the connection to the resolver service. | 71 | * Destroy the connection to the resolver service. |
71 | */ | 72 | */ |
72 | void GNUNET_RESOLVER_disconnect (void); | 73 | void |
74 | GNUNET_RESOLVER_disconnect (void); | ||
73 | 75 | ||
74 | 76 | ||
75 | /** | 77 | /** |
@@ -82,16 +84,11 @@ void GNUNET_RESOLVER_disconnect (void); | |||
82 | * @param timeout how long to try resolving | 84 | * @param timeout how long to try resolving |
83 | * @return handle that can be used to cancel the request, NULL on error | 85 | * @return handle that can be used to cancel the request, NULL on error |
84 | */ | 86 | */ |
85 | struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_ip_get (const char | 87 | struct GNUNET_RESOLVER_RequestHandle * |
86 | *hostname, | 88 | GNUNET_RESOLVER_ip_get (const char *hostname, int domain, |
87 | int domain, | 89 | struct GNUNET_TIME_Relative timeout, |
88 | struct | 90 | GNUNET_RESOLVER_AddressCallback callback, |
89 | GNUNET_TIME_Relative | 91 | void *callback_cls); |
90 | timeout, | ||
91 | GNUNET_RESOLVER_AddressCallback | ||
92 | callback, | ||
93 | void | ||
94 | *callback_cls); | ||
95 | 92 | ||
96 | 93 | ||
97 | /** | 94 | /** |
@@ -104,15 +101,11 @@ struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_ip_get (const char | |||
104 | * @param timeout how long to try resolving | 101 | * @param timeout how long to try resolving |
105 | * @return handle that can be used to cancel the request, NULL on error | 102 | * @return handle that can be used to cancel the request, NULL on error |
106 | */ | 103 | */ |
107 | struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_resolve (int | 104 | struct GNUNET_RESOLVER_RequestHandle * |
108 | domain, | 105 | GNUNET_RESOLVER_hostname_resolve (int domain, |
109 | struct | 106 | struct GNUNET_TIME_Relative timeout, |
110 | GNUNET_TIME_Relative | 107 | GNUNET_RESOLVER_AddressCallback callback, |
111 | timeout, | 108 | void *cls); |
112 | GNUNET_RESOLVER_AddressCallback | ||
113 | callback, | ||
114 | void | ||
115 | *cls); | ||
116 | 109 | ||
117 | 110 | ||
118 | /** | 111 | /** |
@@ -130,7 +123,8 @@ typedef void (*GNUNET_RESOLVER_HostnameCallback) (void *cls, | |||
130 | * | 123 | * |
131 | * @return local hostname, caller must free | 124 | * @return local hostname, caller must free |
132 | */ | 125 | */ |
133 | char *GNUNET_RESOLVER_local_fqdn_get (void); | 126 | char * |
127 | GNUNET_RESOLVER_local_fqdn_get (void); | ||
134 | 128 | ||
135 | 129 | ||
136 | /** | 130 | /** |
@@ -145,19 +139,12 @@ char *GNUNET_RESOLVER_local_fqdn_get (void); | |||
145 | * @param cls closure for callback | 139 | * @param cls closure for callback |
146 | * @return handle that can be used to cancel the request, NULL on error | 140 | * @return handle that can be used to cancel the request, NULL on error |
147 | */ | 141 | */ |
148 | struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_get (const struct | 142 | struct GNUNET_RESOLVER_RequestHandle * |
149 | sockaddr | 143 | GNUNET_RESOLVER_hostname_get (const struct sockaddr *sa, socklen_t salen, |
150 | *sa, | 144 | int do_resolve, |
151 | socklen_t | 145 | struct GNUNET_TIME_Relative timeout, |
152 | salen, | 146 | GNUNET_RESOLVER_HostnameCallback callback, |
153 | int | 147 | void *cls); |
154 | do_resolve, | ||
155 | struct | ||
156 | GNUNET_TIME_Relative | ||
157 | timeout, | ||
158 | GNUNET_RESOLVER_HostnameCallback | ||
159 | callback, | ||
160 | void *cls); | ||
161 | 148 | ||
162 | 149 | ||
163 | /** | 150 | /** |
@@ -168,7 +155,8 @@ struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_get (const struct | |||
168 | * | 155 | * |
169 | * @param rh handle of request to cancel | 156 | * @param rh handle of request to cancel |
170 | */ | 157 | */ |
171 | void GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *rh); | 158 | void |
159 | GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *rh); | ||
172 | 160 | ||
173 | 161 | ||
174 | #if 0 /* keep Emacsens' auto-indent happy */ | 162 | #if 0 /* keep Emacsens' auto-indent happy */ |