Changeset 86c71de in mainline for uspace/srv/net/nil/eth/eth.c


Ignore:
Timestamp:
2012-01-21T12:57:55Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eaa0c3f
Parents:
47a89fe (diff), e86b8f0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/eth/eth.c

    r47a89fe r86c71de  
    814814}
    815815
     816static int eth_received(nic_device_id_t device_id)
     817{
     818        void *data;
     819        size_t size;
     820        int rc;
     821       
     822        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
     823        if (rc != EOK)
     824                return rc;
     825       
     826        packet_t *packet = packet_get_1_remote(eth_globals.net_sess, size);
     827        if (packet == NULL)
     828                return ENOMEM;
     829       
     830        void *pdata = packet_suffix(packet, size);
     831        memcpy(pdata, data, size);
     832        free(data);
     833       
     834        return nil_received_msg_local(device_id, packet);
     835}
     836
    816837static int eth_addr_changed(nic_device_id_t device_id)
    817838{
     
    926947                return EOK;
    927948        case NET_NIL_RECEIVED:
    928                 rc = packet_translate_remote(eth_globals.net_sess, &packet,
    929                     IPC_GET_ARG2(*call));
    930                 if (rc == EOK)
    931                         rc = nil_received_msg_local(IPC_GET_ARG1(*call), packet);
    932                
     949                rc = eth_received(IPC_GET_ARG1(*call));
    933950                async_answer_0(callid, (sysarg_t) rc);
    934951                return rc;
Note: See TracChangeset for help on using the changeset viewer.