From f83e6ded9d31f819dba5e59e15c703d292716206 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 8 Apr 2005 05:34:13 +0000 Subject: r6245: receive and parse the GETDC response in the NBT-DGRAM test. The test now tries to bind to port 138 if possible, so if you run it as root and smbd/nmbd is not running then it works against windows servers (This used to be commit 52ccdb79bc922be52c24dd393323dbbee83a2aea) --- source4/libcli/dgram/netlogon.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source4/libcli/dgram/netlogon.c') diff --git a/source4/libcli/dgram/netlogon.c b/source4/libcli/dgram/netlogon.c index 1f3a3d6c62..c76264eea4 100644 --- a/source4/libcli/dgram/netlogon.c +++ b/source4/libcli/dgram/netlogon.c @@ -56,3 +56,19 @@ NTSTATUS dgram_mailslot_netlogon_send(struct nbt_dgram_socket *dgmsock, return status; } + +/* + parse a netlogon response. The packet must be a valid mailslot packet +*/ +NTSTATUS dgram_mailslot_netlogon_parse(struct dgram_mailslot_handler *dgmslot, + TALLOC_CTX *mem_ctx, + struct nbt_dgram_packet *dgram, + struct nbt_netlogon_packet *netlogon) +{ + DATA_BLOB *data = &dgram->data.msg.body.smb.body.trans.data; + NTSTATUS status; + + status = ndr_pull_struct_blob(data, mem_ctx, netlogon, + (ndr_pull_flags_fn_t)ndr_pull_nbt_netlogon_packet); + return status; +} -- cgit