Ignore:
File:
1 edited

Legend:

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

    r1bc35b5 r6d8455d  
    814814}
    815815
    816 static 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 
    837816static int eth_addr_changed(nic_device_id_t device_id)
    838817{
     
    947926                return EOK;
    948927        case NET_NIL_RECEIVED:
    949                 rc = eth_received(IPC_GET_ARG1(*call));
     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               
    950933                async_answer_0(callid, (sysarg_t) rc);
    951934                return rc;
Note: See TracChangeset for help on using the changeset viewer.