From ca3f70256ac0430e2db846d0293a7750a6d3ef6b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 31 Jan 2005 17:16:45 +0000 Subject: r5145: define struct ipv4_addr in misc.idl, so we can use it in nbt.idl and get a nicer debug output metze (This used to be commit abacbc9192646f6f3c720758ab65889b82b9ae7b) --- source4/librpc/ndr/ndr_misc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/librpc/ndr') diff --git a/source4/librpc/ndr/ndr_misc.c b/source4/librpc/ndr/ndr_misc.c index a538dd3033..b9edc0ae9c 100644 --- a/source4/librpc/ndr/ndr_misc.c +++ b/source4/librpc/ndr/ndr_misc.c @@ -24,6 +24,16 @@ */ #include "includes.h" +#include "system/network.h" + +void ndr_print_ipv4_addr(struct ndr_print *ndr, const char *name, const struct ipv4_addr *_ip) +{ + struct ipv4_addr ip; + + ip.addr = htonl(_ip->addr); + + ndr->print(ndr, "%-25s: %s", name, sys_inet_ntoa(ip)); +} /* build a GUID from a string -- cgit