summaryrefslogtreecommitdiff
path: root/dumpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-11-22 06:02:49 +0000
committerGuy Harris <guy@alum.mit.edu>2012-11-22 06:02:49 +0000
commitbd976ae6c06b2111bd82df16b77739731dc17402 (patch)
tree406d65d00129abb45868150687f267a139bbf670 /dumpcap.c
parentb9e8e95ffe9f352cde5847d458081826523cf46f (diff)
downloadwireshark-bd976ae6c06b2111bd82df16b77739731dc17402.tar.gz
On UN*X, if an interface has a description, use it as the "friendly
name". If it doesn't have a description, on OS X, use the System Configuration framework to attempt to get a "friendly name" for interfaces. If a loopback device doesn't have a friendly name, give it "Loopback" as the friendly name. Move the "turn a CFString into a mallocated C string" routine into common code, as it's used in more than one place. svn path=/trunk/; revision=46131
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 4602da345e..399f6043fd 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -1307,11 +1307,12 @@ print_machine_readable_interfaces(GList *if_list)
* separated.
*/
/* XXX - Make sure our description doesn't contain a tab */
- if (if_info->description != NULL)
- printf("\t%s\t", if_info->description);
+ if (if_info->vendor_description != NULL)
+ printf("\t%s\t", if_info->vendor_description);
else
printf("\t\t");
+ /* XXX - Make sure our friendly name doesn't contain a tab */
if (if_info->friendly_name != NULL)
printf("%s\t", if_info->friendly_name);
else