From 7c6c366150022d6a745dcf18ed67bd264bc9c55d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Apr 2005 11:17:08 +0000 Subject: r6223: added a bit more datagram infrastructure and the beginnings of a test suite. The NBT-DGRAM test does a UDP/138 netlogon request, to which a windows server sends a reply, but the windows server sends the reply to the wrong port (it always sends to 138), so the test suite doesn't see it. (This used to be commit a7634625dbc944dd8256a822be290010f341a571) --- source4/librpc/idl/nbt.idl | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'source4/librpc/idl/nbt.idl') diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index cd009530d1..09738820bb 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -200,16 +200,16 @@ interface nbt } dgram_msg_type; typedef [bitmap8bit] bitmap { - DGRAM_FLAG_MORE = 0x80, - DGRAM_FLAG_FIRST = 0x40, - DGRAM_FLAG_NODE_TYPE = 0x30 + DGRAM_FLAG_MORE = 0x01, + DGRAM_FLAG_FIRST = 0x02, + DGRAM_FLAG_NODE_TYPE = 0x0C } dgram_flags; typedef [enum8bit] enum { DGRAM_NODE_B = 0x00, - DGRAM_NODE_P = 0x10, - DGRAM_NODE_M = 0x20, - DGRAM_NODE_NBDD = 0x30 + DGRAM_NODE_P = 0x04, + DGRAM_NODE_M = 0x08, + DGRAM_NODE_NBDD = 0x0C } dgram_node_type; /* a dgram_message is the main dgram body in general use */ @@ -317,4 +317,30 @@ interface nbt uint16 src_port; [switch_is(msg_type)] dgram_data data; } nbt_dgram_packet; + + + /* \MAILSLOT\NET\NETLOGON mailslot requests */ + typedef [enum8bit] enum { + NETLOGON_QUERY_FOR_PDC = 0x7 + } nbt_netlogon_command; + + /* query for pdc request */ + typedef struct { + astring computer_name; + astring mailslot_name; + nstring unicode_name; + uint32 nt_version; + uint16 lmnt_token; + uint16 lm20_token; + } nbt_netlogon_query_for_pdc; + + typedef [nodiscriminant] union { + [case(NETLOGON_QUERY_FOR_PDC)] nbt_netlogon_query_for_pdc pdc; + } nbt_netlogon_request; + + typedef [flag(NDR_NOALIGN),public] struct { + nbt_netlogon_command command; + uint8 pad; + [switch_is(command)] nbt_netlogon_request req; + } nbt_netlogon_packet; } -- cgit