Changes in uspace/srv/net/ethip/ethip.c [a17356fd:f9b2cb4c] in mainline
- File:
-
- 1 edited
-
uspace/srv/net/ethip/ethip.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip.c
ra17356fd rf9b2cb4c 44 44 #include <stdio.h> 45 45 #include <stdlib.h> 46 #include < net/socket_codes.h>46 #include <task.h> 47 47 #include "arp.h" 48 48 #include "ethip.h" … … 59 59 static int ethip_get_mtu(iplink_srv_t *srv, size_t *mtu); 60 60 static int ethip_get_mac48(iplink_srv_t *srv, addr48_t *mac); 61 static int ethip_set_mac48(iplink_srv_t *srv, addr48_t *mac); 61 62 static int ethip_addr_add(iplink_srv_t *srv, inet_addr_t *addr); 62 63 static int ethip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr); … … 71 72 .get_mtu = ethip_get_mtu, 72 73 .get_mac48 = ethip_get_mac48, 74 .set_mac48 = ethip_set_mac48, 73 75 .addr_add = ethip_addr_add, 74 76 .addr_remove = ethip_addr_remove … … 77 79 static int ethip_init(void) 78 80 { 79 async_set_ client_connection(ethip_client_conn);81 async_set_fallback_port_handler(ethip_client_conn, NULL); 80 82 81 83 int rc = loc_server_register(NAME); … … 145 147 service_id_t sid; 146 148 147 sid = (service_id_t) IPC_GET_ARG1(*icall);149 sid = (service_id_t) IPC_GET_ARG2(*icall); 148 150 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_client_conn(%u)", (unsigned)sid); 149 151 nic = ethip_nic_find_by_iplink_sid(sid); … … 249 251 sdu.size = frame.size; 250 252 log_msg(LOG_DEFAULT, LVL_DEBUG, " - call iplink_ev_recv"); 251 rc = iplink_ev_recv(&nic->iplink, &sdu, AF_INET);253 rc = iplink_ev_recv(&nic->iplink, &sdu, ip_v4); 252 254 break; 253 255 case ETYPE_IPV6: … … 256 258 sdu.size = frame.size; 257 259 log_msg(LOG_DEFAULT, LVL_DEBUG, " - call iplink_ev_recv"); 258 rc = iplink_ev_recv(&nic->iplink, &sdu, AF_INET6);260 rc = iplink_ev_recv(&nic->iplink, &sdu, ip_v6); 259 261 break; 260 262 default: … … 284 286 } 285 287 288 static int ethip_set_mac48(iplink_srv_t *srv, addr48_t *mac) 289 { 290 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_set_mac48()"); 291 292 ethip_nic_t *nic = (ethip_nic_t *) srv->arg; 293 addr48(*mac, nic->mac_addr); 294 295 return EOK; 296 } 297 286 298 static int ethip_addr_add(iplink_srv_t *srv, inet_addr_t *addr) 287 299 {
Note:
See TracChangeset
for help on using the changeset viewer.
