summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt/nbtname.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-05-28 08:11:05 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-05-28 08:11:05 +1000
commit51ae2302a68033b1b79a4ebc8d4cbab64adcf843 (patch)
treed8b1af54efe4ec70607ef2bcbd873c2cd667d894 /source4/libcli/nbt/nbtname.c
parent5d0d239d1ab826c91839a603f93d2c0061658888 (diff)
parent52b230141b5ad9f317f97e7d257703614bab3985 (diff)
downloadsamba-51ae2302a68033b1b79a4ebc8d4cbab64adcf843.tar.gz
samba-51ae2302a68033b1b79a4ebc8d4cbab64adcf843.tar.bz2
samba-51ae2302a68033b1b79a4ebc8d4cbab64adcf843.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
It seems the format of main.mk changed in my sleep... Conflicts: source/main.mk (This used to be commit 56f2288e4f4f1aa70d11fc5f118458baf5803627)
Diffstat (limited to 'source4/libcli/nbt/nbtname.c')
-rw-r--r--source4/libcli/nbt/nbtname.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c
index 0d9073ccbb..97ae2e9d72 100644
--- a/source4/libcli/nbt/nbtname.c
+++ b/source4/libcli/nbt/nbtname.c
@@ -626,3 +626,24 @@ _PUBLIC_ void ndr_print_wrepl_nbt_name(struct ndr_print *ndr, const char *name,
ndr_print_string(ndr, name, s);
talloc_free(s);
}
+
+_PUBLIC_ enum ndr_err_code ndr_push_nbt_res_rec(struct ndr_push *ndr, int ndr_flags, const struct nbt_res_rec *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->name));
+ NDR_CHECK(ndr_push_nbt_qtype(ndr, NDR_SCALARS, r->rr_type));
+ NDR_CHECK(ndr_push_nbt_qclass(ndr, NDR_SCALARS, r->rr_class));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ttl));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->rdata, ((((r->rr_type) == NBT_QTYPE_NETBIOS) && ((r->rdata).data.length == 2))?0:r->rr_type)));
+ NDR_CHECK(ndr_push_nbt_rdata(ndr, NDR_SCALARS, &r->rdata));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}