summaryrefslogtreecommitdiff
path: root/addrtoname.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-01-31 00:43:45 -0800
committerGuy Harris <guy@alum.mit.edu>2018-01-31 00:43:45 -0800
commit0dad1934af3db3f97d4371463089c8725dbfa26d (patch)
treeeaedbdb157d6aae6e44ade1830a6144b08a1eaaf /addrtoname.c
parent44c822e9f671b7a9b2e52b781cdbf38933cbdeaf (diff)
downloadtcpdump-0dad1934af3db3f97d4371463089c8725dbfa26d.tar.gz
Have ip{6}addr_string take a u_char * as the second argument.
Fix warnings that introduces.
Diffstat (limited to 'addrtoname.c')
-rw-r--r--addrtoname.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/addrtoname.c b/addrtoname.c
index effc0914..f488dde0 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -283,7 +283,7 @@ extern cap_channel_t *capdns;
* also needs to check whether they're present in the packet buffer.
*/
const char *
-getname(netdissect_options *ndo, const u_char *ap)
+ipaddr_string(netdissect_options *ndo, const u_char *ap)
{
struct hostent *hp;
uint32_t addr;
@@ -320,7 +320,7 @@ getname(netdissect_options *ndo, const u_char *ap)
p->name = strdup(hp->h_name);
if (p->name == NULL)
(*ndo->ndo_error)(ndo,
- "getname: strdup(hp->h_name)");
+ "ipaddr_string: strdup(hp->h_name)");
if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
@@ -332,7 +332,7 @@ getname(netdissect_options *ndo, const u_char *ap)
}
p->name = strdup(intoa(addr));
if (p->name == NULL)
- (*ndo->ndo_error)(ndo, "getname: strdup(intoa(addr))");
+ (*ndo->ndo_error)(ndo, "ipaddr_string: strdup(intoa(addr))");
return (p->name);
}
@@ -341,7 +341,7 @@ getname(netdissect_options *ndo, const u_char *ap)
* is assumed to be in network byte order.
*/
const char *
-getname6(netdissect_options *ndo, const u_char *ap)
+ip6addr_string(netdissect_options *ndo, const u_char *ap)
{
struct hostent *hp;
union {
@@ -382,7 +382,7 @@ getname6(netdissect_options *ndo, const u_char *ap)
p->name = strdup(hp->h_name);
if (p->name == NULL)
(*ndo->ndo_error)(ndo,
- "getname6: strdup(hp->h_name)");
+ "ip6addr_string: strdup(hp->h_name)");
if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
@@ -395,7 +395,7 @@ getname6(netdissect_options *ndo, const u_char *ap)
cp = addrtostr6(ap, ntop_buf, sizeof(ntop_buf));
p->name = strdup(cp);
if (p->name == NULL)
- (*ndo->ndo_error)(ndo, "getname6: strdup(cp)");
+ (*ndo->ndo_error)(ndo, "ip6addr_string: strdup(cp)");
return (p->name);
}