aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-initshutdown.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-21 19:41:54 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-21 19:41:54 +0000
commit87e55cb9e046e4d7749333c67862e5bf935ed6a1 (patch)
treee984e35b5eed1a6a0eaea7ea19189c1ad72c17e6 /epan/dissectors/packet-dcerpc-initshutdown.c
parent15294a1261961d7ac2ad4316eb83b0e413effc47 (diff)
Sync with latest SAMBA PIDL source per http://www.wireshark.org/lists/wireshark-dev/201310/msg00217.html
Didn't integrate 0010-frsrpc-Regenerate-frsrpc-due-to-changes-in-the-pidl-.patch 0016-Regenerate-the-dnserver.patch due to compilation errors on Windows. svn path=/trunk/; revision=52744
Diffstat (limited to 'epan/dissectors/packet-dcerpc-initshutdown.c')
-rw-r--r--epan/dissectors/packet-dcerpc-initshutdown.c339
1 files changed, 188 insertions, 151 deletions
diff --git a/epan/dissectors/packet-dcerpc-initshutdown.c b/epan/dissectors/packet-dcerpc-initshutdown.c
index 4551fb2a26..1606a30504 100644
--- a/epan/dissectors/packet-dcerpc-initshutdown.c
+++ b/epan/dissectors/packet-dcerpc-initshutdown.c
@@ -12,7 +12,6 @@
#include "config.h"
-
#ifdef _MSC_VER
#pragma warning(disable:4005)
#pragma warning(disable:4013)
@@ -31,30 +30,26 @@
/* Ett declarations */
static gint ett_dcerpc_initshutdown = -1;
-static gint ett_initshutdown_initshutdown_String_sub = -1;
-static gint ett_initshutdown_initshutdown_String = -1;
+static gint ett_initshutdown_initshutdown_ReasonFlags = -1;
/* Header field declarations */
-static gint hf_initshutdown_initshutdown_String_name_len = -1;
+static gint hf_initshutdown_initshutdown_InitEx_do_reboot = -1;
+static gint hf_initshutdown_initshutdown_InitEx_force_apps = -1;
+static gint hf_initshutdown_initshutdown_ReasonFlags_SHTDN_REASON_FLAG_PLANNED = -1;
+static gint hf_initshutdown_initshutdown_ReasonFlags_SHTDN_REASON_FLAG_USER_DEFINED = -1;
+static gint hf_initshutdown_initshutdown_InitEx_timeout = -1;
+static gint hf_initshutdown_initshutdown_InitEx_hostname = -1;
+static gint hf_initshutdown_werror = -1;
static gint hf_initshutdown_initshutdown_Abort_server = -1;
-static gint hf_initshutdown_initshutdown_Init_message = -1;
+static gint hf_initshutdown_opnum = -1;
static gint hf_initshutdown_initshutdown_Init_hostname = -1;
-static gint hf_initshutdown_initshutdown_InitEx_reboot = -1;
static gint hf_initshutdown_initshutdown_InitEx_reason = -1;
-static gint hf_initshutdown_initshutdown_String_name_size = -1;
static gint hf_initshutdown_initshutdown_Init_timeout = -1;
-static gint hf_initshutdown_initshutdown_InitEx_hostname = -1;
-static gint hf_initshutdown_initshutdown_InitEx_message = -1;
-static gint hf_initshutdown_initshutdown_String_name = -1;
-static gint hf_initshutdown_initshutdown_Init_reboot = -1;
-static gint hf_initshutdown_opnum = -1;
static gint hf_initshutdown_initshutdown_Init_force_apps = -1;
-static gint hf_initshutdown_initshutdown_String_sub_name = -1;
-static gint hf_initshutdown_werror = -1;
-static gint hf_initshutdown_initshutdown_String_sub_name_size = -1;
-static gint hf_initshutdown_initshutdown_InitEx_force_apps = -1;
-static gint hf_initshutdown_initshutdown_InitEx_timeout = -1;
+static gint hf_initshutdown_initshutdown_Init_do_reboot = -1;
+static gint hf_initshutdown_initshutdown_Init_message = -1;
+static gint hf_initshutdown_initshutdown_InitEx_message = -1;
static gint proto_dcerpc_initshutdown = -1;
/* Version information */
@@ -66,19 +61,62 @@ static e_uuid_t uuid_dcerpc_initshutdown = {
};
static guint16 ver_dcerpc_initshutdown = 1;
-static int initshutdown_dissect_element_String_sub_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-static int initshutdown_dissect_element_String_sub_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-static int initshutdown_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-static int initshutdown_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-static int initshutdown_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-static int initshutdown_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
+const value_string initshutdown_initshutdown_ReasonMajor_vals[] = {
+ { SHTDN_REASON_MAJOR_OTHER, "SHTDN_REASON_MAJOR_OTHER" },
+ { SHTDN_REASON_MAJOR_HARDWARE, "SHTDN_REASON_MAJOR_HARDWARE" },
+ { SHTDN_REASON_MAJOR_OPERATINGSYSTEM, "SHTDN_REASON_MAJOR_OPERATINGSYSTEM" },
+ { SHTDN_REASON_MAJOR_SOFTWARE, "SHTDN_REASON_MAJOR_SOFTWARE" },
+ { SHTDN_REASON_MAJOR_APPLICATION, "SHTDN_REASON_MAJOR_APPLICATION" },
+ { SHTDN_REASON_MAJOR_SYSTEM, "SHTDN_REASON_MAJOR_SYSTEM" },
+ { SHTDN_REASON_MAJOR_POWER, "SHTDN_REASON_MAJOR_POWER" },
+ { SHTDN_REASON_MAJOR_LEGACY_API, "SHTDN_REASON_MAJOR_LEGACY_API" },
+{ 0, NULL }
+};
+const value_string initshutdown_initshutdown_ReasonMinor_vals[] = {
+ { SHTDN_REASON_MINOR_OTHER, "SHTDN_REASON_MINOR_OTHER" },
+ { SHTDN_REASON_MINOR_MAINTENANCE, "SHTDN_REASON_MINOR_MAINTENANCE" },
+ { SHTDN_REASON_MINOR_INSTALLATION, "SHTDN_REASON_MINOR_INSTALLATION" },
+ { SHTDN_REASON_MINOR_UPGRADE, "SHTDN_REASON_MINOR_UPGRADE" },
+ { SHTDN_REASON_MINOR_RECONFIG, "SHTDN_REASON_MINOR_RECONFIG" },
+ { SHTDN_REASON_MINOR_HUNG, "SHTDN_REASON_MINOR_HUNG" },
+ { SHTDN_REASON_MINOR_UNSTABLE, "SHTDN_REASON_MINOR_UNSTABLE" },
+ { SHTDN_REASON_MINOR_DISK, "SHTDN_REASON_MINOR_DISK" },
+ { SHTDN_REASON_MINOR_PROCESSOR, "SHTDN_REASON_MINOR_PROCESSOR" },
+ { SHTDN_REASON_MINOR_NETWORKCARD, "SHTDN_REASON_MINOR_NETWORKCARD" },
+ { SHTDN_REASON_MINOR_POWER_SUPPLY, "SHTDN_REASON_MINOR_POWER_SUPPLY" },
+ { SHTDN_REASON_MINOR_CORDUNPLUGGED, "SHTDN_REASON_MINOR_CORDUNPLUGGED" },
+ { SHTDN_REASON_MINOR_ENVIRONMENT, "SHTDN_REASON_MINOR_ENVIRONMENT" },
+ { SHTDN_REASON_MINOR_HARDWARE_DRIVER, "SHTDN_REASON_MINOR_HARDWARE_DRIVER" },
+ { SHTDN_REASON_MINOR_OTHERDRIVER, "SHTDN_REASON_MINOR_OTHERDRIVER" },
+ { SHTDN_REASON_MINOR_BLUESCREEN, "SHTDN_REASON_MINOR_BLUESCREEN" },
+ { SHTDN_REASON_MINOR_SERVICEPACK, "SHTDN_REASON_MINOR_SERVICEPACK" },
+ { SHTDN_REASON_MINOR_HOTFIX, "SHTDN_REASON_MINOR_HOTFIX" },
+ { SHTDN_REASON_MINOR_SECURITYFIX, "SHTDN_REASON_MINOR_SECURITYFIX" },
+ { SHTDN_REASON_MINOR_SECURITY, "SHTDN_REASON_MINOR_SECURITY" },
+ { SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY, "SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY" },
+ { SHTDN_REASON_MINOR_WMI, "SHTDN_REASON_MINOR_WMI" },
+ { SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL, "SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL" },
+ { SHTDN_REASON_MINOR_HOTFIX_UNINSTALL, "SHTDN_REASON_MINOR_HOTFIX_UNINSTALL" },
+ { SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL, "SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL" },
+ { SHTDN_REASON_MINOR_MMC, "SHTDN_REASON_MINOR_MMC" },
+ { SHTDN_REASON_MINOR_TERMSRV, "SHTDN_REASON_MINOR_TERMSRV" },
+{ 0, NULL }
+};
+static const true_false_string initshutdown_ReasonFlags_SHTDN_REASON_FLAG_USER_DEFINED_tfs = {
+ "SHTDN_REASON_FLAG_USER_DEFINED is SET",
+ "SHTDN_REASON_FLAG_USER_DEFINED is NOT SET",
+};
+static const true_false_string initshutdown_ReasonFlags_SHTDN_REASON_FLAG_PLANNED_tfs = {
+ "SHTDN_REASON_FLAG_PLANNED is SET",
+ "SHTDN_REASON_FLAG_PLANNED is NOT SET",
+};
static int initshutdown_dissect_element_Init_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_Init_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_Init_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_Init_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_Init_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_Init_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-static int initshutdown_dissect_element_Init_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
+static int initshutdown_dissect_element_Init_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_Abort_server(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_Abort_server_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_InitEx_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
@@ -87,119 +125,125 @@ static int initshutdown_dissect_element_InitEx_message(tvbuff_t *tvb _U_, int of
static int initshutdown_dissect_element_InitEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_InitEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_InitEx_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-static int initshutdown_dissect_element_InitEx_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
+static int initshutdown_dissect_element_InitEx_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
static int initshutdown_dissect_element_InitEx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
-/* IDL: struct { */
-/* IDL: [value(strlen_m_term(name))] uint32 name_size; */
-/* IDL: [flag(LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM)] string name; */
+/* IDL: enum { */
+/* IDL: SHTDN_REASON_MAJOR_OTHER=0x00000000, */
+/* IDL: SHTDN_REASON_MAJOR_HARDWARE=0x00010000, */
+/* IDL: SHTDN_REASON_MAJOR_OPERATINGSYSTEM=0x00020000, */
+/* IDL: SHTDN_REASON_MAJOR_SOFTWARE=0x00030000, */
+/* IDL: SHTDN_REASON_MAJOR_APPLICATION=0x00040000, */
+/* IDL: SHTDN_REASON_MAJOR_SYSTEM=0x00050000, */
+/* IDL: SHTDN_REASON_MAJOR_POWER=0x00060000, */
+/* IDL: SHTDN_REASON_MAJOR_LEGACY_API=0x00070000, */
/* IDL: } */
-static int
-initshutdown_dissect_element_String_sub_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
-{
- offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_String_sub_name_size, 0);
-
- return offset;
-}
-
-static int
-initshutdown_dissect_element_String_sub_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
-{
-
- return offset;
-}
-
int
-initshutdown_dissect_struct_String_sub(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
+initshutdown_dissect_enum_ReasonMajor(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
{
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- int old_offset;
-
- ALIGN_TO_4_BYTES;
-
- old_offset = offset;
-
- if (parent_tree) {
- item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
- tree = proto_item_add_subtree(item, ett_initshutdown_initshutdown_String_sub);
+ guint32 parameter=0;
+ if(param){
+ parameter=(guint32)*param;
+ }
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
+ if(param){
+ *param=(guint32)parameter;
}
-
- offset = initshutdown_dissect_element_String_sub_name_size(tvb, offset, pinfo, tree, drep);
-
- offset = initshutdown_dissect_element_String_sub_name(tvb, offset, pinfo, tree, drep);
-
-
- proto_item_set_len(item, offset-old_offset);
-
return offset;
}
-/* IDL: struct { */
-/* IDL: [value(strlen_m(name->name)*2)] uint16 name_len; */
-/* IDL: [value(strlen_m_term(name->name)*2)] uint16 name_size; */
-/* IDL: [unique(1)] initshutdown_String_sub *name; */
+/* IDL: enum { */
+/* IDL: SHTDN_REASON_MINOR_OTHER=0x00000000, */
+/* IDL: SHTDN_REASON_MINOR_MAINTENANCE=0x00000001, */
+/* IDL: SHTDN_REASON_MINOR_INSTALLATION=0x00000002, */
+/* IDL: SHTDN_REASON_MINOR_UPGRADE=0x00000003, */
+/* IDL: SHTDN_REASON_MINOR_RECONFIG=0x00000004, */
+/* IDL: SHTDN_REASON_MINOR_HUNG=0x00000005, */
+/* IDL: SHTDN_REASON_MINOR_UNSTABLE=0x00000006, */
+/* IDL: SHTDN_REASON_MINOR_DISK=0x00000007, */
+/* IDL: SHTDN_REASON_MINOR_PROCESSOR=0x00000008, */
+/* IDL: SHTDN_REASON_MINOR_NETWORKCARD=0x00000009, */
+/* IDL: SHTDN_REASON_MINOR_POWER_SUPPLY=0x0000000a, */
+/* IDL: SHTDN_REASON_MINOR_CORDUNPLUGGED=0x0000000b, */
+/* IDL: SHTDN_REASON_MINOR_ENVIRONMENT=0x0000000c, */
+/* IDL: SHTDN_REASON_MINOR_HARDWARE_DRIVER=0x0000000d, */
+/* IDL: SHTDN_REASON_MINOR_OTHERDRIVER=0x0000000e, */
+/* IDL: SHTDN_REASON_MINOR_BLUESCREEN=0x0000000f, */
+/* IDL: SHTDN_REASON_MINOR_SERVICEPACK=0x00000010, */
+/* IDL: SHTDN_REASON_MINOR_HOTFIX=0x00000011, */
+/* IDL: SHTDN_REASON_MINOR_SECURITYFIX=0x00000012, */
+/* IDL: SHTDN_REASON_MINOR_SECURITY=0x00000013, */
+/* IDL: SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY=0x00000014, */
+/* IDL: SHTDN_REASON_MINOR_WMI=0x00000015, */
+/* IDL: SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL=0x00000016, */
+/* IDL: SHTDN_REASON_MINOR_HOTFIX_UNINSTALL=0x00000017, */
+/* IDL: SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL=0x00000018, */
+/* IDL: SHTDN_REASON_MINOR_MMC=0x00000019, */
+/* IDL: SHTDN_REASON_MINOR_TERMSRV=0x00000020, */
/* IDL: } */
-static int
-initshutdown_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
-{
- offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_String_name_len, 0);
-
- return offset;
-}
-
-static int
-initshutdown_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
-{
- offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_String_name_size, 0);
-
- return offset;
-}
-
-static int
-initshutdown_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
+int
+initshutdown_dissect_enum_ReasonMinor(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
{
- offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, initshutdown_dissect_element_String_name_, NDR_POINTER_UNIQUE, "Pointer to Name (initshutdown_String_sub)",hf_initshutdown_initshutdown_String_name);
-
+ guint32 parameter=0;
+ if(param){
+ parameter=(guint32)*param;
+ }
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
+ if(param){
+ *param=(guint32)parameter;
+ }
return offset;
}
-static int
-initshutdown_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
-{
- offset = initshutdown_dissect_struct_String_sub(tvb,offset,pinfo,tree,drep,hf_initshutdown_initshutdown_String_name,0);
- return offset;
-}
+/* IDL: bitmap { */
+/* IDL: SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000 , */
+/* IDL: SHTDN_REASON_FLAG_PLANNED = 0x80000000 , */
+/* IDL: } */
int
-initshutdown_dissect_struct_String(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
+initshutdown_dissect_bitmap_ReasonFlags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
proto_item *item = NULL;
proto_tree *tree = NULL;
- int old_offset;
+ guint32 flags;
ALIGN_TO_4_BYTES;
- old_offset = offset;
-
if (parent_tree) {
- item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
- tree = proto_item_add_subtree(item, ett_initshutdown_initshutdown_String);
+ item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 4, DREP_ENC_INTEGER(drep));
+ tree = proto_item_add_subtree(item,ett_initshutdown_initshutdown_ReasonFlags);
}
-
- offset = initshutdown_dissect_element_String_name_len(tvb, offset, pinfo, tree, drep);
- offset = initshutdown_dissect_element_String_name_size(tvb, offset, pinfo, tree, drep);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep, -1, &flags);
+ proto_item_append_text(item, ": ");
+
+ if (!flags)
+ proto_item_append_text(item, "(No values set)");
- offset = initshutdown_dissect_element_String_name(tvb, offset, pinfo, tree, drep);
+ proto_tree_add_boolean(tree, hf_initshutdown_initshutdown_ReasonFlags_SHTDN_REASON_FLAG_USER_DEFINED, tvb, offset-4, 4, flags);
+ if (flags&( 0x40000000 )){
+ proto_item_append_text(item, "SHTDN_REASON_FLAG_USER_DEFINED");
+ if (flags & (~( 0x40000000 )))
+ proto_item_append_text(item, ", ");
+ }
+ flags&=(~( 0x40000000 ));
+ proto_tree_add_boolean(tree, hf_initshutdown_initshutdown_ReasonFlags_SHTDN_REASON_FLAG_PLANNED, tvb, offset-4, 4, flags);
+ if (flags&( 0x80000000 )){
+ proto_item_append_text(item, "SHTDN_REASON_FLAG_PLANNED");
+ if (flags & (~( 0x80000000 )))
+ proto_item_append_text(item, ", ");
+ }
+ flags&=(~( 0x80000000 ));
- proto_item_set_len(item, offset-old_offset);
+ if (flags) {
+ proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
+ }
return offset;
}
@@ -223,7 +267,7 @@ initshutdown_dissect_element_Init_hostname_(tvbuff_t *tvb _U_, int offset _U_, p
static int
initshutdown_dissect_element_Init_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
{
- offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, initshutdown_dissect_element_Init_message_, NDR_POINTER_UNIQUE, "Pointer to Message (initshutdown_String)",hf_initshutdown_initshutdown_Init_message);
+ offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, initshutdown_dissect_element_Init_message_, NDR_POINTER_UNIQUE, "Pointer to Message (lsa_StringLarge)",hf_initshutdown_initshutdown_Init_message);
return offset;
}
@@ -231,7 +275,7 @@ initshutdown_dissect_element_Init_message(tvbuff_t *tvb _U_, int offset _U_, pac
static int
initshutdown_dissect_element_Init_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
{
- offset = initshutdown_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_initshutdown_initshutdown_Init_message,0);
+ offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_Init_message, 0);
return offset;
}
@@ -253,19 +297,19 @@ initshutdown_dissect_element_Init_force_apps(tvbuff_t *tvb _U_, int offset _U_,
}
static int
-initshutdown_dissect_element_Init_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
+initshutdown_dissect_element_Init_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
{
- offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_Init_reboot, 0);
+ offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_Init_do_reboot, 0);
return offset;
}
/* IDL: WERROR initshutdown_Init( */
-/* IDL: [in] [unique(1)] uint16 *hostname, */
-/* IDL: [in] [unique(1)] initshutdown_String *message, */
+/* IDL: [unique(1)] [in] uint16 *hostname, */
+/* IDL: [unique(1)] [in] lsa_StringLarge *message, */
/* IDL: [in] uint32 timeout, */
/* IDL: [in] uint8 force_apps, */
-/* IDL: [in] uint8 reboot */
+/* IDL: [in] uint8 do_reboot */
/* IDL: ); */
static int
@@ -294,7 +338,7 @@ initshutdown_dissect_Init_request(tvbuff_t *tvb _U_, int offset _U_, packet_info
offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
offset = initshutdown_dissect_element_Init_force_apps(tvb, offset, pinfo, tree, drep);
offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
- offset = initshutdown_dissect_element_Init_reboot(tvb, offset, pinfo, tree, drep);
+ offset = initshutdown_dissect_element_Init_do_reboot(tvb, offset, pinfo, tree, drep);
offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
return offset;
}
@@ -316,7 +360,7 @@ initshutdown_dissect_element_Abort_server_(tvbuff_t *tvb _U_, int offset _U_, pa
}
/* IDL: WERROR initshutdown_Abort( */
-/* IDL: [in] [unique(1)] uint16 *server */
+/* IDL: [unique(1)] [in] uint16 *server */
/* IDL: ); */
static int
@@ -361,7 +405,7 @@ initshutdown_dissect_element_InitEx_hostname_(tvbuff_t *tvb _U_, int offset _U_,
static int
initshutdown_dissect_element_InitEx_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
{
- offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, initshutdown_dissect_element_InitEx_message_, NDR_POINTER_UNIQUE, "Pointer to Message (initshutdown_String)",hf_initshutdown_initshutdown_InitEx_message);
+ offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, initshutdown_dissect_element_InitEx_message_, NDR_POINTER_UNIQUE, "Pointer to Message (lsa_StringLarge)",hf_initshutdown_initshutdown_InitEx_message);
return offset;
}
@@ -369,7 +413,7 @@ initshutdown_dissect_element_InitEx_message(tvbuff_t *tvb _U_, int offset _U_, p
static int
initshutdown_dissect_element_InitEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
{
- offset = initshutdown_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_initshutdown_initshutdown_InitEx_message,0);
+ offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_InitEx_message, 0);
return offset;
}
@@ -391,9 +435,9 @@ initshutdown_dissect_element_InitEx_force_apps(tvbuff_t *tvb _U_, int offset _U_
}
static int
-initshutdown_dissect_element_InitEx_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
+initshutdown_dissect_element_InitEx_do_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
{
- offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_InitEx_reboot, 0);
+ offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_initshutdown_initshutdown_InitEx_do_reboot, 0);
return offset;
}
@@ -407,11 +451,11 @@ initshutdown_dissect_element_InitEx_reason(tvbuff_t *tvb _U_, int offset _U_, pa
}
/* IDL: WERROR initshutdown_InitEx( */
-/* IDL: [in] [unique(1)] uint16 *hostname, */
-/* IDL: [in] [unique(1)] initshutdown_String *message, */
+/* IDL: [unique(1)] [in] uint16 *hostname, */
+/* IDL: [unique(1)] [in] lsa_StringLarge *message, */
/* IDL: [in] uint32 timeout, */
/* IDL: [in] uint8 force_apps, */
-/* IDL: [in] uint8 reboot, */
+/* IDL: [in] uint8 do_reboot, */
/* IDL: [in] uint32 reason */
/* IDL: ); */
@@ -441,7 +485,7 @@ initshutdown_dissect_InitEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_in
offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
offset = initshutdown_dissect_element_InitEx_force_apps(tvb, offset, pinfo, tree, drep);
offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
- offset = initshutdown_dissect_element_InitEx_reboot(tvb, offset, pinfo, tree, drep);
+ offset = initshutdown_dissect_element_InitEx_do_reboot(tvb, offset, pinfo, tree, drep);
offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
offset = initshutdown_dissect_element_InitEx_reason(tvb, offset, pinfo, tree, drep);
offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
@@ -462,51 +506,44 @@ static dcerpc_sub_dissector initshutdown_dissectors[] = {
void proto_register_dcerpc_initshutdown(void)
{
static hf_register_info hf[] = {
- { &hf_initshutdown_initshutdown_String_name_len,
- { "Name Len", "initshutdown.initshutdown_String.name_len", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_InitEx_do_reboot,
+ { "Do Reboot", "initshutdown.initshutdown_InitEx.do_reboot", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_InitEx_force_apps,
+ { "Force Apps", "initshutdown.initshutdown_InitEx.force_apps", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_ReasonFlags_SHTDN_REASON_FLAG_PLANNED,
+ { "Shtdn Reason Flag Planned", "initshutdown.initshutdown_ReasonFlags.SHTDN_REASON_FLAG_PLANNED", FT_BOOLEAN, 32, TFS(&initshutdown_ReasonFlags_SHTDN_REASON_FLAG_PLANNED_tfs), ( 0x80000000 ), NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_ReasonFlags_SHTDN_REASON_FLAG_USER_DEFINED,
+ { "Shtdn Reason Flag User Defined", "initshutdown.initshutdown_ReasonFlags.SHTDN_REASON_FLAG_USER_DEFINED", FT_BOOLEAN, 32, TFS(&initshutdown_ReasonFlags_SHTDN_REASON_FLAG_USER_DEFINED_tfs), ( 0x40000000 ), NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_InitEx_timeout,
+ { "Timeout", "initshutdown.initshutdown_InitEx.timeout", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_InitEx_hostname,
+ { "Hostname", "initshutdown.initshutdown_InitEx.hostname", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_werror,
+ { "Windows Error", "initshutdown.werror", FT_UINT32, BASE_HEX, VALS(WERR_errors), 0, NULL, HFILL }},
{ &hf_initshutdown_initshutdown_Abort_server,
{ "Server", "initshutdown.initshutdown_Abort.server", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_Init_message,
- { "Message", "initshutdown.initshutdown_Init.message", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_opnum,
+ { "Operation", "initshutdown.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_initshutdown_initshutdown_Init_hostname,
{ "Hostname", "initshutdown.initshutdown_Init.hostname", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_InitEx_reboot,
- { "Reboot", "initshutdown.initshutdown_InitEx.reboot", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_initshutdown_initshutdown_InitEx_reason,
{ "Reason", "initshutdown.initshutdown_InitEx.reason", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_String_name_size,
- { "Name Size", "initshutdown.initshutdown_String.name_size", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_initshutdown_initshutdown_Init_timeout,
{ "Timeout", "initshutdown.initshutdown_Init.timeout", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_InitEx_hostname,
- { "Hostname", "initshutdown.initshutdown_InitEx.hostname", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_InitEx_message,
- { "Message", "initshutdown.initshutdown_InitEx.message", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_String_name,
- { "Name", "initshutdown.initshutdown_String.name", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_Init_reboot,
- { "Reboot", "initshutdown.initshutdown_Init.reboot", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_opnum,
- { "Operation", "initshutdown.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_initshutdown_initshutdown_Init_force_apps,
{ "Force Apps", "initshutdown.initshutdown_Init.force_apps", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_String_sub_name,
- { "Name", "initshutdown.initshutdown_String_sub.name", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_werror,
- { "Windows Error", "initshutdown.werror", FT_UINT32, BASE_HEX, VALS(WERR_errors), 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_String_sub_name_size,
- { "Name Size", "initshutdown.initshutdown_String_sub.name_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_InitEx_force_apps,
- { "Force Apps", "initshutdown.initshutdown_InitEx.force_apps", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_initshutdown_initshutdown_InitEx_timeout,
- { "Timeout", "initshutdown.initshutdown_InitEx.timeout", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_Init_do_reboot,
+ { "Do Reboot", "initshutdown.initshutdown_Init.do_reboot", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_Init_message,
+ { "Message", "initshutdown.initshutdown_Init.message", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
+ { &hf_initshutdown_initshutdown_InitEx_message,
+ { "Message", "initshutdown.initshutdown_InitEx.message", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
};
static gint *ett[] = {
&ett_dcerpc_initshutdown,
- &ett_initshutdown_initshutdown_String_sub,
- &ett_initshutdown_initshutdown_String,
+ &ett_initshutdown_initshutdown_ReasonFlags,
};
proto_dcerpc_initshutdown = proto_register_protocol("Init shutdown service", "INITSHUTDOWN", "initshutdown");