Changeset 8d48c7e in mainline for uspace/srv/net/inetsrv/inetsrv.c


Ignore:
Timestamp:
2015-06-02T16:00:42Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4bb828
Parents:
ab6326bc
Message:

Find the association to deliver the datagram using amap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/inetsrv.c

    rab6326bc r8d48c7e  
    469469{
    470470        async_exch_t *exch = async_exchange_begin(client->sess);
    471        
     471
    472472        ipc_call_t answer;
    473         aid_t req = async_send_1(exch, INET_EV_RECV, dgram->tos, &answer);
    474        
     473
     474        log_msg(LOG_DEFAULT, LVL_NOTE, "inet_ev_recv: iplink=%zu",
     475            dgram->iplink);
     476
     477        aid_t req = async_send_2(exch, INET_EV_RECV, dgram->tos,
     478            dgram->iplink, &answer);
     479
    475480        int rc = async_data_write_start(exch, &dgram->src, sizeof(inet_addr_t));
    476481        if (rc != EOK) {
     
    479484                return rc;
    480485        }
    481        
     486
    482487        rc = async_data_write_start(exch, &dgram->dest, sizeof(inet_addr_t));
    483488        if (rc != EOK) {
     
    486491                return rc;
    487492        }
    488        
     493
    489494        rc = async_data_write_start(exch, dgram->data, dgram->size);
    490        
     495
    491496        async_exchange_end(exch);
    492        
     497
    493498        if (rc != EOK) {
    494499                async_forget(req);
    495500                return rc;
    496501        }
    497        
     502
    498503        sysarg_t retval;
    499504        async_wait_for(req, &retval);
    500        
     505
    501506        return (int) retval;
    502507}
     
    511516        if (proto == IP_PROTO_ICMP)
    512517                return icmp_recv(dgram);
    513        
     518
    514519        if (proto == IP_PROTO_ICMPV6)
    515520                return icmpv6_recv(dgram);
     
    540545                if (packet->offs == 0 && !packet->mf) {
    541546                        /* It is complete deliver it immediately */
     547                        dgram.iplink = packet->link_id;
    542548                        dgram.src = packet->src;
    543549                        dgram.dest = packet->dest;
Note: See TracChangeset for help on using the changeset viewer.