Changeset 962f03b in mainline for uspace/srv/ethip/ethip.c


Ignore:
Timestamp:
2012-02-27T19:32:15Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
56792a2
Parents:
87e5658c
Message:

IP links need to be made aware of configured IP addresses.

File:
1 edited

Legend:

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

    r87e5658c r962f03b  
    5757static int ethip_send(iplink_srv_t *srv, iplink_srv_sdu_t *sdu);
    5858static int ethip_get_mtu(iplink_srv_t *srv, size_t *mtu);
     59static int ethip_addr_add(iplink_srv_t *srv, iplink_srv_addr_t *addr);
     60static int ethip_addr_remove(iplink_srv_t *srv, iplink_srv_addr_t *addr);
    5961
    6062static void ethip_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg);
     
    6466        .close = ethip_close,
    6567        .send = ethip_send,
    66         .get_mtu = ethip_get_mtu
     68        .get_mtu = ethip_get_mtu,
     69        .addr_add = ethip_addr_add,
     70        .addr_remove = ethip_addr_remove
    6771};
    6872
     
    234238}
    235239
     240static int ethip_addr_add(iplink_srv_t *srv, iplink_srv_addr_t *addr)
     241{
     242        ethip_nic_t *nic = (ethip_nic_t *)srv->arg;
     243
     244        log_msg(LVL_DEBUG, "ethip_addr_add(0x%" PRIx32 ")", addr->ipv4);
     245        return ethip_nic_addr_add(nic, addr);
     246}
     247
     248static int ethip_addr_remove(iplink_srv_t *srv, iplink_srv_addr_t *addr)
     249{
     250        ethip_nic_t *nic = (ethip_nic_t *)srv->arg;
     251
     252        log_msg(LVL_DEBUG, "ethip_addr_remove(0x%" PRIx32 ")", addr->ipv4);
     253        return ethip_nic_addr_add(nic, addr);
     254}
     255
    236256int main(int argc, char *argv[])
    237257{
Note: See TracChangeset for help on using the changeset viewer.