diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-13 15:01:28 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-13 15:01:28 +0200 |
commit | e779345bca36c2dfd11dea773e4b8aa68e4a3863 (patch) | |
tree | a0b006d2c8a31884807394bd9d385a0e2ae6b52d /source3/librpc/ndr/ndr_misc.c | |
parent | de0aa7850c57aadef72659651e8de33d644706fa (diff) | |
download | samba-e779345bca36c2dfd11dea773e4b8aa68e4a3863.tar.gz samba-e779345bca36c2dfd11dea773e4b8aa68e4a3863.tar.bz2 samba-e779345bca36c2dfd11dea773e4b8aa68e4a3863.zip |
Import changes from upstream libndr.
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)); } |