Adapt FreeBSD's inet_ntop implementation for internal use.

So we get consistent text representations of IPv6 addresses across
platforms.
This commit is contained in:
Jon Siwek 2012-03-19 11:26:31 -05:00
parent 159733f481
commit 667487cec9
7 changed files with 217 additions and 3 deletions

View file

@ -186,6 +186,7 @@
#include "LogMgr.h"
#include "Reporter.h"
#include "IPAddr.h"
#include "bro_inet_ntop.h"
extern "C" {
#include "setsignal.h"
@ -464,7 +465,7 @@ static inline const char* ip2a(uint32 ip)
addr.s_addr = htonl(ip);
return inet_ntop(AF_INET, &addr, buffer, 32);
return bro_inet_ntop(AF_INET, &addr, buffer, 32);
}
static pid_t child_pid = 0;