diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-24 18:44:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-24 18:44:11 +0000 |
commit | d26b19c91736433a783ce22b2d95ed490b6d9ca6 (patch) | |
tree | 344c1d49550978c0f09004cfe822316c8894903f /src/transport/plugin_transport_http_common.h | |
parent | 4b38f90e8fecf47e27e87f9aaf95956a57e88a17 (diff) | |
download | gnunet-d26b19c91736433a783ce22b2d95ed490b6d9ca6.tar.gz gnunet-d26b19c91736433a783ce22b2d95ed490b6d9ca6.zip |
-doxygen, indentation fixes
Diffstat (limited to 'src/transport/plugin_transport_http_common.h')
-rw-r--r-- | src/transport/plugin_transport_http_common.h | 86 |
1 files changed, 49 insertions, 37 deletions
diff --git a/src/transport/plugin_transport_http_common.h b/src/transport/plugin_transport_http_common.h index 33a5b38f5..473516502 100644 --- a/src/transport/plugin_transport_http_common.h +++ b/src/transport/plugin_transport_http_common.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Christian Grothoff (and other contributing authors) | 3 | (C) 2002-2013 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -61,8 +61,8 @@ | |||
61 | 61 | ||
62 | enum HTTP_OPTIONS | 62 | enum HTTP_OPTIONS |
63 | { | 63 | { |
64 | HTTP_OPTIONS_NONE = 0, | 64 | HTTP_OPTIONS_NONE = 0, |
65 | HTTP_OPTIONS_VERIFY_CERTIFICATE = 1 | 65 | HTTP_OPTIONS_VERIFY_CERTIFICATE = 1 |
66 | }; | 66 | }; |
67 | 67 | ||
68 | 68 | ||
@@ -73,16 +73,15 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
73 | */ | 73 | */ |
74 | struct HttpAddress | 74 | struct HttpAddress |
75 | { | 75 | { |
76 | /** | 76 | /** |
77 | * Address options | 77 | * Address options |
78 | */ | 78 | */ |
79 | uint32_t options; | 79 | uint32_t options; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Length of URL located after struct | 82 | * Length of URL located after struct |
83 | * | 83 | */ |
84 | */ | 84 | uint32_t urlen; |
85 | uint32_t urlen; | ||
86 | }; | 85 | }; |
87 | 86 | ||
88 | GNUNET_NETWORK_STRUCT_END | 87 | GNUNET_NETWORK_STRUCT_END |
@@ -104,15 +103,16 @@ http_split_address (const char * addr); | |||
104 | * @param numeric should (IP) addresses be displayed in numeric form? | 103 | * @param numeric should (IP) addresses be displayed in numeric form? |
105 | * @param timeout after how long should we give up? | 104 | * @param timeout after how long should we give up? |
106 | * @param asc function to call on each string | 105 | * @param asc function to call on each string |
107 | * @param asc_cls closure for asc | 106 | * @param asc_cls closure for @a asc |
108 | */ | 107 | */ |
109 | void | 108 | void |
110 | http_common_plugin_address_pretty_printer (void *cls, const char *type, | 109 | http_common_plugin_address_pretty_printer (void *cls, const char *type, |
111 | const void *addr, size_t addrlen, | 110 | const void *addr, size_t addrlen, |
112 | int numeric, | 111 | int numeric, |
113 | struct GNUNET_TIME_Relative timeout, | 112 | struct GNUNET_TIME_Relative timeout, |
114 | GNUNET_TRANSPORT_AddressStringCallback | 113 | GNUNET_TRANSPORT_AddressStringCallback |
115 | asc, void *asc_cls); | 114 | asc, void *asc_cls); |
115 | |||
116 | 116 | ||
117 | /** | 117 | /** |
118 | * Function called for a quick conversion of the binary address to | 118 | * Function called for a quick conversion of the binary address to |
@@ -128,21 +128,22 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
128 | */ | 128 | */ |
129 | const char * | 129 | const char * |
130 | http_common_plugin_address_to_string (void *cls, | 130 | http_common_plugin_address_to_string (void *cls, |
131 | char *plugin, | 131 | const char *plugin, |
132 | const void *addr, | 132 | const void *addr, |
133 | size_t addrlen); | 133 | size_t addrlen); |
134 | 134 | ||
135 | |||
135 | /** | 136 | /** |
136 | * Function called to convert a string address to | 137 | * Function called to convert a string address to |
137 | * a binary address. | 138 | * a binary address. |
138 | * | 139 | * |
139 | * @param cls closure ('struct Plugin*') | 140 | * @param cls closure (`struct Plugin*`) |
140 | * @param addr string address | 141 | * @param addr string address |
141 | * @param addrlen length of the address | 142 | * @param addrlen length of the address |
142 | * @param buf location to store the buffer | 143 | * @param buf location to store the buffer |
143 | * If the function returns GNUNET_SYSERR, its contents are undefined. | 144 | * If the function returns #GNUNET_SYSERR, its contents are undefined. |
144 | * @param added length of created address | 145 | * @param added length of created address |
145 | * @return GNUNET_OK on success, GNUNET_SYSERR on failure | 146 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
146 | */ | 147 | */ |
147 | int | 148 | int |
148 | http_common_plugin_string_to_address (void *cls, | 149 | http_common_plugin_string_to_address (void *cls, |
@@ -156,31 +157,38 @@ http_common_plugin_string_to_address (void *cls, | |||
156 | * Create a HTTP address from a socketaddr | 157 | * Create a HTTP address from a socketaddr |
157 | * | 158 | * |
158 | * @param protocol protocol | 159 | * @param protocol protocol |
159 | * @param addr sockaddr * address | 160 | * @param addr `sockaddr *` address |
160 | * @param addrlen length of the address | 161 | * @param addrlen length of the @a addr |
161 | * @return the string | 162 | * @return the string |
162 | */ | 163 | */ |
163 | struct HttpAddress * | 164 | struct HttpAddress * |
164 | http_common_address_from_socket (const char *protocol, | 165 | http_common_address_from_socket (const char *protocol, |
165 | const struct sockaddr *addr, | 166 | const struct sockaddr *addr, |
166 | socklen_t addrlen); | 167 | socklen_t addrlen); |
168 | |||
167 | 169 | ||
168 | /** | 170 | /** |
169 | * Create a socketaddr from a HTTP address | 171 | * Create a socketaddr from a HTTP address |
170 | * | 172 | * |
171 | * @param addr sockaddr * address | 173 | * @param addr a `sockaddr *` address |
172 | * @param addrlen length of the address | 174 | * @param addrlen length of the @a addr |
173 | * @param res the result: | 175 | * @param res the result: |
174 | * GNUNET_SYSERR, invalid input, | 176 | * #GNUNET_SYSERR, invalid input, |
175 | * GNUNET_YES: could convert to ip, | 177 | * #GNUNET_YES: could convert to ip, |
176 | * GNUNET_NO: valid input but could not convert to ip (hostname?) | 178 | * #GNUNET_NO: valid input but could not convert to ip (hostname?) |
177 | * @return the string | 179 | * @return the string |
178 | */ | 180 | */ |
179 | struct sockaddr * | 181 | struct sockaddr * |
180 | http_common_socket_from_address (const void *addr, size_t addrlen, int *res); | 182 | http_common_socket_from_address (const void *addr, |
183 | size_t addrlen, | ||
184 | int *res); | ||
185 | |||
181 | 186 | ||
182 | const char * | 187 | const char * |
183 | http_common_plugin_address_to_url (void *cls, const void *addr, size_t addrlen); | 188 | http_common_plugin_address_to_url (void *cls, |
189 | const void *addr, | ||
190 | size_t addrlen); | ||
191 | |||
184 | 192 | ||
185 | /** | 193 | /** |
186 | * Get the length of an address | 194 | * Get the length of an address |
@@ -199,8 +207,12 @@ http_common_address_get_size (const struct HttpAddress * addr); | |||
199 | * @param addrlen1 address 1 length | 207 | * @param addrlen1 address 1 length |
200 | * @param addr2 address2 | 208 | * @param addr2 address2 |
201 | * @param addrlen2 address 2 length | 209 | * @param addrlen2 address 2 length |
202 | * @return GNUNET_YES if equal, GNUNET_NO else | 210 | * @return #GNUNET_YES if equal, #GNUNET_NO else |
203 | */ | 211 | */ |
204 | size_t | 212 | size_t |
205 | http_common_cmp_addresses (const void *addr1, size_t addrlen1, const void *addr2, size_t addrlen2); | 213 | http_common_cmp_addresses (const void *addr1, |
206 | /* end of plugin_transport_http_common.c */ | 214 | size_t addrlen1, |
215 | const void *addr2, | ||
216 | size_t addrlen2); | ||
217 | |||
218 | /* end of plugin_transport_http_common.h */ | ||