>From 4efd35aeaec29731fdf748d17510aceffc78d8fc Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 6 Oct 2013 17:48:11 -0700 Subject: [PATCH 07/21] Update the idl and cnf for initshutdown Signed-off-by: Matthieu Patou --- epan/dissectors/pidl/initshutdown.cnf | 1 + epan/dissectors/pidl/initshutdown.idl | 71 ++++++++++++++++++++++++++++------- 2 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 epan/dissectors/pidl/initshutdown.cnf diff --git a/epan/dissectors/pidl/initshutdown.cnf b/epan/dissectors/pidl/initshutdown.cnf new file mode 100644 index 0000000..55a0da3 --- /dev/null +++ b/epan/dissectors/pidl/initshutdown.cnf @@ -0,0 +1 @@ +TYPE lsa_StringLarge "offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset, pinfo, tree, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL diff --git a/epan/dissectors/pidl/initshutdown.idl b/epan/dissectors/pidl/initshutdown.idl index 868e48e..13a1362 100644 --- a/epan/dissectors/pidl/initshutdown.idl +++ b/epan/dissectors/pidl/initshutdown.idl @@ -4,6 +4,8 @@ initshutdown interface definition */ +import "lsa.idl"; + [ uuid("894de0c0-0d55-11d3-a322-00c04fa321a1"), version(1.0), @@ -12,23 +14,62 @@ helpstring("Init shutdown service") ] interface initshutdown { - typedef struct { - [value(strlen_m_term(name))] uint32 name_size; - [flag(STR_LEN4|STR_NOTERM)] string name; - } initshutdown_String_sub; + typedef [v1_enum] enum { + SHTDN_REASON_MAJOR_OTHER = 0x00000000, + SHTDN_REASON_MAJOR_HARDWARE = 0x00010000, + SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000, + SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000, + SHTDN_REASON_MAJOR_APPLICATION = 0x00040000, + SHTDN_REASON_MAJOR_SYSTEM = 0x00050000, + SHTDN_REASON_MAJOR_POWER = 0x00060000, + SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000 + } initshutdown_ReasonMajor; + + typedef [v1_enum] enum { + SHTDN_REASON_MINOR_OTHER = 0x00000000, + SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001, + SHTDN_REASON_MINOR_INSTALLATION = 0x00000002, + SHTDN_REASON_MINOR_UPGRADE = 0x00000003, + SHTDN_REASON_MINOR_RECONFIG = 0x00000004, + SHTDN_REASON_MINOR_HUNG = 0x00000005, + SHTDN_REASON_MINOR_UNSTABLE = 0x00000006, + SHTDN_REASON_MINOR_DISK = 0x00000007, + SHTDN_REASON_MINOR_PROCESSOR = 0x00000008, + SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009, + SHTDN_REASON_MINOR_POWER_SUPPLY = 0x0000000a, + SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x0000000b, + SHTDN_REASON_MINOR_ENVIRONMENT = 0x0000000c, + SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x0000000d, + SHTDN_REASON_MINOR_OTHERDRIVER = 0x0000000e, + SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000f, + SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010, + SHTDN_REASON_MINOR_HOTFIX = 0x00000011, + SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012, + SHTDN_REASON_MINOR_SECURITY = 0x00000013, + SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014, + SHTDN_REASON_MINOR_WMI = 0x00000015, + SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL= 0x00000016, + SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017, + SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL= 0x00000018, + SHTDN_REASON_MINOR_MMC = 0x00000019, + SHTDN_REASON_MINOR_TERMSRV = 0x00000020 + } initshutdown_ReasonMinor; - typedef [public] struct { - [value(strlen_m(name->name)*2)] uint16 name_len; - [value(strlen_m_term(name->name)*2)] uint16 name_size; - initshutdown_String_sub *name; - } initshutdown_String; + typedef [bitmap32bit] bitmap { + SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000, + SHTDN_REASON_FLAG_PLANNED = 0x80000000 + } initshutdown_ReasonFlags; WERROR initshutdown_Init( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, - [in] uint8 reboot + [in] uint8 do_reboot ); WERROR initshutdown_Abort( @@ -37,10 +78,14 @@ WERROR initshutdown_InitEx( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, - [in] uint8 reboot, + [in] uint8 do_reboot, [in] uint32 reason ); } -- 1.8.1.2