diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-05-22 01:19:18 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-05-22 01:19:18 +0000 |
commit | c1d34d4be65944ad84f4239672c8f34c969d9d24 (patch) | |
tree | f97d9b262d8ec9043a6a80e1f43027b3528fe394 /dumpcap.c | |
parent | 7f97cc813e4d192b714500da4dcff5d129823a5c (diff) |
On OS X, get the interface type from the System Configuration framework.
svn path=/trunk/; revision=49486
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1294,7 +1294,7 @@ print_machine_readable_interfaces(GList *if_list) for (if_entry = g_list_first(if_list); if_entry != NULL; if_entry = g_list_next(if_entry)) { if_info = (if_info_t *)if_entry->data; - printf("%d. %s", i++, if_info->name); + printf("%d. %s\t", i++, if_info->name); /* * Print the contents of the if_entry struct in a parseable format. @@ -1303,9 +1303,9 @@ print_machine_readable_interfaces(GList *if_list) */ /* XXX - Make sure our description doesn't contain a tab */ if (if_info->vendor_description != NULL) - printf("\t%s\t", if_info->vendor_description); + printf("%s\t", if_info->vendor_description); else - printf("\t\t"); + printf("\t"); /* XXX - Make sure our friendly name doesn't contain a tab */ if (if_info->friendly_name != NULL) @@ -1313,6 +1313,8 @@ print_machine_readable_interfaces(GList *if_list) else printf("\t"); + printf("%u\t", if_info->type); + for (addr = g_slist_nth(if_info->addrs, 0); addr != NULL; addr = g_slist_next(addr)) { if (addr != g_slist_nth(if_info->addrs, 0)) |