diff options
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/config.mk | 2 | ||||
-rw-r--r-- | source4/librpc/idl/misc.idl | 4 | ||||
-rw-r--r-- | source4/librpc/idl/nbt.idl | 2 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_misc.c | 10 |
4 files changed, 16 insertions, 2 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index 75582c2adc..3f0dea9ce1 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -291,7 +291,7 @@ REQUIRED_SUBSYSTEMS = LIBNDR INIT_OBJ_FILES = librpc/gen_ndr/ndr_nbt.o INIT_FUNCTION = dcerpc_nbt_init NOPROTO = YES -REQUIRED_SUBSYSTEMS = LIBNDR +REQUIRED_SUBSYSTEMS = LIBNDR NDR_MISC [SUBSYSTEM::NDR_ALL] diff --git a/source4/librpc/idl/misc.idl b/source4/librpc/idl/misc.idl index 13306b6876..4b69d1089b 100644 --- a/source4/librpc/idl/misc.idl +++ b/source4/librpc/idl/misc.idl @@ -6,6 +6,10 @@ interface misc { + typedef [public,noprint] struct { + uint32 addr; + } ipv4_addr; + typedef [public,noprint,gensize] struct { uint32 time_low; uint16 time_mid; diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index caca7fa336..9dc42fccba 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -102,7 +102,7 @@ interface nbt typedef struct { nb_flags nb_flags; - uint32 ipaddr; + ipv4_addr ipaddr; } nbt_rdata_address; typedef struct { 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 |