summaryrefslogtreecommitdiff
path: root/addrtoname.h
diff options
context:
space:
mode:
authortaesub kim <taesub.kim@samsung.com>2018-05-25 18:41:28 +0900
committertaesub kim <taesub.kim@samsung.com>2018-05-25 18:41:46 +0900
commit68b0938829a42f1f5dbb099d79df2cae08bf9d73 (patch)
treeb533139096485b4fca980ba934021dd08cc31434 /addrtoname.h
parentbbace1d4c8912a4a02cc0322e2cbed1901c62d96 (diff)
downloadtcpdump-68b0938829a42f1f5dbb099d79df2cae08bf9d73.tar.gz
tcpdump-68b0938829a42f1f5dbb099d79df2cae08bf9d73.tar.bz2
tcpdump-68b0938829a42f1f5dbb099d79df2cae08bf9d73.zip
Imported Upstream version 4.9.2upstream/4.9.2
Change-Id: I490892f19c71ba126fa4e1d3d78e730429a3b454
Diffstat (limited to 'addrtoname.h')
-rw-r--r--addrtoname.h52
1 files changed, 29 insertions, 23 deletions
diff --git a/addrtoname.h b/addrtoname.h
index cd5c41f..fe8b6bb 100644
--- a/addrtoname.h
+++ b/addrtoname.h
@@ -17,40 +17,46 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.20 2007-08-08 14:06:34 hannes Exp $ (LBL)
*/
+/*
+ * Definitions to let us compile most of the IPv6 code even on systems
+ * without IPv6 support.
+ */
+#ifndef INET6_ADDRSTRLEN
+#define INET6_ADDRSTRLEN 46
+#endif
+
/* Name to address translation routines. */
enum {
LINKADDR_ETHER,
LINKADDR_FRELAY,
LINKADDR_IEEE1394,
- LINKADDR_ATM
+ LINKADDR_ATM,
+ LINKADDR_OTHER
};
#define BUFSIZE 128
-extern const char *linkaddr_string(const u_char *, const unsigned int, const unsigned int);
-extern const char *etheraddr_string(const u_char *);
-extern const char *le64addr_string(const u_char *);
-extern const char *etherproto_string(u_short);
-extern const char *tcpport_string(u_short);
-extern const char *udpport_string(u_short);
-extern const char *getname(const u_char *);
-#ifdef INET6
-extern const char *getname6(const u_char *);
-#endif
-extern const char *intoa(u_int32_t);
+extern const char *linkaddr_string(netdissect_options *, const u_char *, const unsigned int, const unsigned int);
+extern const char *etheraddr_string(netdissect_options *, const u_char *);
+extern const char *le64addr_string(netdissect_options *, const u_char *);
+extern const char *etherproto_string(netdissect_options *, u_short);
+extern const char *tcpport_string(netdissect_options *, u_short);
+extern const char *udpport_string(netdissect_options *, u_short);
+extern const char *isonsap_string(netdissect_options *, const u_char *, register u_int);
+extern const char *dnaddr_string(netdissect_options *, u_short);
+extern const char *protoid_string(netdissect_options *, const u_char *);
+extern const char *ipxsap_string(netdissect_options *, u_short);
+extern const char *getname(netdissect_options *, const u_char *);
+extern const char *getname6(netdissect_options *, const u_char *);
+extern const char *intoa(uint32_t);
-extern void init_addrtoname(u_int32_t, u_int32_t);
-extern struct hnamemem *newhnamemem(void);
-#ifdef INET6
-extern struct h6namemem *newh6namemem(void);
-#endif
+extern void init_addrtoname(netdissect_options *, uint32_t, uint32_t);
+extern struct hnamemem *newhnamemem(netdissect_options *);
+extern struct h6namemem *newh6namemem(netdissect_options *);
+extern const char * ieee8021q_tci_string(const uint16_t);
-#define ipaddr_string(p) getname((const u_char *)(p))
-#ifdef INET6
-#define ip6addr_string(p) getname6((const u_char *)(p))
-#endif
+#define ipaddr_string(ndo, p) getname(ndo, (const u_char *)(p))
+#define ip6addr_string(ndo, p) getname6(ndo, (const u_char *)(p))