diff options
Diffstat (limited to 'source3/librpc/ndr/ndr_misc.c')
-rw-r--r-- | source3/librpc/ndr/ndr_misc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/librpc/ndr/ndr_misc.c b/source3/librpc/ndr/ndr_misc.c index 02bd9a67a4..1e04f04d40 100644 --- a/source3/librpc/ndr/ndr_misc.c +++ b/source3/librpc/ndr/ndr_misc.c @@ -23,8 +23,19 @@ */ #include "includes.h" +#include "system/network.h" +#include "librpc/ndr/libndr.h" -void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid) +_PUBLIC_ void ndr_print_in_addr(struct ndr_print *ndr, const char *name, const struct in_addr *_ip) +{ + struct in_addr ip; + + ip.s_addr = htonl(_ip->s_addr); + + ndr->print(ndr, "%-25s: %s", name, inet_ntoa(ip)); +} + +_PUBLIC_ void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid) { ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid)); } |