Changeset 1493811 in mainline for uspace/srv/ethip/ethip_nic.c


Ignore:
Timestamp:
2012-02-11T19:11:08Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f64a523
Parents:
e767dbf
Message:

Ethernet PDU encoding and decoding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ethip/ethip_nic.c

    re767dbf r1493811  
    2727 */
    2828
    29 /** @addtogroup inet
     29/** @addtogroup ethip
    3030 * @{
    3131 */
     
    201201    ipc_call_t *call)
    202202{
     203        int rc;
     204        void *data;
     205        size_t size;
     206
    203207        log_msg(LVL_DEBUG, "ethip_nic_received()");
    204         async_answer_0(callid, ENOTSUP);
     208
     209        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
     210        if (rc != EOK) {
     211                log_msg(LVL_DEBUG, "data_write_accept() failed");
     212                return;
     213        }
     214
     215        rc = ethip_received(&nic->iplink, data, size);
     216        free(data);
     217
     218        async_answer_0(callid, rc);
    205219}
    206220
     
    277291}
    278292
     293int ethip_nic_send(ethip_nic_t *nic, void *data, size_t size)
     294{
     295        return nic_send_frame(nic->sess, data, size);
     296}
     297
    279298/** @}
    280299 */
Note: See TracChangeset for help on using the changeset viewer.