From b722dc74f86038eeaf3de875b5ca2cf2dadfe7a7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 21 Dec 2023 15:03:05 +0100 Subject: [PATCH] s3:rpcd_witness.idl: add rpcd_witness_registration_updateB message definitions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This will be used for rpcd_witness_registration_updateB messages in 'net witness [client-move,...]' commands later. Signed-off-by: Stefan Metzmacher Reviewed-by: Günther Deschner --- source3/librpc/idl/rpcd_witness.idl | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/source3/librpc/idl/rpcd_witness.idl b/source3/librpc/idl/rpcd_witness.idl index a2af152e596..80852d25e81 100644 --- a/source3/librpc/idl/rpcd_witness.idl +++ b/source3/librpc/idl/rpcd_witness.idl @@ -38,4 +38,72 @@ interface rpcd_witness void rpcd_witness_registration_decode( [in] rpcd_witness_registration reg ); + + typedef [enum16bit] enum { + RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE = 0x0001, + RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4 = 0x0002, + RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6 = 0x0003, + RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE = 0x0004, + RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4 = 0x0005, + RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6 = 0x0006, + RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER = 0x0007, + RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE = 0x0008 + } rpcd_witness_registration_update_type; + + typedef struct { + uint32 new_node; + } rpcd_witness_registration_update_move_to_node; + + typedef struct { + [flag(NDR_BIG_ENDIAN)] ipv4address new_ipv4; + } rpcd_witness_registration_update_move_to_ipv4; + + typedef struct { + [flag(NDR_BIG_ENDIAN)] ipv6address new_ipv6; + } rpcd_witness_registration_update_move_to_ipv6; + + typedef struct { + witness_notifyResponse *response; + WERROR result; + } rpcd_witness_registration_update_force_response; + + typedef [switch_type(rpcd_witness_registration_update_type)] union { + [case(RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE)] + rpcd_witness_registration_update_move_to_node client_move_to_node; + + [case(RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4)] + rpcd_witness_registration_update_move_to_ipv4 client_move_to_ipv4; + + [case(RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6)] + rpcd_witness_registration_update_move_to_ipv6 client_move_to_ipv6; + + [case(RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE)] + rpcd_witness_registration_update_move_to_node share_move_to_node; + + [case(RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4)] + rpcd_witness_registration_update_move_to_ipv4 share_move_to_ipv4; + + [case(RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6)] + rpcd_witness_registration_update_move_to_ipv6 share_move_to_ipv6; + + [case(RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER)]; + /* empty */ + + [case(RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE)] + rpcd_witness_registration_update_force_response force_response; + } rpcd_witness_registration_updateU; + + /* + * This is the content of + * MSG_RPCD_WITNESS_REGISTRATION_UPDATE messages + */ + typedef [public] struct { + policy_handle context_handle; + rpcd_witness_registration_update_type type; + [switch_is(type)] rpcd_witness_registration_updateU update; + } rpcd_witness_registration_updateB; + + void rpcd_witness_registration_update_decode( + [in] rpcd_witness_registration_updateB update + ); } -- 2.11.4.GIT