diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-11-22 06:02:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-11-22 06:02:49 +0000 |
commit | bd976ae6c06b2111bd82df16b77739731dc17402 (patch) | |
tree | 406d65d00129abb45868150687f267a139bbf670 /cfutils.h | |
parent | b9e8e95ffe9f352cde5847d458081826523cf46f (diff) | |
download | wireshark-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 'cfutils.h')
-rw-r--r-- | cfutils.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cfutils.h b/cfutils.h new file mode 100644 index 0000000000..98a726bf89 --- /dev/null +++ b/cfutils.h @@ -0,0 +1,28 @@ +/* cfutils.h + * Declarations of routines to work around deficiencies in Core Foundation, + * such as the lack of a routine to convert a CFString to a C string of + * arbitrary size. + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 2001 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +extern char *CFString_to_C_string(CFStringRef cfstring); + |