Changeset 1bfd3d3 in mainline for uspace/lib
- Timestamp:
- 2010-11-19T22:02:09Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 973ef9fc, a9c6b966
- Parents:
- cc3c2a1c
- Location:
- uspace/lib
- Files:
-
- 30 edited
-
c/generic/adt/char_map.c (modified) (8 diffs)
-
c/generic/adt/dynamic_fifo.c (modified) (6 diffs)
-
c/generic/adt/measured_strings.c (modified) (7 diffs)
-
c/generic/net/icmp_api.c (modified) (1 diff)
-
c/generic/net/icmp_common.c (modified) (1 diff)
-
c/generic/net/inet.c (modified) (2 diffs)
-
c/generic/net/modules.c (modified) (4 diffs)
-
c/generic/net/packet.c (modified) (11 diffs)
-
c/generic/net/socket_client.c (modified) (19 diffs)
-
c/include/net/modules.h (modified) (1 diff)
-
c/include/net/packet_header.h (modified) (1 diff)
-
net/adt/module_map.c (modified) (3 diffs)
-
net/generic/generic.c (modified) (2 diffs)
-
net/generic/net_checksum.c (modified) (6 diffs)
-
net/generic/net_remote.c (modified) (3 diffs)
-
net/generic/packet_client.c (modified) (10 diffs)
-
net/generic/packet_remote.c (modified) (3 diffs)
-
net/generic/protocol_map.c (modified) (5 diffs)
-
net/il/arp_remote.c (modified) (6 diffs)
-
net/il/ip_client.c (modified) (5 diffs)
-
net/il/ip_remote.c (modified) (2 diffs)
-
net/include/il_local.h (modified) (2 diffs)
-
net/include/ip_interface.h (modified) (1 diff)
-
net/include/packet_client.h (modified) (3 diffs)
-
net/include/tl_local.h (modified) (2 diffs)
-
net/tl/icmp_client.c (modified) (2 diffs)
-
net/tl/icmp_remote.c (modified) (4 diffs)
-
net/tl/socket_core.c (modified) (10 diffs)
-
net/tl/tl_common.c (modified) (5 diffs)
-
packet/generic/packet_server.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/char_map.c
rcc3c2a1c r1bfd3d3 60 60 * @param[in] value The integral value to be stored for the key character 61 61 * string. 62 * @return sEOK on success.63 * @return sENOMEM if there is not enough memory left.64 * @return sEEXIST if the key character string is already used.62 * @return EOK on success. 63 * @return ENOMEM if there is not enough memory left. 64 * @return EEXIST if the key character string is already used. 65 65 */ 66 66 static int … … 107 107 * 108 108 * @param[in] map The character string to integer map. 109 * @return sTRUE if the map is valid.110 * @return sFALSE otherwise.109 * @return TRUE if the map is valid. 110 * @return FALSE otherwise. 111 111 */ 112 112 static int char_map_is_valid(const char_map_t *map) … … 127 127 * @param[in] value The integral value to be stored for the key character 128 128 * string. 129 * @return sEOK on success.130 * @return sEINVAL if the map is not valid.131 * @return sEINVAL if the identifier parameter is NULL.132 * @return sEINVAL if the length parameter zero (0) and the129 * @return EOK on success. 130 * @return EINVAL if the map is not valid. 131 * @return EINVAL if the identifier parameter is NULL. 132 * @return EINVAL if the length parameter zero (0) and the 133 133 * identifier parameter is an empty character string (the 134 134 * first character is the terminating zero ('\0') 135 135 * character. 136 * @return sEEXIST if the key character string is already used.137 * @return sOther error codes as defined for the136 * @return EEXIST if the key character string is already used. 137 * @return Other error codes as defined for the 138 138 * char_map_add_item() function. 139 139 */ … … 196 196 * zero (0) which means that the string is processed until 197 197 * the terminating zero ('\0') character is found. 198 * @return sThe node holding the integral value assigned to the key198 * @return The node holding the integral value assigned to the key 199 199 * character string. 200 * @return sNULL if the key is not assigned a node.200 * @return NULL if the key is not assigned a node. 201 201 */ 202 202 static char_map_t * … … 239 239 * zero (0) which means that the string is processed until 240 240 * the terminating zero ('\0') character is found. 241 * @return sThe integral value assigned to the key character string.242 * @return sCHAR_MAP_NULL if the key is not assigned a value.241 * @return The integral value assigned to the key character string. 242 * @return CHAR_MAP_NULL if the key is not assigned a value. 243 243 */ 244 244 int char_map_exclude(char_map_t *map, const char *identifier, size_t length) … … 267 267 * zero (0) which means that the string is processed until 268 268 * the terminating zero ('\0') character is found. 269 * @return sThe integral value assigned to the key character string.270 * @return sCHAR_MAP_NULL if the key is not assigned a value.269 * @return The integral value assigned to the key character string. 270 * @return CHAR_MAP_NULL if the key is not assigned a value. 271 271 */ 272 272 int char_map_find(const char_map_t *map, const char *identifier, size_t length) … … 281 281 * 282 282 * @param[in,out] map The character string to integer map. 283 * @return sEOK on success.284 * @return sEINVAL if the map parameter is NULL.285 * @return sENOMEM if there is not enough memory left.283 * @return EOK on success. 284 * @return EINVAL if the map parameter is NULL. 285 * @return ENOMEM if there is not enough memory left. 286 286 */ 287 287 int char_map_initialize(char_map_t *map) … … 319 319 * @param[in] value The integral value to be stored for the key character 320 320 * string. 321 * @return sEOK on success.322 * @return sEINVAL if the map is not valid.323 * @return sEINVAL if the identifier parameter is NULL.324 * @return sEINVAL if the length parameter zero (0) and the321 * @return EOK on success. 322 * @return EINVAL if the map is not valid. 323 * @return EINVAL if the identifier parameter is NULL. 324 * @return EINVAL if the length parameter zero (0) and the 325 325 * identifier parameter is an empty character string (the 326 326 * first character is the terminating zero ('\0) character. 327 * @return sEEXIST if the key character string is already used.328 * @return sOther error codes as defined for the char_map_add_item()327 * @return EEXIST if the key character string is already used. 328 * @return Other error codes as defined for the char_map_add_item() 329 329 * function. 330 330 */ -
uspace/lib/c/generic/adt/dynamic_fifo.c
rcc3c2a1c r1bfd3d3 56 56 * 57 57 * @param[in] fifo The dynamic queue. 58 * @return sTRUE if the queue is valid.59 * @return sFALSE otherwise.58 * @return TRUE if the queue is valid. 59 * @return FALSE otherwise. 60 60 */ 61 61 static int dyn_fifo_is_valid(dyn_fifo_t *fifo) … … 68 68 * @param[in,out] fifo The dynamic queue. 69 69 * @param[in] size The initial queue size. 70 * @return sEOK on success.71 * @return sEINVAL if the queue is not valid.72 * @return sEBADMEM if the fifo parameter is NULL.73 * @return sENOMEM if there is not enough memory left.70 * @return EOK on success. 71 * @return EINVAL if the queue is not valid. 72 * @return EBADMEM if the fifo parameter is NULL. 73 * @return ENOMEM if there is not enough memory left. 74 74 */ 75 75 int dyn_fifo_initialize(dyn_fifo_t *fifo, int size) … … 100 100 * this limit. May be zero or negative to indicate no 101 101 * limit. 102 * @return sEOK on success.103 * @return sEINVAL if the queue is not valid.104 * @return sENOMEM if there is not enough memory left.102 * @return EOK on success. 103 * @return EINVAL if the queue is not valid. 104 * @return ENOMEM if there is not enough memory left. 105 105 */ 106 106 int dyn_fifo_push(dyn_fifo_t *fifo, int value, int max_size) … … 150 150 * 151 151 * @param[in,out] fifo The dynamic queue. 152 * @return sValue of the first item in the queue.153 * @return sEINVAL if the queue is not valid.154 * @return sENOENT if the queue is empty.152 * @return Value of the first item in the queue. 153 * @return EINVAL if the queue is not valid. 154 * @return ENOENT if the queue is empty. 155 155 */ 156 156 int dyn_fifo_pop(dyn_fifo_t *fifo) … … 172 172 * 173 173 * @param[in,out] fifo The dynamic queue. 174 * @return siValue of the first item in the queue.175 * @return sEINVAL if the queue is not valid.176 * @return sENOENT if the queue is empty.174 * @return Value of the first item in the queue. 175 * @return EINVAL if the queue is not valid. 176 * @return ENOENT if the queue is empty. 177 177 */ 178 178 int dyn_fifo_value(dyn_fifo_t *fifo) … … 190 190 * 191 191 * @param[in,out] fifo The dynamic queue. 192 * @return sEOK on success.193 * @return sEINVAL if the queue is not valid.192 * @return EOK on success. 193 * @return EINVAL if the queue is not valid. 194 194 */ 195 195 int dyn_fifo_destroy(dyn_fifo_t *fifo) -
uspace/lib/c/generic/adt/measured_strings.c
rcc3c2a1c r1bfd3d3 55 55 * appended with the terminating zero ('\0') character 56 56 * otherwise. 57 * @return sThe new bundled character string with measured length.58 * @return sNULL if there is not enough memory left.57 * @return The new bundled character string with measured length. 58 * @return NULL if there is not enough memory left. 59 59 */ 60 60 measured_string_t * … … 84 84 * 85 85 * @param[in] source The source measured string to be copied. 86 * @return sThe copy of the given measured string.87 * @return sNULL if the source parameter is NULL.88 * @return sNULL if there is not enough memory left.86 * @return The copy of the given measured string. 87 * @return NULL if the source parameter is NULL. 88 * @return NULL if there is not enough memory left. 89 89 */ 90 90 measured_string_t *measured_string_copy(measured_string_t *source) … … 120 120 * actual character strings. 121 121 * @param[in] count The size of the measured strings array. 122 * @return sEOK on success.123 * @return sEINVAL if the strings or data parameter is NULL.124 * @return sEINVAL if the count parameter is zero (0).125 * @return sEINVAL if the sent array differs in size.126 * @return sEINVAL if there is inconsistency in sent measured122 * @return EOK on success. 123 * @return EINVAL if the strings or data parameter is NULL. 124 * @return EINVAL if the count parameter is zero (0). 125 * @return EINVAL if the sent array differs in size. 126 * @return EINVAL if there is inconsistency in sent measured 127 127 * strings' lengths (should not occur). 128 * @return sENOMEM if there is not enough memory left.129 * @return sOther error codes as defined for the128 * @return ENOMEM if there is not enough memory left. 129 * @return Other error codes as defined for the 130 130 * async_data_write_finalize() function. 131 131 */ … … 209 209 * @param[in] strings The measured strings array to be processed. 210 210 * @param[in] count The measured strings array size. 211 * @return sThe computed sizes array.212 * @return sNULL if there is not enough memory left.211 * @return The computed sizes array. 212 * @return NULL if there is not enough memory left. 213 213 */ 214 214 static size_t *prepare_lengths(const measured_string_t *strings, size_t count) … … 238 238 * @param[in] strings The measured strings array to be transferred. 239 239 * @param[in] count The measured strings array size. 240 * @return sEOK on success.241 * @return sEINVAL if the strings parameter is NULL.242 * @return sEINVAL if the count parameter is zero (0).243 * @return sEINVAL if the calling module does not accept the given240 * @return EOK on success. 241 * @return EINVAL if the strings parameter is NULL. 242 * @return EINVAL if the count parameter is zero (0). 243 * @return EINVAL if the calling module does not accept the given 244 244 * array size. 245 * @return sEINVAL if there is inconsistency in sent measured245 * @return EINVAL if there is inconsistency in sent measured 246 246 * strings' lengths (should not occur). 247 * @return sOther error codes as defined for the247 * @return Other error codes as defined for the 248 248 * async_data_read_finalize() function. 249 249 */ … … 302 302 * actual character strings. 303 303 * @param[in] count The size of the measured strings array. 304 * @return sEOK on success.305 * @return sEINVAL if the strings or data parameter is NULL.306 * @return sEINVAL if the phone or count parameter is not positive.307 * @return sEINVAL if the sent array differs in size.308 * @return sENOMEM if there is not enough memory left.309 * @return sOther error codes as defined for the304 * @return EOK on success. 305 * @return EINVAL if the strings or data parameter is NULL. 306 * @return EINVAL if the phone or count parameter is not positive. 307 * @return EINVAL if the sent array differs in size. 308 * @return ENOMEM if there is not enough memory left. 309 * @return Other error codes as defined for the 310 310 * async_data_read_start() function. 311 311 */ … … 378 378 * @param[in] strings The measured strings array to be transferred. 379 379 * @param[in] count The measured strings array size. 380 * @return sEOK on success.381 * @return sEINVAL if the strings parameter is NULL.382 * @return sEINVAL if the phone or count parameter is not positive.383 * @return sOther error codes as defined for the380 * @return EOK on success. 381 * @return EINVAL if the strings parameter is NULL. 382 * @return EINVAL if the phone or count parameter is not positive. 383 * @return Other error codes as defined for the 384 384 * async_data_write_start() function. 385 385 */ -
uspace/lib/c/generic/net/icmp_api.c
rcc3c2a1c r1bfd3d3 66 66 * @param[in] addr The target host address. 67 67 * @param[in] addrlen The torget host address length. 68 * @return sICMP_ECHO on success.69 * @return sETIMEOUT if the reply has not arrived before the68 * @return ICMP_ECHO on success. 69 * @return ETIMEOUT if the reply has not arrived before the 70 70 * timeout. 71 * @return sICMP type of the received error notification.72 * @return sEINVAL if the addrlen parameter is less or equal to71 * @return ICMP type of the received error notification. 72 * @return EINVAL if the addrlen parameter is less or equal to 73 73 * zero. 74 * @return sENOMEM if there is not enough memory left.75 * @return sEPARTY if there was an internal error.74 * @return ENOMEM if there is not enough memory left. 75 * @return EPARTY if there was an internal error. 76 76 */ 77 77 int -
uspace/lib/c/generic/net/icmp_common.c
rcc3c2a1c r1bfd3d3 50 50 * @param[in] timeout The connection timeout in microseconds. No timeout if 51 51 * set to zero. 52 * @return sThe ICMP module phone on success.53 * @return sETIMEOUT if the connection timeouted.52 * @return The ICMP module phone on success. 53 * @return ETIMEOUT if the connection timeouted. 54 54 */ 55 55 int icmp_connect_module(services_t service, suseconds_t timeout) -
uspace/lib/c/generic/net/inet.c
rcc3c2a1c r1bfd3d3 51 51 * @param[out] address The character buffer to be filled. 52 52 * @param[in] length The buffer length. 53 * @return sEOK on success.54 * @return sEINVAL if the data or address parameter is NULL.55 * @return sENOMEM if the character buffer is not long enough.56 * @return sENOTSUP if the address family is not supported.53 * @return EOK on success. 54 * @return EINVAL if the data or address parameter is NULL. 55 * @return ENOMEM if the character buffer is not long enough. 56 * @return ENOTSUP if the address family is not supported. 57 57 */ 58 58 int … … 101 101 * @param[in] address The character buffer to be parsed. 102 102 * @param[out] data The address data to be filled. 103 * @return sEOK on success.104 * @return sEINVAL if the data parameter is NULL.105 * @return sENOENT if the address parameter is NULL.106 * @return sENOTSUP if the address family is not supported.103 * @return EOK on success. 104 * @return EINVAL if the data parameter is NULL. 105 * @return ENOENT if the address parameter is NULL. 106 * @return ENOTSUP if the address family is not supported. 107 107 */ 108 108 int inet_pton(uint16_t family, const char *address, uint8_t *data) -
uspace/lib/c/generic/net/modules.c
rcc3c2a1c r1bfd3d3 159 159 * 160 160 * @param[in] need The needed module service. 161 * @return sThe phone of the needed service.161 * @return The phone of the needed service. 162 162 */ 163 163 int connect_to_service(services_t need) … … 171 171 * @param[in] timeout The connection timeout in microseconds. No timeout if 172 172 * set to zero (0). 173 * @return sThe phone of the needed service.174 * @return sETIMEOUT if the connection timeouted.173 * @return The phone of the needed service. 174 * @return ETIMEOUT if the connection timeouted. 175 175 */ 176 176 int connect_to_service_timeout(services_t need, suseconds_t timeout) … … 204 204 * @param[out] data The data buffer to be filled. 205 205 * @param[out] length The buffer length. 206 * @return sEOK on success.207 * @return sEBADMEM if the data or the length parameter is NULL.208 * @return sEINVAL if the client does not send data.209 * @return sENOMEM if there is not enough memory left.210 * @return sOther error codes as defined for the206 * @return EOK on success. 207 * @return EBADMEM if the data or the length parameter is NULL. 208 * @return EINVAL if the client does not send data. 209 * @return ENOMEM if there is not enough memory left. 210 * @return Other error codes as defined for the 211 211 * async_data_write_finalize() function. 212 212 */ … … 242 242 * @param[in] data The data buffer to be sent. 243 243 * @param[in] data_length The buffer length. 244 * @return sEOK on success.245 * @return sEINVAL if the client does not expect the data.246 * @return sEOVERFLOW if the client does not expect all the data.244 * @return EOK on success. 245 * @return EINVAL if the client does not expect the data. 246 * @return EOVERFLOW if the client does not expect all the data. 247 247 * Only partial data are transfered. 248 * @return sOther error codes as defined for the248 * @return Other error codes as defined for the 249 249 * async_data_read_finalize() function. 250 250 */ -
uspace/lib/c/generic/net/packet.c
rcc3c2a1c r1bfd3d3 82 82 /** Initializes the packet map. 83 83 * 84 * @return sEOK on success.85 * @return sENOMEM if there is not enough memory left.84 * @return EOK on success. 85 * @return ENOMEM if there is not enough memory left. 86 86 */ 87 87 int pm_init(void) … … 101 101 * 102 102 * @param[in] packet_id The packet identifier to be found. 103 * @return sThe found packet reference.104 * @return sNULL if the mapping does not exist.103 * @return The found packet reference. 104 * @return NULL if the mapping does not exist. 105 105 */ 106 106 packet_t pm_find(packet_id_t packet_id) … … 130 130 * 131 131 * @param[in] packet The packet to be remembered. 132 * @return sEOK on success.133 * @return sEINVAL if the packet is not valid.134 * @return sEINVAL if the packet map is not initialized.135 * @return sENOMEM if there is not enough memory left.132 * @return EOK on success. 133 * @return EINVAL if the packet is not valid. 134 * @return EINVAL if the packet map is not initialized. 135 * @return ENOMEM if there is not enough memory left. 136 136 */ 137 137 int pm_add(packet_t packet) … … 205 205 * @param[in] order The packet order value. 206 206 * @param[in] metric The metric value of the packet. 207 * @return sEOK on success.208 * @return sEINVAL if the first parameter is NULL.209 * @return sEINVAL if the packet is not valid.207 * @return EOK on success. 208 * @return EINVAL if the first parameter is NULL. 209 * @return EINVAL if the packet is not valid. 210 210 */ 211 211 int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric) … … 249 249 * @param[in] first The first packet of the queue. 250 250 * @param[in] order The packet order value. 251 * @return sThe packet with the given order.252 * @return sNULL if the first packet is not valid.253 * @return sNULL if the packet is not found.251 * @return The packet with the given order. 252 * @return NULL if the first packet is not valid. 253 * @return NULL if the packet is not found. 254 254 */ 255 255 packet_t pq_find(packet_t packet, size_t order) … … 275 275 * @param[in] packet The packet in the queue. 276 276 * @param[in] new_packet The new packet to be inserted. 277 * @return sEOK on success.278 * @return sEINVAL if etiher of the packets is invalid.277 * @return EOK on success. 278 * @return EINVAL if etiher of the packets is invalid. 279 279 */ 280 280 int pq_insert_after(packet_t packet, packet_t new_packet) … … 298 298 * 299 299 * @param[in] packet The packet to be detached. 300 * @return sThe next packet in the queue. If the packet is the first300 * @return The next packet in the queue. If the packet is the first 301 301 * one of the queue, this becomes the new first one. 302 * @return sNULL if there is no packet left.303 * @return sNULL if the packet is not valid.302 * @return NULL if there is no packet left. 303 * @return NULL if the packet is not valid. 304 304 */ 305 305 packet_t pq_detach(packet_t packet) … … 328 328 * @param[in] order The packet order value. 329 329 * @param[in] metric The metric value of the packet. 330 * @return sEOK on success.331 * @return sEINVAL if the packet is invalid.330 * @return EOK on success. 331 * @return EINVAL if the packet is invalid. 332 332 */ 333 333 int pq_set_order(packet_t packet, size_t order, size_t metric) … … 346 346 * @param[out] order The packet order value. 347 347 * @param[out] metric The metric value of the packet. 348 * @return sEOK on success.349 * @return sEINVAL if the packet is invalid.348 * @return EOK on success. 349 * @return EINVAL if the packet is invalid. 350 350 */ 351 351 int pq_get_order(packet_t packet, size_t *order, size_t *metric) … … 391 391 * 392 392 * @param[in] packet The packet queue member. 393 * @return sThe next packet in the queue.394 * @return sNULL if there is no next packet.395 * @return sNULL if the packet is not valid.393 * @return The next packet in the queue. 394 * @return NULL if there is no next packet. 395 * @return NULL if the packet is not valid. 396 396 */ 397 397 packet_t pq_next(packet_t packet) … … 406 406 * 407 407 * @param[in] packet The packet queue member. 408 * @return sThe previous packet in the queue.409 * @return sNULL if there is no previous packet.410 * @return sNULL if the packet is not valid.408 * @return The previous packet in the queue. 409 * @return NULL if there is no previous packet. 410 * @return NULL if the packet is not valid. 411 411 */ 412 412 packet_t pq_previous(packet_t packet) -
uspace/lib/c/generic/net/socket_client.c
rcc3c2a1c r1bfd3d3 178 178 /** Returns the active sockets. 179 179 * 180 * @return sThe active sockets.180 * @return The active sockets. 181 181 */ 182 182 static sockets_t *socket_get_sockets(void) … … 286 286 * Connects to the TCP module if necessary. 287 287 * 288 * @return sThe TCP module phone.289 * @return sOther error codes as defined for the288 * @return The TCP module phone. 289 * @return Other error codes as defined for the 290 290 * bind_service_timeout() function. 291 291 */ … … 305 305 * Connects to the UDP module if necessary. 306 306 * 307 * @return sThe UDP module phone.308 * @return sOther error codes as defined for the307 * @return The UDP module phone. 308 * @return Other error codes as defined for the 309 309 * bind_service_timeout() function. 310 310 */ … … 322 322 /** Tries to find a new free socket identifier. 323 323 * 324 * @return sThe new socket identifier.325 * @return sELIMIT if there is no socket identifier available.324 * @return The new socket identifier. 325 * @return ELIMIT if there is no socket identifier available. 326 326 */ 327 327 static int socket_generate_new_id(void) … … 387 387 * @param[in] type Socket type. 388 388 * @param[in] protocol Socket protocol. 389 * @return sThe socket identifier on success.390 * @return sEPFNOTSUPPORT if the protocol family is not supported.391 * @return sESOCKNOTSUPPORT if the socket type is not supported.392 * @return sEPROTONOSUPPORT if the protocol is not supported.393 * @return sENOMEM if there is not enough memory left.394 * @return sELIMIT if there was not a free socket identifier found389 * @return The socket identifier on success. 390 * @return EPFNOTSUPPORT if the protocol family is not supported. 391 * @return ESOCKNOTSUPPORT if the socket type is not supported. 392 * @return EPROTONOSUPPORT if the protocol is not supported. 393 * @return ENOMEM if there is not enough memory left. 394 * @return ELIMIT if there was not a free socket identifier found 395 395 * this time. 396 * @return sOther error codes as defined for the NET_SOCKET message.397 * @return sOther error codes as defined for the396 * @return Other error codes as defined for the NET_SOCKET message. 397 * @return Other error codes as defined for the 398 398 * bind_service_timeout() function. 399 399 */ … … 509 509 * @param[in] data The data to be sent. 510 510 * @param[in] datalength The data length. 511 * @return sEOK on success.512 * @return sENOTSOCK if the socket is not found.513 * @return sEBADMEM if the data parameter is NULL.514 * @return sNO_DATA if the datalength parameter is zero (0).515 * @return sOther error codes as defined for the spcific message.511 * @return EOK on success. 512 * @return ENOTSOCK if the socket is not found. 513 * @return EBADMEM if the data parameter is NULL. 514 * @return NO_DATA if the datalength parameter is zero (0). 515 * @return Other error codes as defined for the spcific message. 516 516 */ 517 517 static int … … 554 554 * @param[in] my_addr The port address. 555 555 * @param[in] addrlen The address length. 556 * @return sEOK on success.557 * @return sENOTSOCK if the socket is not found.558 * @return sEBADMEM if the my_addr parameter is NULL.559 * @return sNO_DATA if the addlen parameter is zero.560 * @return sOther error codes as defined for the NET_SOCKET_BIND556 * @return EOK on success. 557 * @return ENOTSOCK if the socket is not found. 558 * @return EBADMEM if the my_addr parameter is NULL. 559 * @return NO_DATA if the addlen parameter is zero. 560 * @return Other error codes as defined for the NET_SOCKET_BIND 561 561 * message. 562 562 */ … … 575 575 * @param[in] socket_id Socket identifier. 576 576 * @param[in] backlog The maximum number of waiting sockets to be accepted. 577 * @return sEOK on success.578 * @return sEINVAL if the backlog parameter is not positive (<=0).579 * @return sENOTSOCK if the socket is not found.580 * @return sOther error codes as defined for the NET_SOCKET_LISTEN577 * @return EOK on success. 578 * @return EINVAL if the backlog parameter is not positive (<=0). 579 * @return ENOTSOCK if the socket is not found. 580 * @return Other error codes as defined for the NET_SOCKET_LISTEN 581 581 * message. 582 582 */ … … 613 613 * @param[out] cliaddr The remote client address. 614 614 * @param[in] addrlen The address length. 615 * @return sEOK on success.616 * @return sEBADMEM if the cliaddr or addrlen parameter is NULL.617 * @return sEINVAL if the backlog parameter is not positive (<=0).618 * @return sENOTSOCK if the socket is not found.619 * @return sOther error codes as defined for the NET_SOCKET_ACCEPT615 * @return EOK on success. 616 * @return EBADMEM if the cliaddr or addrlen parameter is NULL. 617 * @return EINVAL if the backlog parameter is not positive (<=0). 618 * @return ENOTSOCK if the socket is not found. 619 * @return Other error codes as defined for the NET_SOCKET_ACCEPT 620 620 * message. 621 621 */ … … 716 716 * @param[in] serv_addr The remote server address. 717 717 * @param[in] addrlen The address length. 718 * @return sEOK on success.719 * @return sEBADMEM if the serv_addr parameter is NULL.720 * @return sNO_DATA if the addlen parameter is zero.721 * @return sENOTSOCK if the socket is not found.722 * @return sOther error codes as defined for the NET_SOCKET_CONNECT718 * @return EOK on success. 719 * @return EBADMEM if the serv_addr parameter is NULL. 720 * @return NO_DATA if the addlen parameter is zero. 721 * @return ENOTSOCK if the socket is not found. 722 * @return Other error codes as defined for the NET_SOCKET_CONNECT 723 723 * message. 724 724 */ … … 756 756 * 757 757 * @param[in] socket_id Socket identifier. 758 * @return sEOK on success.759 * @return sENOTSOCK if the socket is not found.760 * @return sEINPROGRESS if there is another blocking function in758 * @return EOK on success. 759 * @return ENOTSOCK if the socket is not found. 760 * @return EINPROGRESS if there is another blocking function in 761 761 * progress. 762 * @return sOther error codes as defined for the NET_SOCKET_CLOSE762 * @return Other error codes as defined for the NET_SOCKET_CLOSE 763 763 * message. 764 764 */ … … 806 806 * sockets. 807 807 * @param[in] addrlen The address length. Used only if toaddr is not NULL. 808 * @return sEOK on success.809 * @return sENOTSOCK if the socket is not found.810 * @return sEBADMEM if the data or toaddr parameter is NULL.811 * @return sNO_DATA if the datalength or the addrlen parameter is808 * @return EOK on success. 809 * @return ENOTSOCK if the socket is not found. 810 * @return EBADMEM if the data or toaddr parameter is NULL. 811 * @return NO_DATA if the datalength or the addrlen parameter is 812 812 * zero (0). 813 * @return sOther error codes as defined for the NET_SOCKET_SENDTO813 * @return Other error codes as defined for the NET_SOCKET_SENDTO 814 814 * message. 815 815 */ … … 908 908 * @param[in] datalength The data length. 909 909 * @param[in] flags Various send flags. 910 * @return sEOK on success.911 * @return sENOTSOCK if the socket is not found.912 * @return sEBADMEM if the data parameter is NULL.913 * @return sNO_DATA if the datalength parameter is zero.914 * @return sOther error codes as defined for the NET_SOCKET_SEND910 * @return EOK on success. 911 * @return ENOTSOCK if the socket is not found. 912 * @return EBADMEM if the data parameter is NULL. 913 * @return NO_DATA if the datalength parameter is zero. 914 * @return Other error codes as defined for the NET_SOCKET_SEND 915 915 * message. 916 916 */ … … 932 932 * @param[in] toaddr The destination address. 933 933 * @param[in] addrlen The address length. 934 * @return sEOK on success.935 * @return sENOTSOCK if the socket is not found.936 * @return sEBADMEM if the data or toaddr parameter is NULL.937 * @return sNO_DATA if the datalength or the addrlen parameter is934 * @return EOK on success. 935 * @return ENOTSOCK if the socket is not found. 936 * @return EBADMEM if the data or toaddr parameter is NULL. 937 * @return NO_DATA if the datalength or the addrlen parameter is 938 938 * zero. 939 * @return sOther error codes as defined for the NET_SOCKET_SENDTO939 * @return Other error codes as defined for the NET_SOCKET_SENDTO 940 940 * message. 941 941 */ … … 966 966 * read. The actual address length is set. Used only if 967 967 * fromaddr is not NULL. 968 * @return sEOK on success.969 * @return sENOTSOCK if the socket is not found.970 * @return sEBADMEM if the data parameter is NULL.971 * @return sNO_DATA if the datalength or addrlen parameter is zero.972 * @return sOther error codes as defined for the spcific message.968 * @return EOK on success. 969 * @return ENOTSOCK if the socket is not found. 970 * @return EBADMEM if the data parameter is NULL. 971 * @return NO_DATA if the datalength or addrlen parameter is zero. 972 * @return Other error codes as defined for the spcific message. 973 973 */ 974 974 static int … … 1095 1095 * @param[in] datalength The data length. 1096 1096 * @param[in] flags Various receive flags. 1097 * @return sEOK on success.1098 * @return sENOTSOCK if the socket is not found.1099 * @return sEBADMEM if the data parameter is NULL.1100 * @return sNO_DATA if the datalength parameter is zero.1101 * @return sOther error codes as defined for the NET_SOCKET_RECV1097 * @return EOK on success. 1098 * @return ENOTSOCK if the socket is not found. 1099 * @return EBADMEM if the data parameter is NULL. 1100 * @return NO_DATA if the datalength parameter is zero. 1101 * @return Other error codes as defined for the NET_SOCKET_RECV 1102 1102 * message. 1103 1103 */ … … 1118 1118 * @param[in,out] addrlen The address length. The maximum address length is 1119 1119 * read. The actual address length is set. 1120 * @return sEOK on success.1121 * @return sENOTSOCK if the socket is not found.1122 * @return sEBADMEM if the data or fromaddr parameter is NULL.1123 * @return sNO_DATA if the datalength or addrlen parameter is zero.1124 * @return sOther error codes as defined for the NET_SOCKET_RECVFROM1120 * @return EOK on success. 1121 * @return ENOTSOCK if the socket is not found. 1122 * @return EBADMEM if the data or fromaddr parameter is NULL. 1123 * @return NO_DATA if the datalength or addrlen parameter is zero. 1124 * @return Other error codes as defined for the NET_SOCKET_RECVFROM 1125 1125 * message. 1126 1126 */ … … 1148 1148 * @param[in,out] optlen The value buffer length. The maximum length is read. 1149 1149 * The actual length is set. 1150 * @return sEOK on success.1151 * @return sENOTSOCK if the socket is not found.1152 * @return sEBADMEM if the value or optlen parameter is NULL.1153 * @return sNO_DATA if the optlen parameter is zero.1154 * @return sOther error codes as defined for the1150 * @return EOK on success. 1151 * @return ENOTSOCK if the socket is not found. 1152 * @return EBADMEM if the value or optlen parameter is NULL. 1153 * @return NO_DATA if the optlen parameter is zero. 1154 * @return Other error codes as defined for the 1155 1155 * NET_SOCKET_GETSOCKOPT message. 1156 1156 */ … … 1201 1201 * @param[in] value The value to be set. 1202 1202 * @param[in] optlen The value length. 1203 * @return sEOK on success.1204 * @return sENOTSOCK if the socket is not found.1205 * @return sEBADMEM if the value parameter is NULL.1206 * @return sNO_DATA if the optlen parameter is zero.1207 * @return sOther error codes as defined for the1203 * @return EOK on success. 1204 * @return ENOTSOCK if the socket is not found. 1205 * @return EBADMEM if the value parameter is NULL. 1206 * @return NO_DATA if the optlen parameter is zero. 1207 * @return Other error codes as defined for the 1208 1208 * NET_SOCKET_SETSOCKOPT message. 1209 1209 */ -
uspace/lib/c/include/net/modules.h
rcc3c2a1c r1bfd3d3 69 69 * 70 70 * @param[in] need The needed module service. 71 * @return sThe phone of the needed service.71 * @return The phone of the needed service. 72 72 */ 73 73 typedef int connect_module_t(services_t need); -
uspace/lib/c/include/net/packet_header.h
rcc3c2a1c r1bfd3d3 124 124 /** Returns whether the packet is valid. 125 125 * @param[in] packet The packet to be checked. 126 * @return sTrue if the packet is not NULL and the magic value is126 * @return True if the packet is not NULL and the magic value is 127 127 * correct. 128 * @return sFalse otherwise.128 * @return False otherwise. 129 129 */ 130 130 static inline int packet_is_valid(const packet_t packet) -
uspace/lib/net/adt/module_map.c
rcc3c2a1c r1bfd3d3 59 59 * running. 60 60 * @param[in] connect_module The module connecting function. 61 * @return sEOK on success.62 * @return sENOMEM if there is not enough memory left.61 * @return EOK on success. 62 * @return ENOMEM if there is not enough memory left. 63 63 */ 64 64 int … … 100 100 * @param[in] modules The module map. 101 101 * @param[in] name The module name. 102 * @return sThe running module found. It does not have to be102 * @return The running module found. It does not have to be 103 103 * connected. 104 * @return sNULL if there is no such module.104 * @return NULL if there is no such module. 105 105 */ 106 106 module_t *get_running_module(modules_t *modules, char *name) … … 126 126 * 127 127 * @param[in] fname The module full or relative path filename. 128 * @return sThe new module task identifier on success.129 * @return sZero if there is no such module.128 * @return The new module task identifier on success. 129 * @return Zero if there is no such module. 130 130 */ 131 131 task_id_t spawn(const char *fname) -
uspace/lib/net/generic/generic.c
rcc3c2a1c r1bfd3d3 92 92 * @param[out] address The desired address. 93 93 * @param[out] data The address data container. 94 * @return sEOK on success.95 * @return sEBADMEM if the address parameter and/or the data94 * @return EOK on success. 95 * @return EBADMEM if the address parameter and/or the data 96 96 * parameter is NULL. 97 * @return sOther error codes as defined for the specific service97 * @return Other error codes as defined for the specific service 98 98 * message. 99 99 */ … … 223 223 * @param[out] translation The translated values. 224 224 * @param[out] data The translation data container. 225 * @return sEOK on success.226 * @return sEINVAL if the configuration parameter is NULL.227 * @return sEINVAL if the count parameter is zero.228 * @return sEBADMEM if the translation or the data parameters are225 * @return EOK on success. 226 * @return EINVAL if the configuration parameter is NULL. 227 * @return EINVAL if the count parameter is zero. 228 * @return EBADMEM if the translation or the data parameters are 229 229 * NULL. 230 * @return sOther error codes as defined for the specific service230 * @return Other error codes as defined for the specific service 231 231 * message. 232 232 */ -
uspace/lib/net/generic/net_checksum.c
rcc3c2a1c r1bfd3d3 48 48 * 49 49 * @param[in] sum Computed checksum. 50 * @return sCompacted computed checksum to the 16 bits.50 * @return Compacted computed checksum to the 16 bits. 51 51 */ 52 52 uint16_t compact_checksum(uint32_t sum) … … 66 66 * @param[in] data Pointer to the beginning of data to process. 67 67 * @param[in] length Length of the data in bytes. 68 * @return sThe computed checksum of the length bytes of the data.68 * @return The computed checksum of the length bytes of the data. 69 69 */ 70 70 uint32_t compute_checksum(uint32_t seed, uint8_t *data, size_t length) … … 88 88 * @param[in] data Pointer to the beginning of data to process. 89 89 * @param[in] length Length of the data in bits. 90 * @return sThe computed CRC32 of the length bits of the data.90 * @return The computed CRC32 of the length bits of the data. 91 91 */ 92 92 uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length) … … 142 142 * @param[in] data Pointer to the beginning of data to process. 143 143 * @param[in] length Length of the data in bits. 144 * @return sThe computed CRC32 of the length bits of the data.144 * @return The computed CRC32 of the length bits of the data. 145 145 */ 146 146 uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length) … … 193 193 * 194 194 * @param[in] checksum The computed checksum. 195 * @return sThe internet protocol header checksum.196 * @return s0xFFFF if the computed checksum is zero.195 * @return The internet protocol header checksum. 196 * @return 0xFFFF if the computed checksum is zero. 197 197 */ 198 198 uint16_t flip_checksum(uint16_t checksum) … … 211 211 * @param[in] data The header data. 212 212 * @param[in] length The header length in bytes. 213 * @return sThe internet protocol header checksum.214 * @return s0xFFFF if the computed checksum is zero.213 * @return The internet protocol header checksum. 214 * @return 0xFFFF if the computed checksum is zero. 215 215 */ 216 216 uint16_t ip_checksum(uint8_t *data, size_t length) -
uspace/lib/net/generic/net_remote.c
rcc3c2a1c r1bfd3d3 49 49 /** Connects to the networking module. 50 50 * 51 * @return sThe networking module phone on success.51 * @return The networking module phone on success. 52 52 */ 53 53 int net_connect_module(void) … … 83 83 * @param[in] count The configuration entries count. 84 84 * @param[in,out] data The configuration and settings data. 85 * @return sEOK on success.86 * @return sEINVAL if the configuration is NULL.87 * @return sEINVAL if the count is zero.88 * @return sOther error codes as defined for the85 * @return EOK on success. 86 * @return EINVAL if the configuration is NULL. 87 * @return EINVAL if the count is zero. 88 * @return Other error codes as defined for the 89 89 * generic_translate_req() function. 90 90 */ … … 110 110 * @param[in] count The configuration entries count. 111 111 * @param[in,out] data The configuration and settings data. 112 * @return sEOK on success.113 * @return sEINVAL if the configuration is NULL.114 * @return sEINVAL if the count is zero.115 * @return sOther error codes as defined for the112 * @return EOK on success. 113 * @return EINVAL if the configuration is NULL. 114 * @return EINVAL if the count is zero. 115 * @return Other error codes as defined for the 116 116 * generic_translate_req() function. 117 117 */ -
uspace/lib/net/generic/packet_client.c
rcc3c2a1c r1bfd3d3 53 53 * @param[in] data The data to be copied. 54 54 * @param[in] length The length of the copied data. 55 * @return sEOK on success.56 * @return sEINVAL if the packet is not valid.57 * @return sENOMEM if there is not enough memory left.55 * @return EOK on success. 56 * @return EINVAL if the packet is not valid. 57 * @return ENOMEM if there is not enough memory left. 58 58 */ 59 59 int packet_copy_data(packet_t packet, const void *data, size_t length) … … 78 78 * @param[in] length The space length to be allocated at the beginning of the 79 79 * packet content. 80 * @return sThe pointer to the allocated memory.81 * @return sNULL if there is not enough memory left.80 * @return The pointer to the allocated memory. 81 * @return NULL if there is not enough memory left. 82 82 */ 83 83 void *packet_prefix(packet_t packet, size_t length) … … 99 99 * @param[in] length The space length to be allocated at the end of the 100 100 * packet content. 101 * @return sThe pointer to the allocated memory.102 * @return sNULL if there is not enough memory left.101 * @return The pointer to the allocated memory. 102 * @return NULL if there is not enough memory left. 103 103 */ 104 104 void *packet_suffix(packet_t packet, size_t length) … … 120 120 * @param[in] suffix The suffix length to be removed from the end of the 121 121 * packet content. 122 * @return sEOK on success.123 * @return sEINVAL if the packet is not valid.124 * @return sENOMEM if there is not enough memory left.122 * @return EOK on success. 123 * @return EINVAL if the packet is not valid. 124 * @return ENOMEM if there is not enough memory left. 125 125 */ 126 126 int packet_trim(packet_t packet, size_t prefix, size_t suffix) … … 140 140 * 141 141 * @param[in] packet The packet. 142 * @return sThe packet identifier.143 * @return sZero if the packet is not valid.142 * @return The packet identifier. 143 * @return Zero if the packet is not valid. 144 144 */ 145 145 packet_id_t packet_get_id(const packet_t packet) … … 153 153 * @param[out] src The source address. May be NULL if not desired. 154 154 * @param[out] dest The destination address. May be NULL if not desired. 155 * @return sThe stored addresses length.156 * @return sZero if the addresses are not present.157 * @return sEINVAL if the packet is not valid.155 * @return The stored addresses length. 156 * @return Zero if the addresses are not present. 157 * @return EINVAL if the packet is not valid. 158 158 */ 159 159 int packet_get_addr(const packet_t packet, uint8_t **src, uint8_t **dest) … … 174 174 * 175 175 * @param[in] packet The packet. 176 * @return sThe packet content length in bytes.177 * @return sZero if the packet is not valid.176 * @return The packet content length in bytes. 177 * @return Zero if the packet is not valid. 178 178 */ 179 179 size_t packet_get_data_length(const packet_t packet) … … 188 188 * 189 189 * @param[in] packet The packet. 190 * @return sThe pointer to the beginning of the packet content.191 * @return sNULL if the packet is not valid.190 * @return The pointer to the beginning of the packet content. 191 * @return NULL if the packet is not valid. 192 192 */ 193 193 void *packet_get_data(const packet_t packet) … … 205 205 * @param[in] dest The new destination address. May be NULL. 206 206 * @param[in] addr_len The addresses length. 207 * @return sEOK on success.208 * @return sEINVAL if the packet is not valid.209 * @return sENOMEM if there is not enough memory left.207 * @return EOK on success. 208 * @return EINVAL if the packet is not valid. 209 * @return ENOMEM if there is not enough memory left. 210 210 */ 211 211 int … … 254 254 * @param[in] phone The packet server module phone. 255 255 * @param[in] packet The original packet. 256 * @return sThe packet copy.257 * @return sNULL on error.256 * @return The packet copy. 257 * @return NULL on error. 258 258 */ 259 259 packet_t packet_get_copy(int phone, packet_t packet) -
uspace/lib/net/generic/packet_remote.c
rcc3c2a1c r1bfd3d3 100 100 * @param[out] packet The packet reference. 101 101 * @param[in] packet_id The packet identifier. 102 * @return sEOK on success.103 * @return sEINVAL if the packet parameter is NULL.104 * @return sOther error codes as defined for the NET_PACKET_GET_SIZE102 * @return EOK on success. 103 * @return EINVAL if the packet parameter is NULL. 104 * @return Other error codes as defined for the NET_PACKET_GET_SIZE 105 105 * message. 106 * @return sOther error codes as defined for the packet_return()106 * @return Other error codes as defined for the packet_return() 107 107 * function. 108 108 */ … … 145 145 * @param[in] max_content The maximal content length in bytes. 146 146 * @param[in] max_suffix The maximal suffix length in bytes. 147 * @return sThe packet reference.148 * @return sNULL on error.147 * @return The packet reference. 148 * @return NULL on error. 149 149 */ 150 150 packet_t packet_get_4_remote(int phone, size_t max_content, size_t addr_len, … … 177 177 * @param[in] phone The packet server module phone. 178 178 * @param[in] content The maximal content length in bytes. 179 * @return sThe packet reference.180 * @return sNULL on error.179 * @return The packet reference. 180 * @return NULL on error. 181 181 */ 182 182 packet_t packet_get_1_remote(int phone, size_t content) -
uspace/lib/net/generic/protocol_map.c
rcc3c2a1c r1bfd3d3 42 42 * @param[in] nil Network interface layer service. 43 43 * @param[in] il Internetwork layer service. 44 * @return sNetwork interface layer type of the internetworking44 * @return Network interface layer type of the internetworking 45 45 * layer service. 46 * @return sZero if mapping is not found.46 * @return Zero if mapping is not found. 47 47 */ 48 48 eth_type_t protocol_map(services_t nil, services_t il) … … 68 68 * @param[in] nil Network interface layer service. 69 69 * @param[in] protocol Network interface layer type. 70 * @return sInternetwork layer service of the network interface70 * @return Internetwork layer service of the network interface 71 71 * layer type. 72 * @return sZero if mapping is not found.72 * @return Zero if mapping is not found. 73 73 */ 74 74 services_t protocol_unmap(services_t nil, int protocol) … … 94 94 * 95 95 * @param[in] lsap Link service access point identifier. 96 * @return sEthernet protocol identifier of the link service access96 * @return Ethernet protocol identifier of the link service access 97 97 * point identifier. 98 * @return sETH_LSAP_NULL if mapping is not found.98 * @return ETH_LSAP_NULL if mapping is not found. 99 99 */ 100 100 eth_type_t lsap_map(eth_lsap_t lsap) … … 114 114 * 115 115 * @param[in] ethertype Ethernet protocol identifier. 116 * @return sLink service access point identifier.117 * @return sZero if mapping is not found.116 * @return Link service access point identifier. 117 * @return Zero if mapping is not found. 118 118 */ 119 119 eth_lsap_t lsap_unmap(eth_type_t ethertype) … … 132 132 * 133 133 * @param[in] nil The network interface service. 134 * @return sThe hardware type of the network interface service.135 * @return sZero if mapping is not found.134 * @return The hardware type of the network interface service. 135 * @return Zero if mapping is not found. 136 136 */ 137 137 hw_type_t hardware_map(services_t nil) -
uspace/lib/net/il/arp_remote.c
rcc3c2a1c r1bfd3d3 52 52 * 53 53 * @param service The ARP module service. Ignored parameter. 54 * @return sThe ARP module phone on success.54 * @return The ARP module phone on success. 55 55 */ 56 56 int arp_connect_module(services_t service) … … 65 65 * 66 66 * @param[in] arp_phone The ARP module phone used for (semi)remote calls. 67 * @return sEOK on success.67 * @return EOK on success. 68 68 */ 69 69 int arp_clean_cache_req(int arp_phone) … … 78 78 * @param[in] protocol The requesting protocol service. 79 79 * @param[in] address The protocol address to be cleared. 80 * @return sEOK on success.81 * @return sENOENT if the mapping is not found.80 * @return EOK on success. 81 * @return ENOENT if the mapping is not found. 82 82 */ 83 83 int … … 100 100 * @param[in] arp_phone The ARP module phone used for (semi)remote calls. 101 101 * @param[in] device_id The device identifier. 102 * @return sEOK on success.103 * @return sENOENT if the device is not found.102 * @return EOK on success. 103 * @return ENOENT if the device is not found. 104 104 */ 105 105 int arp_clear_device_req(int arp_phone, device_id_t device_id) … … 119 119 * @param[in] netif The underlying device network interface layer service. 120 120 * @param[in] address The local requesting protocol address of the device. 121 * @return sEOK on success.122 * @return sEEXIST if the device is already used.123 * @return sENOMEM if there is not enough memory left.124 * @return sENOENT if the network interface service is not known.125 * @return sEREFUSED if the network interface service is not121 * @return EOK on success. 122 * @return EEXIST if the device is already used. 123 * @return ENOMEM if there is not enough memory left. 124 * @return ENOENT if the network interface service is not known. 125 * @return EREFUSED if the network interface service is not 126 126 * responding. 127 * @return sOther error codes as defined for the127 * @return Other error codes as defined for the 128 128 * nil_packet_get_size() function. 129 * @return sOther error codes as defined for the nil_get_addr()129 * @return Other error codes as defined for the nil_get_addr() 130 130 * function. 131 * @return sOther error codes as defined for the131 * @return Other error codes as defined for the 132 132 * nil_get_broadcast_addr() function. 133 133 */ … … 157 157 * @param[out] translation The translation of the local protocol address. 158 158 * @param[out] data The allocated raw translation data container. 159 * @return sEOK on success.160 * @return sEINVAL if the address parameter is NULL.161 * @return sEBADMEM if the translation or the data parameters are159 * @return EOK on success. 160 * @return EINVAL if the address parameter is NULL. 161 * @return EBADMEM if the translation or the data parameters are 162 162 * NULL. 163 * @return sENOENT if the mapping is not found.163 * @return ENOENT if the mapping is not found. 164 164 */ 165 165 int -
uspace/lib/net/il/ip_client.c
rcc3c2a1c r1bfd3d3 48 48 * 49 49 * @param[in] packet The packet. 50 * @return sThe IP header length in bytes.51 * @return sZero if there is no IP header.50 * @return The IP header length in bytes. 51 * @return Zero if there is no IP header. 52 52 */ 53 53 size_t ip_client_header_length(packet_t packet) … … 72 72 * @param[out] header The constructed IPv4 pseudo header. 73 73 * @param[out] headerlen The length of the IP pseudo header in bytes. 74 * @return sEOK on success.75 * @return sEBADMEM if the header and/or the headerlen parameter is74 * @return EOK on success. 75 * @return EBADMEM if the header and/or the headerlen parameter is 76 76 * NULL. 77 * @return sEINVAL if the source address and/or the destination77 * @return EINVAL if the source address and/or the destination 78 78 * address parameter is NULL. 79 * @return sEINVAL if the source address length is less than struct79 * @return EINVAL if the source address length is less than struct 80 80 * sockaddr length. 81 * @return sEINVAL if the source address length differs from the81 * @return EINVAL if the source address length differs from the 82 82 * destination address length. 83 * @return sEINVAL if the source address family differs from the83 * @return EINVAL if the source address family differs from the 84 84 * destination family. 85 * @return sEAFNOSUPPORT if the address family is not supported.86 * @return sENOMEM if there is not enough memory left.85 * @return EAFNOSUPPORT if the address family is not supported. 86 * @return ENOMEM if there is not enough memory left. 87 87 */ 88 88 int … … 148 148 * disabled. 149 149 * @param[in] ipopt_length The prefixed IP options length in bytes. 150 * @return sEOK on success.151 * @return sENOMEM if there is not enough memory left in the packet.150 * @return EOK on success. 151 * @return ENOMEM if there is not enough memory left in the packet. 152 152 */ 153 153 int … … 203 203 * @param[out] ipopt_length The IP options length in bytes. May be NULL if not 204 204 * desired. 205 * @return sThe prefixed IP header length in bytes on success.206 * @return sENOMEM if the packet is too short to contain the IP205 * @return The prefixed IP header length in bytes on success. 206 * @return ENOMEM if the packet is too short to contain the IP 207 207 * header. 208 208 */ … … 238 238 * @param[in] headerlen The length of the IP pseudo header in bytes. 239 239 * @param[in] data_length The data length to be set. 240 * @return sEOK on success.241 * @return sEBADMEM if the header parameter is NULL.242 * @return sEINVAL if the headerlen parameter is not IPv4 pseudo240 * @return EOK on success. 241 * @return EBADMEM if the header parameter is NULL. 242 * @return EINVAL if the headerlen parameter is not IPv4 pseudo 243 243 * header length. 244 244 */ -
uspace/lib/net/il/ip_remote.c
rcc3c2a1c r1bfd3d3 78 78 * @param[in] me The requesting module service. 79 79 * @param[in] receiver The message receiver. Used for remote connection. 80 * @return sThe phone of the needed service.81 * @return sEOK on success.82 * @return sOther error codes as defined for the bind_service()80 * @return The phone of the needed service. 81 * @return EOK on success. 82 * @return Other error codes as defined for the bind_service() 83 83 * function. 84 84 */ … … 93 93 * 94 94 * @param service The IP module service. Ignored parameter. 95 * @return sThe IP module phone on success.95 * @return The IP module phone on success. 96 96 */ 97 97 int ip_connect_module(services_t service) -
uspace/lib/net/include/il_local.h
rcc3c2a1c r1bfd3d3 44 44 * @param[out] answer_count The last parameter for the actual answer in 45 45 * the answer parameter. 46 * @return sEOK on success.47 * @return sOther error codes as defined for the arp_message()46 * @return EOK on success. 47 * @return Other error codes as defined for the arp_message() 48 48 * function. 49 49 */ … … 59 59 * @param[in] client_connection The client connection processing function. The 60 60 * module skeleton propagates its own one. 61 * @return sEOK on successful module termination.62 * @return sOther error codes as defined for the arp_initialize()61 * @return EOK on successful module termination. 62 * @return Other error codes as defined for the arp_initialize() 63 63 * function. 64 * @return sOther error codes as defined for the REGISTER_ME() macro64 * @return Other error codes as defined for the REGISTER_ME() macro 65 65 * function. 66 66 */ -
uspace/lib/net/include/ip_interface.h
rcc3c2a1c r1bfd3d3 68 68 * @param[in] error The packet error reporting service. Prefixes the 69 69 * received packet. 70 * @return sEOK on success.70 * @return EOK on success. 71 71 */ 72 72 typedef int (*tl_received_msg_t)(device_id_t device_id, packet_t packet, -
uspace/lib/net/include/packet_client.h
rcc3c2a1c r1bfd3d3 61 61 * @param[in] type The type to be allocated at the beginning of the packet 62 62 * content. 63 * @return sThe typed pointer to the allocated memory.64 * @return sNULL if the packet is not valid.65 * @return sNULL if there is not enough memory left.63 * @return The typed pointer to the allocated memory. 64 * @return NULL if the packet is not valid. 65 * @return NULL if there is not enough memory left. 66 66 */ 67 67 #define PACKET_PREFIX(packet, type) \ … … 76 76 * @param[in] type The type to be allocated at the end of the packet 77 77 * content. 78 * @return sThe typed pointer to the allocated memory.79 * @return sNULL if the packet is not valid.80 * @return sNULL if there is not enough memory left.78 * @return The typed pointer to the allocated memory. 79 * @return NULL if the packet is not valid. 80 * @return NULL if there is not enough memory left. 81 81 */ 82 82 #define PACKET_SUFFIX(packet, type) \ … … 92 92 * @param[in] suffix The type of the suffix to be removed from the end of 93 93 * the packet content. 94 * @return sEOK on success.95 * @return sEINVAL if the packet is not valid.96 * @return sENOMEM if there is not enough memory left.94 * @return EOK on success. 95 * @return EINVAL if the packet is not valid. 96 * @return ENOMEM if there is not enough memory left. 97 97 */ 98 98 #define PACKET_TRIM(packet, prefix, suffix) \ -
uspace/lib/net/include/tl_local.h
rcc3c2a1c r1bfd3d3 45 45 * @param[in] client_connection The client connection processing function. The 46 46 * module skeleton propagates its own one. 47 * @return sEOK on successful module termination.48 * @return sOther error codes as defined for the module initialize47 * @return EOK on successful module termination. 48 * @return Other error codes as defined for the module initialize 49 49 * function. 50 * @return sOther error codes as defined for the REGISTER_ME() macro50 * @return Other error codes as defined for the REGISTER_ME() macro 51 51 * function. 52 52 */ … … 62 62 * @param[out] answer_count The last parameter for the actual answer in the 63 63 * answer parameter. 64 * @return sEOK on success.65 * @return sOther error codes as defined for the module's message64 * @return EOK on success. 65 * @return Other error codes as defined for the module's message 66 66 * standalone function. 67 67 */ -
uspace/lib/net/tl/icmp_client.c
rcc3c2a1c r1bfd3d3 57 57 * @param[out] pointer The ICMP header pointer. 58 58 * @param[out] mtu The ICMP header MTU. 59 * @return sThe ICMP header length.60 * @return sZero if the packet contains no data.59 * @return The ICMP header length. 60 * @return Zero if the packet contains no data. 61 61 */ 62 62 int … … 92 92 * 93 93 * @param[in] packet The packet. 94 * @return sThe ICMP header length in bytes.94 * @return The ICMP header length in bytes. 95 95 */ 96 96 size_t icmp_client_header_length(packet_t packet) -
uspace/lib/net/tl/icmp_remote.c
rcc3c2a1c r1bfd3d3 57 57 * @param[in] mtu The error MTU value. 58 58 * @param[in] packet The original packet. 59 * @return sEOK on success.60 * @return sEPERM if the ICMP error notifications are disabled.61 * @return sENOMEM if there is not enough memory left.59 * @return EOK on success. 60 * @return EPERM if the ICMP error notifications are disabled. 61 * @return ENOMEM if there is not enough memory left. 62 62 */ 63 63 int … … 78 78 * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls. 79 79 * @param[in] packet The original packet. 80 * @return sEOK on success.81 * @return sEPERM if the ICMP error notifications are disabled.82 * @return sENOMEM if there is not enough memory left.80 * @return EOK on success. 81 * @return EPERM if the ICMP error notifications are disabled. 82 * @return ENOMEM if there is not enough memory left. 83 83 */ 84 84 int icmp_source_quench_msg(int icmp_phone, packet_t packet) … … 98 98 * @param[in] code The error specific code. 99 99 * @param[in] packet The original packet. 100 * @return sEOK on success.101 * @return sEPERM if the ICMP error notifications are disabled.102 * @return sENOMEM if there is not enough memory left.100 * @return EOK on success. 101 * @return EPERM if the ICMP error notifications are disabled. 102 * @return ENOMEM if there is not enough memory left. 103 103 */ 104 104 int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet) … … 119 119 * @param[in] pointer The problematic parameter offset. 120 120 * @param[in] packet The original packet. 121 * @return sEOK on success.122 * @return sEPERM if the ICMP error notifications are disabled.123 * @return sENOMEM if there is not enough memory left.121 * @return EOK on success. 122 * @return EPERM if the ICMP error notifications are disabled. 123 * @return ENOMEM if there is not enough memory left. 124 124 */ 125 125 int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, -
uspace/lib/net/tl/socket_core.c
rcc3c2a1c r1bfd3d3 156 156 * @param[in] key The socket key identifier. 157 157 * @param[in] key_length The socket key length. 158 * @return sEOK on success.159 * @return sENOMEM if there is not enough memory left.158 * @return EOK on success. 159 * @return ENOMEM if there is not enough memory left. 160 160 */ 161 161 static int … … 194 194 * @param[in] socket The socket to be added. 195 195 * @param[in] port The port number to be bound to. 196 * @return sEOK on success.197 * @return sENOMEM if there is not enough memory left.198 * @return sOther error codes as defined for the196 * @return EOK on success. 197 * @return ENOMEM if there is not enough memory left. 198 * @return Other error codes as defined for the 199 199 * socket_ports_add() function. 200 200 */ … … 248 248 * @param[in] free_ports_end The maximum free port. 249 249 * @param[in] last_used_port The last used free port. 250 * @return sEOK on success.251 * @return sENOTSOCK if the socket was not found.252 * @return sEAFNOSUPPORT if the address family is not supported.253 * @return sEADDRINUSE if the port is already in use.254 * @return sOther error codes as defined for the250 * @return EOK on success. 251 * @return ENOTSOCK if the socket was not found. 252 * @return EAFNOSUPPORT if the address family is not supported. 253 * @return EADDRINUSE if the port is already in use. 254 * @return Other error codes as defined for the 255 255 * socket_bind_free_port() function. 256 * @return sOther error codes as defined for the256 * @return Other error codes as defined for the 257 257 * socket_bind_insert() function. 258 258 */ … … 322 322 * @param[in] free_ports_end The maximum free port. 323 323 * @param[in] last_used_port The last used free port. 324 * @return sEOK on success.325 * @return sENOTCONN if no free port was found.326 * @return sOther error codes as defined for the324 * @return EOK on success. 325 * @return ENOTCONN if no free port was found. 326 * @return Other error codes as defined for the 327 327 * socket_bind_insert() function. 328 328 */ … … 367 367 * requested. A negative identifier is requested if set to 368 368 * false. 369 * @return sThe new socket identifier.370 * @return sELIMIT if there is no socket identifier available.369 * @return The new socket identifier. 370 * @return ELIMIT if there is no socket identifier available. 371 371 */ 372 372 static int socket_generate_new_id(socket_cores_t *local_sockets, int positive) … … 410 410 * chosen if set to zero or negative. A negative identifier 411 411 * is chosen if set to negative. 412 * @return sEOK on success.413 * @return sEINVAL if the socket_id parameter is NULL.414 * @return sENOMEM if there is not enough memory left.412 * @return EOK on success. 413 * @return EINVAL if the socket_id parameter is NULL. 414 * @return ENOMEM if there is not enough memory left. 415 415 */ 416 416 int … … 482 482 * @param[in,out] global_sockets The global sockets to be updated. 483 483 * @param[in] socket_release The client release callback function. 484 * @return sEOK on success.485 * @return sENOTSOCK if the socket is not found.484 * @return EOK on success. 485 * @return ENOTSOCK if the socket is not found. 486 486 */ 487 487 int … … 516 516 * @param[in] packet The packet to be transfered. 517 517 * @param[out] length The total data length. 518 * @return sEOK on success.519 * @return sEBADMEM if the length parameter is NULL.520 * @return sENOMEM if there is not enough memory left.521 * @return sOther error codes as defined for the data_reply()518 * @return EOK on success. 519 * @return EBADMEM if the length parameter is NULL. 520 * @return ENOMEM if there is not enough memory left. 521 * @return Other error codes as defined for the data_reply() 522 522 * function. 523 523 */ … … 598 598 * @param[in] key The socket key identifier. 599 599 * @param[in] key_length The socket key length. 600 * @return sThe found socket.601 * @return sNULL if no socket was found.600 * @return The found socket. 601 * @return NULL if no socket was found. 602 602 */ 603 603 socket_core_t * … … 673 673 * @param[in] key The socket key identifier. 674 674 * @param[in] key_length The socket key length. 675 * @return sEOK on success.676 * @return sENOENT if the port is not already used.677 * @return sOther error codes as defined for the675 * @return EOK on success. 676 * @return ENOENT if the port is not already used. 677 * @return Other error codes as defined for the 678 678 * socket_port_add_core() function. 679 679 */ -
uspace/lib/net/tl/tl_common.c
rcc3c2a1c r1bfd3d3 64 64 * @param[in] addrlen The address length. 65 65 * @param[out] port The set port. 66 * @return sEOK on success.67 * @return sEINVAL if the address length does not match the address66 * @return EOK on success. 67 * @return EINVAL if the address length does not match the address 68 68 * family. 69 * @return sEAFNOSUPPORT if the address family is not supported.69 * @return EAFNOSUPPORT if the address family is not supported. 70 70 */ 71 71 int … … 158 158 * @param[in] device_id The device identifier. 159 159 * @param[in] content The new maximum content size. 160 * @return sEOK on success.160 * @return EOK on success. 161 161 * @return ENOENT if the packet dimension is not cached. 162 162 */ … … 196 196 * @param[in] addrlen The address length. 197 197 * @param[in] port The port to be set. 198 * @return sEOK on success.199 * @return sEINVAL if the address length does not match the address198 * @return EOK on success. 199 * @return EINVAL if the address length does not match the address 200 200 * family. 201 * @return sEAFNOSUPPORT if the address family is not supported.201 * @return EAFNOSUPPORT if the address family is not supported. 202 202 */ 203 203 int tl_set_address_port(struct sockaddr * addr, int addrlen, uint16_t port) … … 244 244 * @param[in] error The packet error reporting service. Prefixes the 245 245 * received packet. 246 * @return sEOK on success.247 * @return sENOENT if no packet may be sent.246 * @return EOK on success. 247 * @return ENOENT if no packet may be sent. 248 248 */ 249 249 int … … 280 280 * @param[in] addr The destination address. 281 281 * @param[in] addrlen The address length. 282 * @return sNumber of bytes received.283 * @return sEINVAL if the client does not send data.284 * @return sENOMEM if there is not enough memory left.285 * @return sOther error codes as defined for the282 * @return Number of bytes received. 283 * @return EINVAL if the client does not send data. 284 * @return ENOMEM if there is not enough memory left. 285 * @return Other error codes as defined for the 286 286 * async_data_read_finalize() function. 287 287 */ -
uspace/lib/packet/generic/packet_server.c
rcc3c2a1c r1bfd3d3 154 154 * @param[in] max_content The maximal content length in bytes. 155 155 * @param[in] max_suffix The maximal suffix length in bytes. 156 * @return sThe packet of dimensions at least as given.157 * @return sNULL if there is not enough memory left.156 * @return The packet of dimensions at least as given. 157 * @return NULL if there is not enough memory left. 158 158 */ 159 159 static packet_t … … 278 278 * 279 279 * @param[in] packet_id The first packet identifier. 280 * @return sEOK on success.281 * @return sENOENT if there is no such packet.280 * @return EOK on success. 281 * @return ENOENT if there is no such packet. 282 282 */ 283 283 static int packet_release_wrapper(packet_id_t packet_id) … … 303 303 /** Shares the packet memory block. 304 304 * @param[in] packet The packet to be shared. 305 * @return sEOK on success.306 * @return sEINVAL if the packet is not valid.307 * @return sEINVAL if the calling module does not accept the memory.308 * @return sENOMEM if the desired and actual sizes differ.309 * @return sOther error codes as defined for the305 * @return EOK on success. 306 * @return EINVAL if the packet is not valid. 307 * @return EINVAL if the calling module does not accept the memory. 308 * @return ENOMEM if the desired and actual sizes differ. 309 * @return Other error codes as defined for the 310 310 * async_share_in_finalize() function. 311 311 */ … … 339 339 * @param[out] answer_count The last parameter for the actual answer in the 340 340 * answer parameter. 341 * @return sEOK on success.342 * @return sENOMEM if there is not enough memory left.343 * @return sENOENT if there is no such packet as in the packet341 * @return EOK on success. 342 * @return ENOMEM if there is not enough memory left. 343 * @return ENOENT if there is no such packet as in the packet 344 344 * message parameter. 345 * @return sENOTSUP if the message is not known.346 * @return sOther error codes as defined for the345 * @return ENOTSUP if the message is not known. 346 * @return Other error codes as defined for the 347 347 * packet_release_wrapper() function. 348 348 */
Note:
See TracChangeset
for help on using the changeset viewer.
