diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-16 02:48:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-16 02:48:12 +0000 |
commit | 7f30e566a0257e7319a2e6a052476afd46924b12 (patch) | |
tree | ebe8cc252f6efe9166f3a6a14517cfd937290a17 /util.h | |
parent | 66a0ac1ca116c350549aa006772c67c891602b8f (diff) |
Move the routine to get a list of the network interfaces on the system
to "util.c", and provide a routine to free that list as well.
When picking an interface on which to do a capture (if no "-i" flag was
specified), use that routine, and pick the first interface on the list.
svn path=/trunk/; revision=1495
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* util.h * Utility definitions * - * $Id: util.h,v 1.14 1999/12/09 07:19:05 guy Exp $ + * $Id: util.h,v 1.15 2000/01/16 02:47:47 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -37,6 +37,18 @@ guint8 ASCII_to_EBCDIC1(guint8 c); void EBCDIC_to_ASCII(guint8 *buf, guint bytes); guint8 EBCDIC_to_ASCII1(guint8 c); +#ifdef HAVE_LIBPCAP + +GList *get_interface_list(int *err, char *err_str); + +/* Error values from "get_interface_list()". */ +#define CANT_GET_INTERFACE_LIST 0 /* error getting list */ +#define NO_INTERFACES_FOUND 1 /* list is empty */ + +void free_interface_list(GList *if_list); + +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ |