aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-05-22 01:19:18 +0000
committerGuy Harris <guy@alum.mit.edu>2013-05-22 01:19:18 +0000
commitc1d34d4be65944ad84f4239672c8f34c969d9d24 (patch)
treef97d9b262d8ec9043a6a80e1f43027b3528fe394 /dumpcap.c
parent7f97cc813e4d192b714500da4dcff5d129823a5c (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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/dumpcap.c b/dumpcap.c
index e52c2660ec..bea4537176 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -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))