aboutsummaryrefslogtreecommitdiffstats
path: root/capture_ifinfo.h
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 /capture_ifinfo.h
parentb9e8e95ffe9f352cde5847d458081826523cf46f (diff)
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 'capture_ifinfo.h')
-rw-r--r--capture_ifinfo.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/capture_ifinfo.h b/capture_ifinfo.h
index 3ec2e51160..7802598bef 100644
--- a/capture_ifinfo.h
+++ b/capture_ifinfo.h
@@ -35,8 +35,12 @@ extern "C" {
*/
typedef struct {
char *name; /* e.g. "eth0" */
- char *description; /* vendor description from libpcap, e.g. "Realtek PCIe GBE Family Controller" or NULL */
- char *friendly_name; /* from OS, e.g. "Local Area Connection" */
+ char *friendly_name; /* from OS, e.g. "Local Area Connection", or
+ NULL if not available */
+ char *vendor_description;
+ /* vendor description from pcap_findalldevs(),
+ e.g. "Realtek PCIe GBE Family Controller",
+ or NULL if not available */
GSList *addrs; /* containing address values of if_addr_t */
gboolean loopback; /* TRUE if loopback, FALSE otherwise */
} if_info_t;