Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inet/tcp.c

    rcde999a rf9b2cb4c  
    5959 *
    6060 * @param tcp TCP service
    61  * @return EOK on success or an error code
     61 * @return EOK on success or negative error code
    6262 */
    6363static int tcp_callback_create(tcp_t *tcp)
     
    7676                return rc;
    7777
    78         int retval;
     78        sysarg_t retval;
    7979        async_wait_for(req, &retval);
    8080
     
    205205 * @param rconn Place to store pointer to new connection
    206206 *
    207  * @return EOK on success or an error code.
     207 * @return EOK on success or negative error code.
    208208 */
    209209int tcp_conn_create(tcp_t *tcp, inet_ep2_t *epp, tcp_cb_t *cb, void *arg,
     
    216216        exch = async_exchange_begin(tcp->sess);
    217217        aid_t req = async_send_0(exch, TCP_CONN_CREATE, &answer);
    218         int rc = async_data_write_start(exch, (void *)epp,
     218        sysarg_t rc = async_data_write_start(exch, (void *)epp,
    219219            sizeof(inet_ep2_t));
    220220        async_exchange_end(exch);
    221221
    222222        if (rc != EOK) {
    223                 int rc_orig;
     223                sysarg_t rc_orig;
    224224                async_wait_for(req, &rc_orig);
    225225                if (rc_orig != EOK)
     
    260260
    261261        exch = async_exchange_begin(conn->tcp->sess);
    262         int rc = async_req_1_0(exch, TCP_CONN_DESTROY, conn->id);
     262        sysarg_t rc = async_req_1_0(exch, TCP_CONN_DESTROY, conn->id);
    263263        async_exchange_end(exch);
    264264
     
    316316 * @param rlst Place to store pointer to new listener
    317317 *
    318  * @return EOK on success or an error code
     318 * @return EOK on success or negative error code
    319319 */
    320320int tcp_listener_create(tcp_t *tcp, inet_ep_t *ep, tcp_listen_cb_t *lcb,
     
    331331        exch = async_exchange_begin(tcp->sess);
    332332        aid_t req = async_send_0(exch, TCP_LISTENER_CREATE, &answer);
    333         int rc = async_data_write_start(exch, (void *)ep,
     333        sysarg_t rc = async_data_write_start(exch, (void *)ep,
    334334            sizeof(inet_ep_t));
    335335        async_exchange_end(exch);
    336336
    337337        if (rc != EOK) {
    338                 int rc_orig;
     338                sysarg_t rc_orig;
    339339                async_wait_for(req, &rc_orig);
    340340                if (rc_orig != EOK)
     
    377377
    378378        exch = async_exchange_begin(lst->tcp->sess);
    379         int rc = async_req_1_0(exch, TCP_LISTENER_DESTROY, lst->id);
     379        sysarg_t rc = async_req_1_0(exch, TCP_LISTENER_DESTROY, lst->id);
    380380        async_exchange_end(exch);
    381381
     
    446446 * @param bytes Data size in bytes
    447447 *
    448  * @return EOK on success or an error code
     448 * @return EOK on success or negative error code
    449449 */
    450450int tcp_conn_send(tcp_conn_t *conn, const void *data, size_t bytes)
    451451{
    452452        async_exch_t *exch;
    453         int rc;
     453        sysarg_t rc;
    454454
    455455        exch = async_exchange_begin(conn->tcp->sess);
     
    478478 *
    479479 * @param conn Connection
    480  * @return EOK on success or an error code
     480 * @return EOK on success or negative error code
    481481 */
    482482int tcp_conn_send_fin(tcp_conn_t *conn)
     
    485485
    486486        exch = async_exchange_begin(conn->tcp->sess);
    487         int rc = async_req_1_0(exch, TCP_CONN_SEND_FIN, conn->id);
     487        sysarg_t rc = async_req_1_0(exch, TCP_CONN_SEND_FIN, conn->id);
    488488        async_exchange_end(exch);
    489489
     
    494494 *
    495495 * @param conn Connection
    496  * @return EOK on success or an error code
     496 * @return EOK on success or negative error code
    497497 */
    498498int tcp_conn_push(tcp_conn_t *conn)
     
    501501
    502502        exch = async_exchange_begin(conn->tcp->sess);
    503         int rc = async_req_1_0(exch, TCP_CONN_PUSH, conn->id);
     503        sysarg_t rc = async_req_1_0(exch, TCP_CONN_PUSH, conn->id);
    504504        async_exchange_end(exch);
    505505
     
    510510 *
    511511 * @param conn Connection
    512  * @return EOK on success or an error code
     512 * @return EOK on success or negative error code
    513513 */
    514514int tcp_conn_reset(tcp_conn_t *conn)
     
    517517
    518518        exch = async_exchange_begin(conn->tcp->sess);
    519         int rc = async_req_1_0(exch, TCP_CONN_RESET, conn->id);
     519        sysarg_t rc = async_req_1_0(exch, TCP_CONN_RESET, conn->id);
    520520        async_exchange_end(exch);
    521521
     
    538538 *
    539539 * @return EOK on success, EAGAIN if no received data is pending, or other
    540  *         error code in case of other error
     540 *         negative error code in case of other error
    541541 */
    542542int tcp_conn_recv(tcp_conn_t *conn, void *buf, size_t bsize, size_t *nrecv)
     
    562562        }
    563563
    564         int retval;
     564        sysarg_t retval;
    565565        async_wait_for(req, &retval);
    566566        if (retval != EOK) {
     
    586586 * @param nrecv Place to store actual number of received bytes
    587587 *
    588  * @return EOK on success or an error code
     588 * @return EOK on success or negative error code
    589589 */
    590590int tcp_conn_recv_wait(tcp_conn_t *conn, void *buf, size_t bsize,
     
    616616        }
    617617
    618         int retval;
     618        sysarg_t retval;
    619619        async_wait_for(req, &retval);
    620620        if (retval != EOK) {
Note: See TracChangeset for help on using the changeset viewer.