Changes in uspace/app/inet/inet.c [257feec:b8b1adb1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/inet/inet.c
r257feec rb8b1adb1 312 312 } 313 313 314 static int link_list(void) 315 { 316 sysarg_t *link_list; 317 inet_link_info_t linfo; 318 319 size_t count; 320 size_t i; 321 int rc; 322 323 rc = inetcfg_get_link_list(&link_list, &count); 324 if (rc != EOK) { 325 printf(NAME ": Failed getting link list.\n"); 326 return rc; 327 } 328 329 printf("IP links:\n"); 330 if (count > 0) 331 printf(" [Link-layer Address] [Link-Name] [Def-MTU]\n"); 332 333 for (i = 0; i < count; i++) { 334 rc = inetcfg_link_get(link_list[i], &linfo); 335 if (rc != EOK) { 336 printf("Failed getting properties of link %zu.\n", 337 (size_t)link_list[i]); 338 continue; 339 } 340 341 printf(" %02x:%02x:%02x:%02x:%02x:%02x %s %zu\n", 342 linfo.mac_addr[0], linfo.mac_addr[1], 343 linfo.mac_addr[2], linfo.mac_addr[3], 344 linfo.mac_addr[4], linfo.mac_addr[5], 345 linfo.name, linfo.def_mtu); 346 347 free(linfo.name); 348 349 linfo.name = NULL; 350 } 351 352 if (count == 0) 353 printf(" None\n"); 354 355 free(link_list); 356 357 return EOK; 358 } 359 314 360 static int sroute_list(void) 315 361 { … … 404 450 if (rc != EOK) 405 451 return 1; 452 rc = link_list(); 453 if (rc != EOK) 454 return 1; 406 455 return 0; 407 456 }
Note:
See TracChangeset
for help on using the changeset viewer.