Get rid of the check for NetBSD in the Wiretap "configure.in"; we
[obnox/wireshark/wip.git] / resolv.h
index 4782f60f30e764181e462c4b578cb694456026f5..2a7723e90db316519a55f5f8c78f6e57336fa073 100644 (file)
--- a/resolv.h
+++ b/resolv.h
@@ -1,7 +1,7 @@
 /* resolv.h
  * Definitions for network object lookup
  *
- * $Id: resolv.h,v 1.5 1999/07/07 22:51:59 gram Exp $
+ * $Id: resolv.h,v 1.11 1999/11/21 16:32:16 gram Exp $
  *
  * Laurent Deniel <deniel@worldnet.fr>
  *
 #endif
 
 #define EPATH_ETHERS           "/etc/ethers"
+#define EPATH_IPXNETS          "/etc/ipxnets"
 #define EPATH_MANUF            DATAFILE_DIR "/manuf"
-#define EPATH_PERSONAL_ETHERS  ".ethereal/ethers" /* with "$HOME/" prefix */
+#define EPATH_PERSONAL_ETHERS  ".ethereal/ethers"  /* with "$HOME/" prefix */
+#define EPATH_PERSONAL_IPXNETS         ".ethereal/ipxnets" /* with "$HOME/" prefix */
+
+#ifndef MAXNAMELEN
+#define MAXNAMELEN     64      /* max name length (hostname and port name) */
+#endif
 
 /* global variables */
 
 extern gchar *g_ethers_path;
+extern gchar *g_ipxnets_path;
 extern gchar *g_manuf_path;
 extern gchar *g_pethers_path;
-extern int    g_resolving_actif;
+extern gchar *g_pipxnets_path;
 
 /* Functions in resolv.c */
 
@@ -61,18 +68,38 @@ gchar* get_hostname6(struct e_in6_addr *ad);
 /* get_ether_name returns the logical name if found in ethers files else
    "<vendor>_%02x:%02x:%02x" if the vendor code is known else
    "%02x:%02x:%02x:%02x:%02x:%02x" */
-extern u_char *get_ether_name(u_char *addr);
+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);
 
+/* get_ipxnet_name returns the logical name if found in an ipxnets file,
+ * or a string formatted with "%X" if not */
+extern u_char *get_ipxnet_name(const guint32 addr);
+
 /* returns the ethernet address corresponding to name or NULL if not known */
 extern u_char *get_ether_addr(u_char *name);
 
+/* returns the ipx network corresponding to name. If name is unknown,
+ * 0 is returned and 'known' is set to TRUE. */
+guint32 get_ipxnet_addr(u_char *name, gboolean *known);
+
 /* adds a hostname/IP in the hash table */
 extern void add_host_name(u_int addr, u_char *name);
 
-/* Returns IP address for a string representing the hostname or dotted-decial IP address */
-unsigned long get_host_ipaddr(const char *host);
+/* Translates a string representing the hostname or dotted-decimal IP address
+ * into a numeric IP address value, returning TRUE if it succeeds and
+ * FALSE if it fails. */
+gboolean get_host_ipaddr(const char *host, guint32 *addrp);
+
+/*
+ * Translate IPv6 numeric address or FQDN hostname, into binary IPv6 address.
+ * Return TRUE if we succeed and set "*addrp" to that numeric IP address;
+ * return FALSE if we fail.
+ */
+gboolean get_host_ipaddr6(const char *host, struct e_in6_addr *addrp);
 
 #endif /* __RESOLV_H__ */