add get_manuf_name_if_known (returns NULL if unknown) in addition to get_manuf_name

svn path=/trunk/; revision=14405
This commit is contained in:
Ulf Lamping 2005-05-20 21:44:17 +00:00
parent 3bb534f338
commit d2233711d9
3 changed files with 21 additions and 0 deletions

View File

@ -2130,6 +2130,23 @@ extern const gchar *get_manuf_name(const guint8 *addr)
} /* get_manuf_name */
const gchar *get_manuf_name_if_known(const guint8 *addr)
{
hashmanuf_t *manufp;
if (!eth_resolution_initialized) {
initialize_ethers();
eth_resolution_initialized = 1;
}
if ((manufp = manuf_name_lookup(addr)) == NULL) {
return NULL;
}
return manufp->name;
} /* get_manuf_name_if_known */
/* Translate a string, assumed either to be a dotted-quad IP address or
* a host name, to a numeric IP address. Return TRUE if we succeed and

View File

@ -135,6 +135,9 @@ extern gchar *get_ether_name_if_known(const guint8 *addr);
/* get_manuf_name returns the vendor name or "%02x:%02x:%02x" if not known */
extern const gchar *get_manuf_name(const guint8 *addr);
/* get_manuf_name returns the vendor name or NULL if not known */
extern const gchar *get_manuf_name_if_known(const guint8 *addr);
/* get_ipxnet_name returns the logical name if found in an ipxnets file,
* or a string formatted with "%X" if not */
extern const gchar *get_ipxnet_name(const guint32 addr);

View File

@ -285,6 +285,7 @@ get_dissector_table_ui_name
get_ether_name
get_hostname
get_hostname6
get_manuf_name_if_known
get_persconffile_path
get_plugins_global_dir
get_plugins_pers_dir