Changeset 1bfd3d3 in mainline for uspace/lib/c/generic/net
- 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/c/generic/net
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
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 */
Note:
See TracChangeset
for help on using the changeset viewer.