Changeset c3b25985 in mainline for uspace/srv/net/ethip
- Timestamp:
- 2014-08-05T21:43:50Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ee95794
- Parents:
- 1f1fa64
- Location:
- uspace/srv/net/ethip
- Files:
-
- 2 edited
-
ethip.c (modified) (3 diffs)
-
ethip_nic.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip.c
r1f1fa64 rc3b25985 58 58 static int ethip_get_mtu(iplink_srv_t *srv, size_t *mtu); 59 59 static int ethip_get_mac48(iplink_srv_t *srv, addr48_t *mac); 60 static int ethip_set_mac48(iplink_srv_t *srv, addr48_t *mac); 60 61 static int ethip_addr_add(iplink_srv_t *srv, inet_addr_t *addr); 61 62 static int ethip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr); … … 70 71 .get_mtu = ethip_get_mtu, 71 72 .get_mac48 = ethip_get_mac48, 73 .set_mac48 = ethip_set_mac48, 72 74 .addr_add = ethip_addr_add, 73 75 .addr_remove = ethip_addr_remove … … 283 285 } 284 286 287 static int ethip_set_mac48(iplink_srv_t *srv, addr48_t *mac) 288 { 289 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_set_mac48()"); 290 291 ethip_nic_t *nic = (ethip_nic_t *) srv->arg; 292 addr48(*mac, nic->mac_addr); 293 294 return EOK; 295 } 296 285 297 static int ethip_addr_add(iplink_srv_t *srv, inet_addr_t *addr) 286 298 { -
uspace/srv/net/ethip/ethip_nic.c
r1f1fa64 rc3b25985 245 245 addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); 246 246 247 memcpy(&nic->mac_addr, addr, sizeof(nic->mac_addr)); 248 249 rc = iplink_ev_change_addr(&nic->iplink, &nic->mac_addr); 250 if (rc != EOK) { 251 log_msg(LOG_DEFAULT, LVL_DEBUG, "iplink_ev_change_addr() failed"); 252 return; 253 } 254 247 255 free(addr); 248 256 async_answer_0(callid, EOK);
Note:
See TracChangeset
for help on using the changeset viewer.
