diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-11-20 05:35:15 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-11-20 05:35:15 +0000 |
commit | 2da6ff3be5d6c0fa312550e238049707b28c0777 (patch) | |
tree | b2d621b197a4d1522118d4a4e43906ede7c7b3c5 /resolv.h | |
parent | 2f996a14984f2114256f3e31986a5a2f1a49753a (diff) |
Enable ether name resolution for packet summary lines of IPX packets
(in the src/dst of the CList). In order to do this, I had to:
1. Add a new function, ether_to_str_punct(const guint8*, char) which
turns a 6-byt ether address into a string, using whatever punctuation
is passed as the char. If a null char is passed, no separator
is put between the hex digits. Unresolved IPX addresses look better
with the ether portion having no punctuation (IMHO)
2. Changed ether_to_str() to call ether_to_str_punct with ':' as the char
argument. That is, code abstraction.
3. MAXNAMELEN was moved from resolv.c to resolv.h so that packet-ipx.c
could see it.
4. A new resolve function, get_ether_name_if_known(), returns the resolved name
of an ether address, or NULL if there is none. This differs
from get_ether_name() by returning NULL rather than a text version
of the ether address.
svn path=/trunk/; revision=1076
Diffstat (limited to 'resolv.h')
-rw-r--r-- | resolv.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* resolv.h * Definitions for network object lookup * - * $Id: resolv.h,v 1.9 1999/10/22 07:17:51 guy Exp $ + * $Id: resolv.h,v 1.10 1999/11/20 05:35:15 gram Exp $ * * Laurent Deniel <deniel@worldnet.fr> * @@ -36,6 +36,10 @@ #define EPATH_MANUF DATAFILE_DIR "/manuf" #define EPATH_PERSONAL_ETHERS ".ethereal/ethers" /* with "$HOME/" prefix */ +#ifndef MAXNAMELEN +#define MAXNAMELEN 64 /* max name length (hostname and port name) */ +#endif + /* global variables */ extern gchar *g_ethers_path; @@ -62,6 +66,9 @@ gchar* get_hostname6(struct e_in6_addr *ad); "%02x:%02x:%02x:%02x:%02x:%02x" */ extern u_char *get_ether_name(const u_char *addr); +/* get_ether_name returns the logical name if found in ethers files else NULL */ +extern u_char *get_ether_name_if_known(const u_char *addr); + /* get_manuf_name returns the vendor name or "%02x:%02x:%02x" if not known */ extern u_char *get_manuf_name(u_char *addr); |