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