diff options
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/dcerpc/atsvc/Makefile | 16 | ||||
-rw-r--r-- | epan/dissectors/dcerpc/atsvc/atsvc.cnf | 14 | ||||
-rw-r--r-- | epan/dissectors/dcerpc/atsvc/atsvc.idl | 127 | ||||
-rwxr-xr-x | epan/dissectors/dcerpc/atsvc/template.c | 101 | ||||
-rwxr-xr-x | epan/dissectors/dcerpc/atsvc/template.h | 34 | ||||
-rw-r--r-- | epan/dissectors/dcerpc/idl2eth.c | 28 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc-atsvc.c | 1905 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc-atsvc.h | 22 |
8 files changed, 1764 insertions, 483 deletions
diff --git a/epan/dissectors/dcerpc/atsvc/Makefile b/epan/dissectors/dcerpc/atsvc/Makefile new file mode 100644 index 0000000000..adbd8357c6 --- /dev/null +++ b/epan/dissectors/dcerpc/atsvc/Makefile @@ -0,0 +1,16 @@ +# $Id: Makefile 13071 2005-01-16 10:19:21Z guy $ + +DISSECTOR_FILES=packet-dcerpc-atsvc.c packet-dcerpc-atsvc.h + +all: generate_dissector + +generate_dissector: $(DISSECTOR_FILES) + +$(DISSECTOR_FILES): ../idl2eth atsvc.idl atsvc.cnf template.c template.h + ../idl2eth atsvc + +clean: + rm -f ETH_* $(DISSECTOR_FILES) + +copy_files: generate_dissector + cp $(DISSECTOR_FILES) ../.. diff --git a/epan/dissectors/dcerpc/atsvc/atsvc.cnf b/epan/dissectors/dcerpc/atsvc/atsvc.cnf new file mode 100644 index 0000000000..890d9e3f9d --- /dev/null +++ b/epan/dissectors/dcerpc/atsvc/atsvc.cnf @@ -0,0 +1,14 @@ +# +NOEMIT atsvc_dissect_JobTime +TYPE JobTime atsvc_dissect_JobTime FT_UINT32 BASE_HEX 0 NULL 4 +HF_FIELD hf_atsvc_job_time "JobTime" atsvc.JobTime FT_UINT32 BASE_HEX NULL 0 "Job Time" +HF_RENAME hf_atsvc_JobInfo_job_time hf_atsvc_job_time +HF_RENAME hf_atsvc_JobEnumInfo_job_time hf_atsvc_job_time +# +# +# Make all job_id point to the same hf filter +HF_FIELD hf_atsvc_job_id "Job ID" atsvc.JobId FT_UINT32 BASE_HEX NULL 0 "Job Id" +HF_RENAME hf_atsvc_JobAdd_job_id hf_atsvc_job_id +HF_RENAME hf_atsvc_JobEnumInfo_job_id hf_atsvc_job_id +HF_RENAME hf_atsvc_JobGetInfo_job_id hf_atsvc_job_id +# diff --git a/epan/dissectors/dcerpc/atsvc/atsvc.idl b/epan/dissectors/dcerpc/atsvc/atsvc.idl new file mode 100644 index 0000000000..db5a89501a --- /dev/null +++ b/epan/dissectors/dcerpc/atsvc/atsvc.idl @@ -0,0 +1,127 @@ +/* from samba 4 revision 5661 but modified */ + +/* + atsvc interface definition +*/ + +#include "idl_types.h" + +[ uuid("1ff70682-0a51-30e8-076d-740be8cee98b"), + version(1.0), + pointer_default(unique), + helpstring("Queue/List/Remove jobs for later execution"), + endpoint("ncacn_np:[\\pipe\\atsvc]", "ncalrpc:") +] interface atsvc +{ + typedef [bitmap32bit] bitmap { + First = 0x00000001, + Second = 0x00000002, + Third = 0x00000004, + Fourth = 0x00000008, + Fifth = 0x00000010, + Sixth = 0x00000020, + Seventh = 0x00000040, + Eight = 0x00000080, + Ninth = 0x00000100, + Tenth = 0x00000200, + Eleventh= 0x00000400, + Twelfth = 0x00000800, + Thitteenth = 0x00001000, + Fourteenth = 0x00002000, + Fifteenth = 0x00004000, + Sixteenth = 0x00008000, + Seventeenth = 0x00010000, + Eighteenth = 0x00020000, + Ninteenth = 0x00040000, + Twentyth = 0x00080000, + Twentyfirst = 0x00100000, + Twentysecond = 0x00200000, + Twentythird = 0x00400000, + Twentyfourth = 0x00800000, + Twentyfifth = 0x01000000, + Twentysixth = 0x02000000, + Twentyseventh = 0x04000000, + Twentyeighth = 0x08000000, + Twentyninth = 0x10000000, + Thirtieth = 0x20000000, + Thirtyfirst = 0x40000000, + } atsvc_DaysOfMonth; + + typedef [bitmap8bit] bitmap { + Monday = 0x01, + Tuesday = 0x02, + Wednesday = 0x04, + Thursday = 0x08, + Friday = 0x10, + Saturday = 0x20, + Sunday = 0x40 + } atsvc_DaysOfWeek; + + typedef [bitmap8bit] bitmap { + JOB_RUN_PERIODICALLY = 0x01, + JOB_EXEC_ERROR = 0x02, + JOB_RUNS_TODAY = 0x04, + JOB_ADD_CURRENT_DATE = 0x08, + JOB_NONINTERACTIVE = 0x10 + } atsvc_Flags; + + typedef struct { + uint32 job_time; + } atsvc_JobTime; + + typedef struct { + atsvc_JobTime job_time; + atsvc_DaysOfMonth days_of_month; + atsvc_DaysOfWeek days_of_week; + atsvc_Flags flags; + unistr *command; + } atsvc_JobInfo; + + /******************/ + /* Function: 0x00 */ + NTSTATUS atsvc_JobAdd( + [in] unistr *servername, + [in,ref] atsvc_JobInfo *job_info, + [out] uint32 job_id + ); + + /******************/ + /* Function: 0x01 */ + NTSTATUS atsvc_JobDel( + [in] unistr *servername, + [in] uint32 min_job_id, + [in] uint32 max_job_id + ); + + typedef struct { + uint32 job_id; + atsvc_JobTime job_time; + atsvc_DaysOfMonth days_of_month; + atsvc_DaysOfWeek days_of_week; + atsvc_Flags flags; + unistr *command; + } atsvc_JobEnumInfo; + + typedef struct { + uint32 entries_read; + [size_is(entries_read)] atsvc_JobEnumInfo *first_entry[]; + } atsvc_enum_ctr; + + /******************/ + /* Function: 0x02 */ + NTSTATUS atsvc_JobEnum( + [in] unistr *servername, + [in,out,ref] atsvc_enum_ctr *ctr, + [in] uint32 preferred_max_len, + [out] uint32 total_entries, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x03 */ + [public] NTSTATUS atsvc_JobGetInfo( + [in] unistr *servername, + [in] uint32 job_id, + [out] atsvc_JobInfo *job_info + ); +} diff --git a/epan/dissectors/dcerpc/atsvc/template.c b/epan/dissectors/dcerpc/atsvc/template.c new file mode 100755 index 0000000000..08cddffe08 --- /dev/null +++ b/epan/dissectors/dcerpc/atsvc/template.c @@ -0,0 +1,101 @@ +/* DO NOT EDIT + * This dissector is autogenerated + */ + +/* packet-dcerpc-atsvc.c + * Routines for ATSVC packet disassembly + * based on the original dissector that was + * * Copyright 2003 Jean-Baptiste Marchand <jbm@hsc.fr> + * and IDL file from samba 4 + * + * $Id: packet-dcerpc-atsvc.c 11592 2004-08-03 02:28:49Z guy $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@ethereal.com> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <glib.h> +#include <string.h> + +#include <epan/packet.h> +#include "packet-dcerpc.h" +#include "packet-dcerpc-nt.h" +#include "packet-windows-common.h" +#include "packet-dcerpc-atsvc.h" + +static int proto_atsvc = -1; +ETH_HF + +ETH_ETT + +int +atsvc_dissect_JobTime(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param _U_) +{ + guint32 job_time; + guint8 job_hour, job_min, job_sec; + guint16 job_msec; + + offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep, + -1, &job_time); + + job_hour = job_time / 3600000; + job_min = (job_time - job_hour * 3600000) / 60000; + job_sec = (job_time - (job_hour * 3600000) - (job_min * 60000)) / 1000; + job_msec = (job_time - (job_hour * 3600000) - (job_min * 60000) - (job_sec * 1000)); + + proto_tree_add_uint_format(tree, hf_index, tvb, offset - 4, + 4, job_time, "Time: %02d:%02d:%02d:%03d", job_hour, job_min, job_sec, job_msec); + + return offset; +} + +ETH_CODE + +void +proto_register_atsvc(void) +{ + static hf_register_info hf[] = { +ETH_HFARR + }; + + static gint *ett[] = { +ETH_ETTARR + }; + + proto_atsvc = proto_register_protocol( + "Microsoft Task Scheduler Service", + "ATSVC", "atsvc"); + proto_register_field_array(proto_atsvc, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); +} + +static dcerpc_sub_dissector function_dissectors[] = { +ETH_FT + { 0, NULL, NULL, NULL }, +}; + +void +proto_reg_handoff_atsvc(void) +{ +ETH_HANDOFF +} + diff --git a/epan/dissectors/dcerpc/atsvc/template.h b/epan/dissectors/dcerpc/atsvc/template.h new file mode 100755 index 0000000000..600b5a7eb1 --- /dev/null +++ b/epan/dissectors/dcerpc/atsvc/template.h @@ -0,0 +1,34 @@ +/* DO NOT EDIT + * This dissector is autogenerated + * Autogenerated based on the IDL definitions from samba 4 + */ +/* packet-dcerpc-atsvc.h + * Routines for ATSVC packet disassembly + * + * $Id: packet-dcerpc-atsvc.h 11410 2004-07-18 18:06:47Z gram $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@ethereal.com> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __PACKET_DCERPC_ATSVC_H +#define __PACKET_DCERPC_ATSVC_H + +ETH_HDR + +#endif /* packet-dcerpc-atsvc.h */ diff --git a/epan/dissectors/dcerpc/idl2eth.c b/epan/dissectors/dcerpc/idl2eth.c index 9d4b49b348..af68d6ae85 100644 --- a/epan/dissectors/dcerpc/idl2eth.c +++ b/epan/dissectors/dcerpc/idl2eth.c @@ -93,8 +93,9 @@ typedef struct _pointer_item_t { #define BI_SIZE_IS 0x00000010 #define BI_LENGTH_IS 0x00000020 #define BI_POINTER 0x00000040 -#define BI_BITMAP32 0x00000100 -#define BI_SWITCH_TYPE 0x00000200 +#define BI_BITMAP8 0x00000100 +#define BI_BITMAP32 0x00000200 +#define BI_SWITCH_TYPE 0x00000400 typedef struct _bracket_item_t { long int flags; char *case_name; @@ -656,6 +657,13 @@ parsebrackets(token_item_t *ti, bracket_item_t **bracket){ continue; } + /* bitmap8bit */ + if(!strcmp(ti->str, "bitmap8bit")){ + br->flags|=BI_BITMAP8; + ti=ti->next; + continue; + } + /* bitmap32bit */ if(!strcmp(ti->str, "bitmap32bit")){ br->flags|=BI_BITMAP32; @@ -1857,13 +1865,16 @@ void parsetypedefbitmap(int pass) } /* check that we know how to handle the bracket thing */ if(bi){ - if(bi->flags&(~(BI_BITMAP32))){ + if(bi->flags&(~(BI_BITMAP32|BI_BITMAP8))){ fprintf(stderr, "ERROR: typedefbitmap unknown bracket flags encountered : 0x%08x\n",bi->flags); Exit(10); } if(bi->flags&BI_BITMAP32){ alignment=4; } + if(bi->flags&BI_BITMAP8){ + alignment=1; + } } @@ -1906,6 +1917,10 @@ void parsetypedefbitmap(int pass) FPRINTF(eth_code, " proto_item *item=NULL;\n"); FPRINTF(eth_code, " proto_tree *tree=NULL;\n"); switch(alignment){ + case 1: + FPRINTF(eth_code, " guint8 flags;\n"); + FPRINTF(eth_code, "\n"); + break; case 4: FPRINTF(eth_code, " guint32 flags;\n"); FPRINTF(eth_code, "\n"); @@ -1922,6 +1937,10 @@ void parsetypedefbitmap(int pass) FPRINTF(eth_code, " }\n"); FPRINTF(eth_code, "\n"); switch(alignment){ + case 1: + FPRINTF(eth_code, " offset=dissect_ndr_uint8(tvb, offset, pinfo, NULL, drep, -1, &flags);\n"); + FPRINTF(eth_code, "\n"); + break; case 4: FPRINTF(eth_code, " offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep, -1, &flags);\n"); FPRINTF(eth_code, "\n"); @@ -2005,6 +2024,9 @@ void parsetypedefbitmap(int pass) FPRINTF(eth_code, " return offset;\n"); FPRINTF(eth_code, "}\n"); switch(alignment){ + case 1: + register_new_type(bitmap_name, dissectorname, "FT_UINT8", "BASE_HEX", "0", "NULL", alignment); + break; case 4: register_new_type(bitmap_name, dissectorname, "FT_UINT32", "BASE_HEX", "0", "NULL", alignment); break; diff --git a/epan/dissectors/packet-dcerpc-atsvc.c b/epan/dissectors/packet-dcerpc-atsvc.c index d7cc0c5db8..cb4180f4cb 100644 --- a/epan/dissectors/packet-dcerpc-atsvc.c +++ b/epan/dissectors/packet-dcerpc-atsvc.c @@ -1,6 +1,12 @@ +/* DO NOT EDIT + * This dissector is autogenerated + */ + /* packet-dcerpc-atsvc.c - * Routines for SMB \pipe\atsvc packet disassembly - * Copyright 2003 Jean-Baptiste Marchand <jbm@hsc.fr> + * Routines for ATSVC packet disassembly + * based on the original dissector that was + * * Copyright 2003 Jean-Baptiste Marchand <jbm@hsc.fr> + * and IDL file from samba 4 * * $Id$ * @@ -23,660 +29,1615 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <glib.h> +#include <string.h> + #include <epan/packet.h> #include "packet-dcerpc.h" #include "packet-dcerpc-nt.h" -#include "packet-dcerpc-atsvc.h" #include "packet-windows-common.h" +#include "packet-dcerpc-atsvc.h" +static int proto_atsvc = -1; -static int proto_dcerpc_atsvc = -1; -static int hf_atsvc_server = -1; -static int hf_atsvc_command = -1; +/* INCLUDED FILE : ETH_HF */ +static int hf_atsvc_job_time = -1; +static int hf_atsvc_job_id = -1; static int hf_atsvc_opnum = -1; static int hf_atsvc_rc = -1; -static int hf_atsvc_job_id = -1; -static int hf_atsvc_job_time = -1; -static int hf_atsvc_job_days_of_month = -1; -static int hf_atsvc_job_days_of_week = -1; -static int hf_atsvc_job_flags = -1; -static int hf_atsvc_min_job_id = -1; -static int hf_atsvc_max_job_id = -1; -static int hf_atsvc_job_flags_noninteractive = -1; -static int hf_atsvc_job_flags_add_current_date = -1; -static int hf_atsvc_job_flags_runs_today = -1; -static int hf_atsvc_job_flags_exec_error = -1; -static int hf_atsvc_job_flags_run_periodically = -1; -static int hf_atsvc_job_enum_hnd = -1; -static int hf_atsvc_jobs_count = -1; -static int hf_atsvc_enum_handle = -1; -static int hf_atsvc_pref_max = -1; -static int hf_atsvc_num_entries = -1; -static int hf_atsvc_total_entries = -1; - -static gint ett_dcerpc_atsvc = -1; -static gint ett_dcerpc_atsvc_job = -1; -static gint ett_dcerpc_atsvc_job_flags = -1; - - -/* -IDL [ uuid(1ff70682-0a51-30e8-076d-740be8cee98b), -IDL version(1.0), -IDL implicit_handle(handle_t rpc_binding) -IDL ] interface atsvc -*/ - - -static e_uuid_t uuid_dcerpc_atsvc = { - 0x1ff70682, 0x0a51, 0x30e8, - { 0x07, 0x6d, 0x74, 0x0b, 0xe8, 0xce, 0xe9, 0x8b } -}; - -static guint16 ver_dcerpc_atsvc = 1; - - -/* - IDL typedef struct { - IDL long JobTime; - IDL long DaysOfMonth; - IDL char DaysOfWeek; - IDL char Flags; - IDL [unique] [string] wchar_t *Command; - IDL } AT_INFO; - */ - -static int -atsvc_dissect_AT_INFO_fields(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +static int hf_atsvc_DaysOfMonth_First = -1; +static int hf_atsvc_DaysOfMonth_Second = -1; +static int hf_atsvc_DaysOfMonth_Third = -1; +static int hf_atsvc_DaysOfMonth_Fourth = -1; +static int hf_atsvc_DaysOfMonth_Fifth = -1; +static int hf_atsvc_DaysOfMonth_Sixth = -1; +static int hf_atsvc_DaysOfMonth_Seventh = -1; +static int hf_atsvc_DaysOfMonth_Eight = -1; +static int hf_atsvc_DaysOfMonth_Ninth = -1; +static int hf_atsvc_DaysOfMonth_Tenth = -1; +static int hf_atsvc_DaysOfMonth_Eleventh = -1; +static int hf_atsvc_DaysOfMonth_Twelfth = -1; +static int hf_atsvc_DaysOfMonth_Thitteenth = -1; +static int hf_atsvc_DaysOfMonth_Fourteenth = -1; +static int hf_atsvc_DaysOfMonth_Fifteenth = -1; +static int hf_atsvc_DaysOfMonth_Sixteenth = -1; +static int hf_atsvc_DaysOfMonth_Seventeenth = -1; +static int hf_atsvc_DaysOfMonth_Eighteenth = -1; +static int hf_atsvc_DaysOfMonth_Ninteenth = -1; +static int hf_atsvc_DaysOfMonth_Twentyth = -1; +static int hf_atsvc_DaysOfMonth_Twentyfirst = -1; +static int hf_atsvc_DaysOfMonth_Twentysecond = -1; +static int hf_atsvc_DaysOfMonth_Twentythird = -1; +static int hf_atsvc_DaysOfMonth_Twentyfourth = -1; +static int hf_atsvc_DaysOfMonth_Twentyfifth = -1; +static int hf_atsvc_DaysOfMonth_Twentysixth = -1; +static int hf_atsvc_DaysOfMonth_Twentyseventh = -1; +static int hf_atsvc_DaysOfMonth_Twentyeighth = -1; +static int hf_atsvc_DaysOfMonth_Twentyninth = -1; +static int hf_atsvc_DaysOfMonth_Thirtieth = -1; +static int hf_atsvc_DaysOfMonth_Thirtyfirst = -1; +static int hf_atsvc_DaysOfWeek_Monday = -1; +static int hf_atsvc_DaysOfWeek_Tuesday = -1; +static int hf_atsvc_DaysOfWeek_Wednesday = -1; +static int hf_atsvc_DaysOfWeek_Thursday = -1; +static int hf_atsvc_DaysOfWeek_Friday = -1; +static int hf_atsvc_DaysOfWeek_Saturday = -1; +static int hf_atsvc_DaysOfWeek_Sunday = -1; +static int hf_atsvc_Flags_JOB_RUN_PERIODICALLY = -1; +static int hf_atsvc_Flags_JOB_EXEC_ERROR = -1; +static int hf_atsvc_Flags_JOB_RUNS_TODAY = -1; +static int hf_atsvc_Flags_JOB_ADD_CURRENT_DATE = -1; +static int hf_atsvc_Flags_JOB_NONINTERACTIVE = -1; +static int hf_atsvc_JobInfo_days_of_month = -1; +static int hf_atsvc_JobInfo_days_of_week = -1; +static int hf_atsvc_JobInfo_flags = -1; +static int hf_atsvc_JobInfo_command = -1; +static int hf_atsvc_JobAdd_servername = -1; +static int hf_atsvc_JobAdd_job_info = -1; +static int hf_atsvc_JobDel_servername = -1; +static int hf_atsvc_JobDel_min_job_id = -1; +static int hf_atsvc_JobDel_max_job_id = -1; +static int hf_atsvc_JobEnumInfo_days_of_month = -1; +static int hf_atsvc_JobEnumInfo_days_of_week = -1; +static int hf_atsvc_JobEnumInfo_flags = -1; +static int hf_atsvc_JobEnumInfo_command = -1; +static int hf_atsvc_enum_ctr_entries_read = -1; +static int hf_atsvc_enum_ctr_first_entry = -1; +static int hf_atsvc_JobEnum_servername = -1; +static int hf_atsvc_JobEnum_ctr = -1; +static int hf_atsvc_JobEnum_preferred_max_len = -1; +static int hf_atsvc_JobEnum_total_entries = -1; +static int hf_atsvc_JobEnum_resume_handle = -1; +static int hf_atsvc_JobGetInfo_servername = -1; +static int hf_atsvc_JobGetInfo_job_info = -1; +/* END OF INCLUDED FILE : ETH_HF */ + + + + + +/* INCLUDED FILE : ETH_ETT */ +static gint ett_atsvc = -1; +static gint ett_atsvc_DaysOfMonth = -1; +static gint ett_atsvc_DaysOfWeek = -1; +static gint ett_atsvc_Flags = -1; +static gint ett_atsvc_JobInfo = -1; +static gint ett_atsvc_JobEnumInfo = -1; +static gint ett_atsvc_enum_ctr = -1; +/* END OF INCLUDED FILE : ETH_ETT */ + + + +int +atsvc_dissect_JobTime(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param _U_) { - proto_item *item = NULL; - proto_tree *flags_tree = NULL; guint32 job_time; - guint8 job_flags; guint8 job_hour, job_min, job_sec; guint16 job_msec; - dcerpc_info *di = (dcerpc_info *) pinfo->private_data; offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep, - 0, &job_time); + -1, &job_time); job_hour = job_time / 3600000; job_min = (job_time - job_hour * 3600000) / 60000; job_sec = (job_time - (job_hour * 3600000) - (job_min * 60000)) / 1000; job_msec = (job_time - (job_hour * 3600000) - (job_min * 60000) - (job_sec * 1000)); - proto_tree_add_uint_format(tree, hf_atsvc_job_time, tvb, offset - 4, + proto_tree_add_uint_format(tree, hf_index, tvb, offset - 4, 4, job_time, "Time: %02d:%02d:%02d:%03d", job_hour, job_min, job_sec, job_msec); - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_job_days_of_month, NULL); + return offset; +} - offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep, - hf_atsvc_job_days_of_week, NULL); - offset = dissect_ndr_uint8(tvb, offset, pinfo, NULL, drep, - 0, &job_flags); - item = proto_tree_add_text(tree, tvb, offset-1, 1, "Flags: 0x%02x", job_flags); - flags_tree = proto_item_add_subtree(item, ett_dcerpc_atsvc_job_flags); +/* INCLUDED FILE : ETH_CODE */ +static e_uuid_t uuid_dcerpc_atsvc = { + 0x1ff70682, 0x0a51, 0x30e8, + { 0x07, 0x6d, 0x74, 0x0b, 0xe8, 0xce, 0xe9, 0x8b} +}; - if (flags_tree) { +static guint16 ver_atsvc = 1; -#define JOB_RUN_PERIODICALLY 0x01 -#define JOB_EXEC_ERROR 0x02 -#define JOB_RUNS_TODAY 0x04 -#define JOB_ADD_CURRENT_DATE 0x08 -#define JOB_NONINTERACTIVE 0x10 +static const true_false_string First_tfs = { + "First is SET", + "First is NOT set" +}; - if (di->call_data->opnum == ATSVC_JOB_ADD) { +static const true_false_string Second_tfs = { + "Second is SET", + "Second is NOT set" +}; - if (job_flags & JOB_RUN_PERIODICALLY) { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_run_periodically, - tvb, offset-1, 1, job_flags); - } - else { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_run_periodically, - tvb, offset-1, 1, 0); - } +static const true_false_string Third_tfs = { + "Third is SET", + "Third is NOT set" +}; +static const true_false_string Fourth_tfs = { + "Fourth is SET", + "Fourth is NOT set" +}; - if (job_flags & JOB_ADD_CURRENT_DATE) { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_add_current_date, - tvb, offset-1, 1, job_flags); - } - else { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_add_current_date, - tvb, offset-1, 1, 0); - } +static const true_false_string Fifth_tfs = { + "Fifth is SET", + "Fifth is NOT set" +}; +static const true_false_string Sixth_tfs = { + "Sixth is SET", + "Sixth is NOT set" +}; - if (job_flags & JOB_NONINTERACTIVE) { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_noninteractive, - tvb, offset-1, 1, job_flags); - } - else { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_noninteractive, - tvb, offset-1, 1, job_flags); - } +static const true_false_string Seventh_tfs = { + "Seventh is SET", + "Seventh is NOT set" +}; - } +static const true_false_string Eight_tfs = { + "Eight is SET", + "Eight is NOT set" +}; - if ((di->call_data->opnum == ATSVC_JOB_GETINFO) - || (di->call_data->opnum == ATSVC_JOB_ENUM)) { +static const true_false_string Ninth_tfs = { + "Ninth is SET", + "Ninth is NOT set" +}; +static const true_false_string Tenth_tfs = { + "Tenth is SET", + "Tenth is NOT set" +}; - if (job_flags & JOB_RUN_PERIODICALLY) { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_run_periodically, - tvb, offset-1, 1, job_flags); - } - else { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_run_periodically, - tvb, offset-1, 1, 0); - } +static const true_false_string Eleventh_tfs = { + "Eleventh is SET", + "Eleventh is NOT set" +}; +static const true_false_string Twelfth_tfs = { + "Twelfth is SET", + "Twelfth is NOT set" +}; - if (job_flags & JOB_EXEC_ERROR) { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_exec_error, - tvb, offset-1, 1, job_flags); - } - else { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_exec_error, - tvb, offset-1, 1, 0); - } +static const true_false_string Thitteenth_tfs = { + "Thitteenth is SET", + "Thitteenth is NOT set" +}; +static const true_false_string Fourteenth_tfs = { + "Fourteenth is SET", + "Fourteenth is NOT set" +}; - if (job_flags & JOB_RUNS_TODAY) { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_runs_today, - tvb, offset-1, 1, job_flags); - } - else { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_runs_today, - tvb, offset-1, 1, 0); - } +static const true_false_string Fifteenth_tfs = { + "Fifteenth is SET", + "Fifteenth is NOT set" +}; - if (job_flags & JOB_NONINTERACTIVE) { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_noninteractive, - tvb, offset-1, 1, job_flags); - } - else { - proto_tree_add_boolean(flags_tree, hf_atsvc_job_flags_noninteractive, - tvb, offset-1, 1, job_flags); - } +static const true_false_string Sixteenth_tfs = { + "Sixteenth is SET", + "Sixteenth is NOT set" +}; - } +static const true_false_string Seventeenth_tfs = { + "Seventeenth is SET", + "Seventeenth is NOT set" +}; - } +static const true_false_string Eighteenth_tfs = { + "Eighteenth is SET", + "Eighteenth is NOT set" +}; - offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "Command", hf_atsvc_command, 0); +static const true_false_string Ninteenth_tfs = { + "Ninteenth is SET", + "Ninteenth is NOT set" +}; - return offset; -} +static const true_false_string Twentyth_tfs = { + "Twentyth is SET", + "Twentyth is NOT set" +}; -static int -atsvc_dissect_AT_INFO(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +static const true_false_string Twentyfirst_tfs = { + "Twentyfirst is SET", + "Twentyfirst is NOT set" +}; + +static const true_false_string Twentysecond_tfs = { + "Twentysecond is SET", + "Twentysecond is NOT set" +}; + +static const true_false_string Twentythird_tfs = { + "Twentythird is SET", + "Twentythird is NOT set" +}; + +static const true_false_string Twentyfourth_tfs = { + "Twentyfourth is SET", + "Twentyfourth is NOT set" +}; + +static const true_false_string Twentyfifth_tfs = { + "Twentyfifth is SET", + "Twentyfifth is NOT set" +}; + +static const true_false_string Twentysixth_tfs = { + "Twentysixth is SET", + "Twentysixth is NOT set" +}; + +static const true_false_string Twentyseventh_tfs = { + "Twentyseventh is SET", + "Twentyseventh is NOT set" +}; + +static const true_false_string Twentyeighth_tfs = { + "Twentyeighth is SET", + "Twentyeighth is NOT set" +}; + +static const true_false_string Twentyninth_tfs = { + "Twentyninth is SET", + "Twentyninth is NOT set" +}; + +static const true_false_string Thirtieth_tfs = { + "Thirtieth is SET", + "Thirtieth is NOT set" +}; + +static const true_false_string Thirtyfirst_tfs = { + "Thirtyfirst is SET", + "Thirtyfirst is NOT set" +}; + + +int +atsvc_dissect_DaysOfMonth(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param _U_) { - proto_item *item = NULL; - proto_tree *subtree = NULL; + proto_item *item=NULL; + proto_tree *tree=NULL; + guint32 flags; + + ALIGN_TO_4_BYTES; + + if(parent_tree){ + item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, 4, TRUE); + tree=proto_item_add_subtree(item, ett_atsvc_DaysOfMonth); + } + + offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep, -1, &flags); + + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_First, tvb, offset-4, 4, flags); + if(flags&0x00000001){ + proto_item_append_text(item, " First"); + } + flags&=(~0x00000001); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Second, tvb, offset-4, 4, flags); + if(flags&0x00000002){ + proto_item_append_text(item, " Second"); + } + flags&=(~0x00000002); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Third, tvb, offset-4, 4, flags); + if(flags&0x00000004){ + proto_item_append_text(item, " Third"); + } + flags&=(~0x00000004); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Fourth, tvb, offset-4, 4, flags); + if(flags&0x00000008){ + proto_item_append_text(item, " Fourth"); + } + flags&=(~0x00000008); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Fifth, tvb, offset-4, 4, flags); + if(flags&0x00000010){ + proto_item_append_text(item, " Fifth"); + } + flags&=(~0x00000010); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Sixth, tvb, offset-4, 4, flags); + if(flags&0x00000020){ + proto_item_append_text(item, " Sixth"); + } + flags&=(~0x00000020); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Seventh, tvb, offset-4, 4, flags); + if(flags&0x00000040){ + proto_item_append_text(item, " Seventh"); + } + flags&=(~0x00000040); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Eight, tvb, offset-4, 4, flags); + if(flags&0x00000080){ + proto_item_append_text(item, " Eight"); + } + flags&=(~0x00000080); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Ninth, tvb, offset-4, 4, flags); + if(flags&0x00000100){ + proto_item_append_text(item, " Ninth"); + } + flags&=(~0x00000100); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Tenth, tvb, offset-4, 4, flags); + if(flags&0x00000200){ + proto_item_append_text(item, " Tenth"); + } + flags&=(~0x00000200); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Eleventh, tvb, offset-4, 4, flags); + if(flags&0x00000400){ + proto_item_append_text(item, " Eleventh"); + } + flags&=(~0x00000400); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twelfth, tvb, offset-4, 4, flags); + if(flags&0x00000800){ + proto_item_append_text(item, " Twelfth"); + } + flags&=(~0x00000800); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Thitteenth, tvb, offset-4, 4, flags); + if(flags&0x00001000){ + proto_item_append_text(item, " Thitteenth"); + } + flags&=(~0x00001000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Fourteenth, tvb, offset-4, 4, flags); + if(flags&0x00002000){ + proto_item_append_text(item, " Fourteenth"); + } + flags&=(~0x00002000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Fifteenth, tvb, offset-4, 4, flags); + if(flags&0x00004000){ + proto_item_append_text(item, " Fifteenth"); + } + flags&=(~0x00004000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Sixteenth, tvb, offset-4, 4, flags); + if(flags&0x00008000){ + proto_item_append_text(item, " Sixteenth"); + } + flags&=(~0x00008000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Seventeenth, tvb, offset-4, 4, flags); + if(flags&0x00010000){ + proto_item_append_text(item, " Seventeenth"); + } + flags&=(~0x00010000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Eighteenth, tvb, offset-4, 4, flags); + if(flags&0x00020000){ + proto_item_append_text(item, " Eighteenth"); + } + flags&=(~0x00020000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Ninteenth, tvb, offset-4, 4, flags); + if(flags&0x00040000){ + proto_item_append_text(item, " Ninteenth"); + } + flags&=(~0x00040000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentyth, tvb, offset-4, 4, flags); + if(flags&0x00080000){ + proto_item_append_text(item, " Twentyth"); + } + flags&=(~0x00080000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentyfirst, tvb, offset-4, 4, flags); + if(flags&0x00100000){ + proto_item_append_text(item, " Twentyfirst"); + } + flags&=(~0x00100000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentysecond, tvb, offset-4, 4, flags); + if(flags&0x00200000){ + proto_item_append_text(item, " Twentysecond"); + } + flags&=(~0x00200000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentythird, tvb, offset-4, 4, flags); + if(flags&0x00400000){ + proto_item_append_text(item, " Twentythird"); + } + flags&=(~0x00400000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentyfourth, tvb, offset-4, 4, flags); + if(flags&0x00800000){ + proto_item_append_text(item, " Twentyfourth"); + } + flags&=(~0x00800000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentyfifth, tvb, offset-4, 4, flags); + if(flags&0x01000000){ + proto_item_append_text(item, " Twentyfifth"); + } + flags&=(~0x01000000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentysixth, tvb, offset-4, 4, flags); + if(flags&0x02000000){ + proto_item_append_text(item, " Twentysixth"); + } + flags&=(~0x02000000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentyseventh, tvb, offset-4, 4, flags); + if(flags&0x04000000){ + proto_item_append_text(item, " Twentyseventh"); + } + flags&=(~0x04000000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentyeighth, tvb, offset-4, 4, flags); + if(flags&0x08000000){ + proto_item_append_text(item, " Twentyeighth"); + } + flags&=(~0x08000000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Twentyninth, tvb, offset-4, 4, flags); + if(flags&0x10000000){ + proto_item_append_text(item, " Twentyninth"); + } + flags&=(~0x10000000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Thirtieth, tvb, offset-4, 4, flags); + if(flags&0x20000000){ + proto_item_append_text(item, " Thirtieth"); + } + flags&=(~0x20000000); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfMonth_Thirtyfirst, tvb, offset-4, 4, flags); + if(flags&0x40000000){ + proto_item_append_text(item, " Thirtyfirst"); + } + flags&=(~0x40000000); + + if(flags){ + proto_item_append_text(item, "UNKNOWN-FLAGS"); + } + + return offset; +} +static const true_false_string Monday_tfs = { + "Monday is SET", + "Monday is NOT set" +}; - if (tree) { - item = proto_tree_add_text(tree, tvb, offset, -1, "Job"); - subtree = proto_item_add_subtree(item, ett_dcerpc_atsvc_job); - } +static const true_false_string Tuesday_tfs = { + "Tuesday is SET", + "Tuesday is NOT set" +}; - offset = atsvc_dissect_AT_INFO_fields(tvb, offset, pinfo, subtree, drep); +static const true_false_string Wednesday_tfs = { + "Wednesday is SET", + "Wednesday is NOT set" +}; - return offset; +static const true_false_string Thursday_tfs = { + "Thursday is SET", + "Thursday is NOT set" +}; + +static const true_false_string Friday_tfs = { + "Friday is SET", + "Friday is NOT set" +}; + +static const true_false_string Saturday_tfs = { + "Saturday is SET", + "Saturday is NOT set" +}; + +static const true_false_string Sunday_tfs = { + "Sunday is SET", + "Sunday is NOT set" +}; + + +int +atsvc_dissect_DaysOfWeek(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param _U_) +{ + proto_item *item=NULL; + proto_tree *tree=NULL; + guint8 flags; + + + if(parent_tree){ + item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, 1, TRUE); + tree=proto_item_add_subtree(item, ett_atsvc_DaysOfWeek); + } + + offset=dissect_ndr_uint8(tvb, offset, pinfo, NULL, drep, -1, &flags); + + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfWeek_Monday, tvb, offset-1, 1, flags); + if(flags&0x01){ + proto_item_append_text(item, " Monday"); + } + flags&=(~0x01); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfWeek_Tuesday, tvb, offset-1, 1, flags); + if(flags&0x02){ + proto_item_append_text(item, " Tuesday"); + } + flags&=(~0x02); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfWeek_Wednesday, tvb, offset-1, 1, flags); + if(flags&0x04){ + proto_item_append_text(item, " Wednesday"); + } + flags&=(~0x04); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfWeek_Thursday, tvb, offset-1, 1, flags); + if(flags&0x08){ + proto_item_append_text(item, " Thursday"); + } + flags&=(~0x08); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfWeek_Friday, tvb, offset-1, 1, flags); + if(flags&0x10){ + proto_item_append_text(item, " Friday"); + } + flags&=(~0x10); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfWeek_Saturday, tvb, offset-1, 1, flags); + if(flags&0x20){ + proto_item_append_text(item, " Saturday"); + } + flags&=(~0x20); + + proto_tree_add_boolean(tree, hf_atsvc_DaysOfWeek_Sunday, tvb, offset-1, 1, flags); + if(flags&0x40){ + proto_item_append_text(item, " Sunday"); + } + flags&=(~0x40); + + if(flags){ + proto_item_append_text(item, "UNKNOWN-FLAGS"); + } + + return offset; } +static const true_false_string JOB_RUN_PERIODICALLY_tfs = { + "JOB_RUN_PERIODICALLY is SET", + "JOB_RUN_PERIODICALLY is NOT set" +}; +static const true_false_string JOB_EXEC_ERROR_tfs = { + "JOB_EXEC_ERROR is SET", + "JOB_EXEC_ERROR is NOT set" +}; +static const true_false_string JOB_RUNS_TODAY_tfs = { + "JOB_RUNS_TODAY is SET", + "JOB_RUNS_TODAY is NOT set" +}; + +static const true_false_string JOB_ADD_CURRENT_DATE_tfs = { + "JOB_ADD_CURRENT_DATE is SET", + "JOB_ADD_CURRENT_DATE is NOT set" +}; + +static const true_false_string JOB_NONINTERACTIVE_tfs = { + "JOB_NONINTERACTIVE is SET", + "JOB_NONINTERACTIVE is NOT set" +}; -/* - IDL long NetrJobAdd( - IDL [in] [unique] [string] wchar_t *Servername, - IDL [in] [ref] AT_INFO *element_22, - IDL [out] [ref] long *JobId - IDL ); - */ +int +atsvc_dissect_Flags(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param _U_) +{ + proto_item *item=NULL; + proto_tree *tree=NULL; + guint8 flags; + + + if(parent_tree){ + item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, 1, TRUE); + tree=proto_item_add_subtree(item, ett_atsvc_Flags); + } + + offset=dissect_ndr_uint8(tvb, offset, pinfo, NULL, drep, -1, &flags); + + + proto_tree_add_boolean(tree, hf_atsvc_Flags_JOB_RUN_PERIODICALLY, tvb, offset-1, 1, flags); + if(flags&0x01){ + proto_item_append_text(item, " JOB_RUN_PERIODICALLY"); + } + flags&=(~0x01); + + proto_tree_add_boolean(tree, hf_atsvc_Flags_JOB_EXEC_ERROR, tvb, offset-1, 1, flags); + if(flags&0x02){ + proto_item_append_text(item, " JOB_EXEC_ERROR"); + } + flags&=(~0x02); + + proto_tree_add_boolean(tree, hf_atsvc_Flags_JOB_RUNS_TODAY, tvb, offset-1, 1, flags); + if(flags&0x04){ + proto_item_append_text(item, " JOB_RUNS_TODAY"); + } + flags&=(~0x04); + + proto_tree_add_boolean(tree, hf_atsvc_Flags_JOB_ADD_CURRENT_DATE, tvb, offset-1, 1, flags); + if(flags&0x08){ + proto_item_append_text(item, " JOB_ADD_CURRENT_DATE"); + } + flags&=(~0x08); + + proto_tree_add_boolean(tree, hf_atsvc_Flags_JOB_NONINTERACTIVE, tvb, offset-1, 1, flags); + if(flags&0x10){ + proto_item_append_text(item, " JOB_NONINTERACTIVE"); + } + flags&=(~0x10); + + if(flags){ + proto_item_append_text(item, "UNKNOWN-FLAGS"); + } + + return offset; +} static int -atsvc_dissect_add_rqst(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +atsvc_dissect_JobInfo_job_time(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "Server", hf_atsvc_server, 0); - - offset = atsvc_dissect_AT_INFO(tvb, offset, pinfo, tree, drep); + guint32 param=0; + offset=atsvc_dissect_JobTime(tvb, offset, pinfo, tree, drep, hf_atsvc_job_time, param); + return offset; +} - return offset; +static int +atsvc_dissect_JobInfo_days_of_month(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_DaysOfMonth(tvb, offset, pinfo, tree, drep, hf_atsvc_JobInfo_days_of_month, param); + return offset; } static int -atsvc_dissect_add_reply(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +atsvc_dissect_JobInfo_days_of_week(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_job_id, NULL); - - offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, - hf_atsvc_rc, NULL); + guint32 param=0; + offset=atsvc_dissect_DaysOfWeek(tvb, offset, pinfo, tree, drep, hf_atsvc_JobInfo_days_of_week, param); + return offset; +} - return offset; +static int +atsvc_dissect_JobInfo_flags(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_Flags(tvb, offset, pinfo, tree, drep, hf_atsvc_JobInfo_flags, param); + return offset; } -/* - IDL long NetrJobDel( - IDL [in] [unique] [string] wchar_t *Servername, - IDL [in] long MinJobId, - IDL [in] long MaxJobId, - IDL ); - */ +static int +atsvc_dissect_unistr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param _U_) +{ + offset=dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, 2, hf_index, FALSE, NULL); + return offset; +} + +static int +atsvc_dissect_JobInfo_command(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_unistr(tvb, offset, pinfo, tree, drep, hf_atsvc_JobInfo_command, param); + return offset; +} static int -atsvc_dissect_del_rqst(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +unique_atsvc_dissect_JobInfo_command(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "Server", hf_atsvc_server, 0); + offset=dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobInfo_command, NDR_POINTER_UNIQUE, "command", -1); + return offset; +} - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_min_job_id, NULL); - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_max_job_id, NULL); +int +atsvc_dissect_JobInfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param _U_) +{ + proto_item *item=NULL; + proto_tree *tree=NULL; + int old_offset; - return 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_atsvc_JobInfo); + } + + offset=atsvc_dissect_JobInfo_job_time(tvb, offset, pinfo, tree, drep); + + offset=atsvc_dissect_JobInfo_days_of_month(tvb, offset, pinfo, tree, drep); + + offset=atsvc_dissect_JobInfo_days_of_week(tvb, offset, pinfo, tree, drep); + + offset=atsvc_dissect_JobInfo_flags(tvb, offset, pinfo, tree, drep); + + offset=unique_atsvc_dissect_JobInfo_command(tvb, offset, pinfo, tree, drep); + + proto_item_set_len(item, offset-old_offset); + + return offset; +} +static int +atsvc_dissect_JobAdd_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_unistr(tvb, offset, pinfo, tree, drep, hf_atsvc_JobAdd_servername, param); + return offset; } static int -atsvc_dissect_del_reply(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +unique_atsvc_dissect_JobAdd_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, - hf_atsvc_rc, NULL); - return offset; + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobAdd_servername, NDR_POINTER_UNIQUE, "servername", -1); + return offset; } +static int +atsvc_dissect_JobAdd_job_info(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_JobInfo(tvb, offset, pinfo, tree, drep, hf_atsvc_JobAdd_job_info, param); + return offset; +} -/* - IDL typedef struct { - IDL long JobId; - IDL long JobTime; - IDL long DaysOfMonth; - IDL char DaysOfWeek; - IDL char Flags; - IDL [unique] [string] wchar_t *Command; - IDL } AT_ENUM; - */ +static int +ref_atsvc_dissect_JobAdd_job_info(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobAdd_job_info, NDR_POINTER_REF, "job_info", -1); + return offset; +} + + +static int +atsvc_dissect_uint32(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param _U_) +{ + offset=dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, NULL); + return offset; +} static int -atsvc_dissect_AT_ENUM(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +atsvc_dissect_JobAdd_job_id(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - proto_item *item = NULL; - proto_tree *subtree = NULL; - guint32 job_id; + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_job_id, param); + return offset; +} - offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep, - 0, &job_id); - if (tree) { - item = proto_tree_add_text(tree, tvb, offset, -1, "Job %d", job_id); - subtree = proto_item_add_subtree(item, ett_dcerpc_atsvc_job); - } +static int +atsvc_dissect_JobAdd_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +{ + offset=unique_atsvc_dissect_JobAdd_servername(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - proto_tree_add_uint_format(subtree, hf_atsvc_job_id, tvb, offset - 4, - 4, job_id, "Job ID: %d", job_id); + offset=ref_atsvc_dissect_JobAdd_job_info(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - offset = atsvc_dissect_AT_INFO_fields(tvb, offset, pinfo, subtree, drep); - return offset; + return offset; } +static int +atsvc_dissect_JobAdd_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +{ + offset=atsvc_dissect_JobAdd_job_id(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); + + offset=dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_rc, NULL); + + return offset; +} static int -atsvc_dissect_ENUM_HANDLE(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - guint8 *drep) +atsvc_dissect_JobDel_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_enum_handle, 0); - return offset; + guint32 param=0; + offset=atsvc_dissect_unistr(tvb, offset, pinfo, tree, drep, hf_atsvc_JobDel_servername, param); + return offset; +} +static int +unique_atsvc_dissect_JobDel_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobDel_servername, NDR_POINTER_UNIQUE, "servername", -1); + return offset; } static int -atsvc_dissect_AT_ENUM_array(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - guint8 *drep) +atsvc_dissect_JobDel_min_job_id(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, - atsvc_dissect_AT_ENUM); + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_JobDel_min_job_id, param); + return offset; +} - return offset; +static int +atsvc_dissect_JobDel_max_job_id(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_JobDel_max_job_id, param); + return offset; } -/* - IDL typedef struct { - IDL long EntriesRead; - IDL [size_is(EntriesRead)] [unique] AT_ENUM *first_entry; - IDL } AT_ENUM_CONTAINER; - */ static int -atsvc_dissect_AT_ENUM_CONTAINER(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, - guint8 *drep) +atsvc_dissect_JobDel_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) { - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_num_entries, NULL); + offset=unique_atsvc_dissect_JobDel_servername(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - atsvc_dissect_AT_ENUM_array, NDR_POINTER_UNIQUE, - "AT_ENUM array:", -1); + offset=atsvc_dissect_JobDel_min_job_id(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - return offset; + offset=atsvc_dissect_JobDel_max_job_id(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); + + + return offset; } +static int +atsvc_dissect_JobDel_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +{ + offset=dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_rc, NULL); -/* - IDL long NetrJobEnum( - IDL [in] [unique] [string] wchar_t *Servername, - IDL [in,out] [ref] AT_ENUM_CONTAINER *PointerToBuffer, - IDL [in] long PreferredMaximumLength, - IDL [out] [ref] long *TotalEntries, - IDL [in,out] [unique] long *ResumeHandle - IDL ); - */ + return offset; +} static int -atsvc_dissect_enum_rqst(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +atsvc_dissect_JobEnumInfo_job_id(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "Server", hf_atsvc_server, 0); + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_job_id, param); + return offset; +} - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - atsvc_dissect_AT_ENUM_CONTAINER, - NDR_POINTER_REF, "Job list", -1); +static int +atsvc_dissect_JobEnumInfo_job_time(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_JobTime(tvb, offset, pinfo, tree, drep, hf_atsvc_job_time, param); + return offset; +} - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_pref_max, 0); +static int +atsvc_dissect_JobEnumInfo_days_of_month(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_DaysOfMonth(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnumInfo_days_of_month, param); + return offset; +} - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - atsvc_dissect_ENUM_HANDLE, - NDR_POINTER_UNIQUE, "Enum Handle", -1); +static int +atsvc_dissect_JobEnumInfo_days_of_week(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_DaysOfWeek(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnumInfo_days_of_week, param); + return offset; +} - return offset; +static int +atsvc_dissect_JobEnumInfo_flags(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_Flags(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnumInfo_flags, param); + return offset; } static int -atsvc_dissect_enum_reply(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +atsvc_dissect_JobEnumInfo_command(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - atsvc_dissect_AT_ENUM_CONTAINER, - NDR_POINTER_REF, "Job list", -1); + guint32 param=0; + offset=atsvc_dissect_unistr(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnumInfo_command, param); + return offset; +} - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_total_entries, 0); +static int +unique_atsvc_dissect_JobEnumInfo_command(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobEnumInfo_command, NDR_POINTER_UNIQUE, "command", -1); + return offset; +} - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - atsvc_dissect_ENUM_HANDLE, - NDR_POINTER_UNIQUE, "Enum Handle", -1); - offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, - hf_atsvc_rc, NULL); +int +atsvc_dissect_JobEnumInfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param _U_) +{ + proto_item *item=NULL; + proto_tree *tree=NULL; + int old_offset; - return 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_atsvc_JobEnumInfo); + } + + offset=atsvc_dissect_JobEnumInfo_job_id(tvb, offset, pinfo, tree, drep); + + offset=atsvc_dissect_JobEnumInfo_job_time(tvb, offset, pinfo, tree, drep); + + offset=atsvc_dissect_JobEnumInfo_days_of_month(tvb, offset, pinfo, tree, drep); + + offset=atsvc_dissect_JobEnumInfo_days_of_week(tvb, offset, pinfo, tree, drep); + + offset=atsvc_dissect_JobEnumInfo_flags(tvb, offset, pinfo, tree, drep); + + offset=unique_atsvc_dissect_JobEnumInfo_command(tvb, offset, pinfo, tree, drep); + + proto_item_set_len(item, offset-old_offset); + + return offset; +} +static int +atsvc_dissect_enum_ctr_entries_read(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_enum_ctr_entries_read, param); + return offset; } +static int +atsvc_dissect_enum_ctr_first_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_JobEnumInfo(tvb, offset, pinfo, tree, drep, hf_atsvc_enum_ctr_first_entry, param); + return offset; +} -/* - IDL long NetrJobGetInfo( - IDL [in] [unique] [string] wchar_t *Servername, - IDL [in] long JobId, - IDL [out] [ref] AT_INFO **PointerToBuffer - IDL ); - */ +static int +ucarray_atsvc_dissect_enum_ctr_first_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, atsvc_dissect_enum_ctr_first_entry); + return offset; +} static int -atsvc_dissect_getinfo_rqst(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +unique_ucarray_atsvc_dissect_enum_ctr_first_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "Server", hf_atsvc_server, 0); + offset=dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, ucarray_atsvc_dissect_enum_ctr_first_entry, NDR_POINTER_UNIQUE, "first_entry", -1); + return offset; +} - offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, - hf_atsvc_job_id, NULL); - return offset; +int +atsvc_dissect_enum_ctr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, 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_atsvc_enum_ctr); + } + + offset=atsvc_dissect_enum_ctr_entries_read(tvb, offset, pinfo, tree, drep); + + offset=unique_ucarray_atsvc_dissect_enum_ctr_first_entry(tvb, offset, pinfo, tree, drep); + + proto_item_set_len(item, offset-old_offset); + + return offset; +} +static int +atsvc_dissect_JobEnum_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_unistr(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnum_servername, param); + return offset; } static int -atsvc_dissect_getinfo_reply(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) +unique_atsvc_dissect_JobEnum_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - atsvc_dissect_AT_INFO, NDR_POINTER_UNIQUE, - "Job info", -1); + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobEnum_servername, NDR_POINTER_UNIQUE, "servername", -1); + return offset; +} - offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, - hf_atsvc_rc, NULL); +static int +atsvc_dissect_JobEnum_ctr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_enum_ctr(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnum_ctr, param); + return offset; +} - return offset; +static int +ref_atsvc_dissect_JobEnum_ctr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobEnum_ctr, NDR_POINTER_REF, "ctr", -1); + return offset; } -static dcerpc_sub_dissector dcerpc_atsvc_dissectors[] = { - { ATSVC_JOB_ADD, "NetrJobAdd", atsvc_dissect_add_rqst, atsvc_dissect_add_reply }, - { ATSVC_JOB_DEL, "NetrJobDel", atsvc_dissect_del_rqst, atsvc_dissect_del_reply }, - { ATSVC_JOB_ENUM, "NetrJobEnum", atsvc_dissect_enum_rqst, atsvc_dissect_enum_reply }, - { ATSVC_JOB_GETINFO, "NetrJobGetInfo", atsvc_dissect_getinfo_rqst, atsvc_dissect_getinfo_reply }, - { 0, NULL, NULL, NULL } -}; - -static const value_string atsvc_job_day_of_month[] = { - { 0x00, "n/a" }, - { 0x01, "01" }, - { 0x02, "02" }, - { 0x04, "03" }, - { 0x08, "04" }, - { 0x10, "05" }, - { 0x20, "06" }, - { 0x40, "07" }, - { 0x80, "08" }, - { 0x100, "09" }, - { 0x200, "10" }, - { 0x400, "11" }, - { 0x800, "12" }, - { 0x1000, "13" }, - { 0x2000, "14" }, - { 0x4000, "15" }, - { 0x8000, "16" }, - { 0x10000, "17" }, - { 0x20000, "18" }, - { 0x40000, "19" }, - { 0x80000, "20" }, - { 0x100000, "21" }, - { 0x200000, "22" }, - { 0x400000, "23" }, - { 0x800000, "24" }, - { 0x1000000, "25" }, - { 0x2000000, "26" }, - { 0x4000000, "27" }, - { 0x8000000, "28" }, - { 0x10000000, "29" }, - { 0x20000000, "30" }, - { 0x40000000, "31" }, - { 0, NULL } -}; - - - -static const value_string atsvc_job_day_of_week[] = { - { 0x00, "n/a" }, - { 0x01, "Monday" }, - { 0x02, "Tuesday" }, - { 0x04, "Wednesday" }, - { 0x08, "Thursday" }, - { 0x10, "Friday" }, - { 0x20, "Saturday" }, - { 0x40, "Sunday" }, - { 0, NULL } -}; - -static const true_false_string tfs_job_flags_type = { - "Job runs periodically", - "Job runs once" -}; - -static const true_false_string tfs_job_flags_exec_error = { - "Last job execution FAILED", - "Last job execution was successful" -}; - -static const true_false_string tfs_job_flags_runs_today = { - "Job is scheduled to execute today", - "Job is NOT scheduled to execute today" -}; - -static const true_false_string tfs_job_flags_add_current_date = { - "Job is scheduled relative to current day of month", - "Job is NOT scheduled relative to current day of month" -}; - -static const true_false_string tfs_job_flags_noninteractive = { - "Job is NOT interactive", - "Job is interactive" -}; +static int +atsvc_dissect_JobEnum_preferred_max_len(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnum_preferred_max_len, param); + return offset; +} -void -proto_register_dcerpc_atsvc(void) +static int +atsvc_dissect_JobEnum_total_entries(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnum_total_entries, param); + return offset; +} + +static int +atsvc_dissect_JobEnum_resume_handle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_JobEnum_resume_handle, param); + return offset; +} + +static int +unique_atsvc_dissect_JobEnum_resume_handle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobEnum_resume_handle, NDR_POINTER_UNIQUE, "resume_handle", -1); + return offset; +} + + +static int +atsvc_dissect_JobEnum_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +{ + offset=unique_atsvc_dissect_JobEnum_servername(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); + + offset=ref_atsvc_dissect_JobEnum_ctr(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); + + offset=atsvc_dissect_JobEnum_preferred_max_len(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); + + offset=unique_atsvc_dissect_JobEnum_resume_handle(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - static hf_register_info hf[] = { - { &hf_atsvc_server, - { "Server", "atsvc.server", FT_STRING, BASE_NONE, - NULL, 0x0, "Server Name", HFILL}}, + return offset; +} + +static int +atsvc_dissect_JobEnum_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +{ + offset=ref_atsvc_dissect_JobEnum_ctr(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); + + offset=atsvc_dissect_JobEnum_total_entries(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - { &hf_atsvc_command, - { "Command", "atsvc.command", FT_STRING, BASE_NONE, - NULL, 0x0, "Command to execute", HFILL}}, + offset=unique_atsvc_dissect_JobEnum_resume_handle(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - { &hf_atsvc_opnum, - { "Operation", "atsvc.opnum", FT_UINT16, BASE_DEC, - NULL, 0x0, "Operation", HFILL }}, + offset=dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_rc, NULL); + + + return offset; +} +static int +atsvc_dissect_JobGetInfo_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_unistr(tvb, offset, pinfo, tree, drep, hf_atsvc_JobGetInfo_servername, param); + return offset; +} - {&hf_atsvc_rc, - { "Return code", "atsvc.rc", FT_UINT32, BASE_HEX, - VALS(NT_errors), 0x0, "atsvc status code", HFILL }}, +static int +unique_atsvc_dissect_JobGetInfo_servername(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobGetInfo_servername, NDR_POINTER_UNIQUE, "servername", -1); + return offset; +} - { &hf_atsvc_job_id, - { "Job ID", "atsvc.job_id", FT_UINT32, - BASE_DEC, NULL, 0x0, "Job ID", HFILL}}, +static int +atsvc_dissect_JobGetInfo_job_id(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_job_id, param); + return offset; +} - { &hf_atsvc_job_time, - { "Job time", "atsvc.job_time", FT_UINT32, - BASE_DEC, NULL, 0x0, "Job time", HFILL}}, +static int +atsvc_dissect_JobGetInfo_job_info(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + guint32 param=0; + offset=atsvc_dissect_JobInfo(tvb, offset, pinfo, tree, drep, hf_atsvc_JobGetInfo_job_info, param); + return offset; +} - { &hf_atsvc_job_days_of_month, - { "Job day of the month", "atsvc.job_day_of_month", FT_UINT32, - BASE_DEC, VALS(atsvc_job_day_of_month), 0x0, "Job day of the month", HFILL}}, +static int +unique_atsvc_dissect_JobGetInfo_job_info(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) +{ + offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_JobGetInfo_job_info, NDR_POINTER_UNIQUE, "job_info", -1); + return offset; +} - { &hf_atsvc_job_days_of_week, - { "Job day of the week", "atsvc.job_day_of_week", FT_UINT8, - BASE_DEC, VALS(atsvc_job_day_of_week), 0x0, "Job day of the week", HFILL}}, - { &hf_atsvc_job_flags, - { "Job flags", "atsvc.job_flags", FT_UINT8, - BASE_DEC, NULL, 0x0, "Job flags", HFILL}}, +static int +atsvc_dissect_JobGetInfo_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +{ + offset=unique_atsvc_dissect_JobGetInfo_servername(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - { &hf_atsvc_min_job_id, - { "Min job ID", "atsvc.min_id", FT_UINT32, - BASE_DEC, NULL, 0x0, "Min job ID", HFILL}}, + offset=atsvc_dissect_JobGetInfo_job_id(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - { &hf_atsvc_max_job_id, - { "Max job ID", "atsvc.max_id", FT_UINT32, - BASE_DEC, NULL, 0x0, "Max job ID", HFILL}}, - { &hf_atsvc_job_flags_run_periodically, - { "Job type", "atsvc.jobs.flags.type", FT_BOOLEAN, 8, - TFS(&tfs_job_flags_type), JOB_RUN_PERIODICALLY, "Job type", HFILL }}, + return offset; +} - { &hf_atsvc_job_flags_exec_error, - { "Last job execution status", "atsvc.jobs.flags.exec_error", FT_BOOLEAN, 8, - TFS(&tfs_job_flags_exec_error), JOB_EXEC_ERROR, "Last job execution status", HFILL }}, +static int +atsvc_dissect_JobGetInfo_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_) +{ + offset=unique_atsvc_dissect_JobGetInfo_job_info(tvb, offset, pinfo, tree, drep); + offset=dissect_deferred_pointers(pinfo, tvb, offset, drep); - { &hf_atsvc_job_flags_runs_today, - { "Job schedule", "atsvc.jobs.flags.runs_today", FT_BOOLEAN, 8, - TFS(&tfs_job_flags_runs_today), JOB_RUNS_TODAY, "Job schedule", HFILL }}, + offset=dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_rc, NULL); - { &hf_atsvc_job_flags_add_current_date, - { "Job relative to current day of month", "atsvc.jobs.flags.add_current_date", FT_BOOLEAN, 8, - TFS(&tfs_job_flags_add_current_date), JOB_ADD_CURRENT_DATE, "Job relative to current day of month", HFILL }}, - { &hf_atsvc_job_flags_noninteractive, - { "Job interactive status", "atsvc.jobs.flags.noninteractive", FT_BOOLEAN, 8, - TFS(&tfs_job_flags_noninteractive), JOB_NONINTERACTIVE, "Job interactive status", HFILL }}, + return offset; +} +/* END OF INCLUDED FILE : ETH_CODE */ - { &hf_atsvc_job_enum_hnd, - { "Handle", "atsvc.job.hnd", FT_BYTES, BASE_NONE, NULL, 0x0, "Context handle", HFILL }}, - { &hf_atsvc_jobs_count, - { "Jobs count", "atsvc.jobs_count", FT_UINT32, - BASE_DEC, NULL, 0x0, "Number of jobs", HFILL}}, - { &hf_atsvc_enum_handle, - { "Enumeration handle", "atsvc.enum_hnd", FT_BYTES, - BASE_HEX, NULL, 0x0, "Enumeration Handle", HFILL}}, +void +proto_register_atsvc(void) +{ + static hf_register_info hf[] = { - { &hf_atsvc_pref_max, - { "Preferred max length", "atsvc.pref.max.len", FT_INT32, - BASE_DEC, NULL, 0x0, "Preferred max length", HFILL}}, - { &hf_atsvc_num_entries, - { "Returned entries", "atsvc.num.entries", FT_INT32, - BASE_DEC, NULL, 0x0, "Number of returned entries", HFILL}}, +/* INCLUDED FILE : ETH_HFARR */ + { &hf_atsvc_job_time, + { "JobTime", "atsvc.JobTime", FT_UINT32, BASE_HEX, + NULL, 0, + "Job Time", HFILL }}, + + { &hf_atsvc_job_id, + { "Job ID", "atsvc.JobId", FT_UINT32, BASE_HEX, + NULL, 0, + "Job Id", HFILL }}, + + { &hf_atsvc_opnum, + { "Operation", "atsvc.opnum", FT_UINT16, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_rc, + { "Return code", "atsvc.rc", FT_UINT32, BASE_HEX, + VALS(NT_errors), 0, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_First, + { "First", "atsvc.DaysOfMonth.First", FT_BOOLEAN, 32, + TFS(&First_tfs), 0x00000001, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Second, + { "Second", "atsvc.DaysOfMonth.Second", FT_BOOLEAN, 32, + TFS(&Second_tfs), 0x00000002, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Third, + { "Third", "atsvc.DaysOfMonth.Third", FT_BOOLEAN, 32, + TFS(&Third_tfs), 0x00000004, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Fourth, + { "Fourth", "atsvc.DaysOfMonth.Fourth", FT_BOOLEAN, 32, + TFS(&Fourth_tfs), 0x00000008, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Fifth, + { "Fifth", "atsvc.DaysOfMonth.Fifth", FT_BOOLEAN, 32, + TFS(&Fifth_tfs), 0x00000010, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Sixth, + { "Sixth", "atsvc.DaysOfMonth.Sixth", FT_BOOLEAN, 32, + TFS(&Sixth_tfs), 0x00000020, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Seventh, + { "Seventh", "atsvc.DaysOfMonth.Seventh", FT_BOOLEAN, 32, + TFS(&Seventh_tfs), 0x00000040, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Eight, + { "Eight", "atsvc.DaysOfMonth.Eight", FT_BOOLEAN, 32, + TFS(&Eight_tfs), 0x00000080, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Ninth, + { "Ninth", "atsvc.DaysOfMonth.Ninth", FT_BOOLEAN, 32, + TFS(&Ninth_tfs), 0x00000100, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Tenth, + { "Tenth", "atsvc.DaysOfMonth.Tenth", FT_BOOLEAN, 32, + TFS(&Tenth_tfs), 0x00000200, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Eleventh, + { "Eleventh", "atsvc.DaysOfMonth.Eleventh", FT_BOOLEAN, 32, + TFS(&Eleventh_tfs), 0x00000400, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twelfth, + { "Twelfth", "atsvc.DaysOfMonth.Twelfth", FT_BOOLEAN, 32, + TFS(&Twelfth_tfs), 0x00000800, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Thitteenth, + { "Thitteenth", "atsvc.DaysOfMonth.Thitteenth", FT_BOOLEAN, 32, + TFS(&Thitteenth_tfs), 0x00001000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Fourteenth, + { "Fourteenth", "atsvc.DaysOfMonth.Fourteenth", FT_BOOLEAN, 32, + TFS(&Fourteenth_tfs), 0x00002000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Fifteenth, + { "Fifteenth", "atsvc.DaysOfMonth.Fifteenth", FT_BOOLEAN, 32, + TFS(&Fifteenth_tfs), 0x00004000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Sixteenth, + { "Sixteenth", "atsvc.DaysOfMonth.Sixteenth", FT_BOOLEAN, 32, + TFS(&Sixteenth_tfs), 0x00008000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Seventeenth, + { "Seventeenth", "atsvc.DaysOfMonth.Seventeenth", FT_BOOLEAN, 32, + TFS(&Seventeenth_tfs), 0x00010000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Eighteenth, + { "Eighteenth", "atsvc.DaysOfMonth.Eighteenth", FT_BOOLEAN, 32, + TFS(&Eighteenth_tfs), 0x00020000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Ninteenth, + { "Ninteenth", "atsvc.DaysOfMonth.Ninteenth", FT_BOOLEAN, 32, + TFS(&Ninteenth_tfs), 0x00040000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentyth, + { "Twentyth", "atsvc.DaysOfMonth.Twentyth", FT_BOOLEAN, 32, + TFS(&Twentyth_tfs), 0x00080000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentyfirst, + { "Twentyfirst", "atsvc.DaysOfMonth.Twentyfirst", FT_BOOLEAN, 32, + TFS(&Twentyfirst_tfs), 0x00100000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentysecond, + { "Twentysecond", "atsvc.DaysOfMonth.Twentysecond", FT_BOOLEAN, 32, + TFS(&Twentysecond_tfs), 0x00200000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentythird, + { "Twentythird", "atsvc.DaysOfMonth.Twentythird", FT_BOOLEAN, 32, + TFS(&Twentythird_tfs), 0x00400000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentyfourth, + { "Twentyfourth", "atsvc.DaysOfMonth.Twentyfourth", FT_BOOLEAN, 32, + TFS(&Twentyfourth_tfs), 0x00800000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentyfifth, + { "Twentyfifth", "atsvc.DaysOfMonth.Twentyfifth", FT_BOOLEAN, 32, + TFS(&Twentyfifth_tfs), 0x01000000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentysixth, + { "Twentysixth", "atsvc.DaysOfMonth.Twentysixth", FT_BOOLEAN, 32, + TFS(&Twentysixth_tfs), 0x02000000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentyseventh, + { "Twentyseventh", "atsvc.DaysOfMonth.Twentyseventh", FT_BOOLEAN, 32, + TFS(&Twentyseventh_tfs), 0x04000000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentyeighth, + { "Twentyeighth", "atsvc.DaysOfMonth.Twentyeighth", FT_BOOLEAN, 32, + TFS(&Twentyeighth_tfs), 0x08000000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Twentyninth, + { "Twentyninth", "atsvc.DaysOfMonth.Twentyninth", FT_BOOLEAN, 32, + TFS(&Twentyninth_tfs), 0x10000000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Thirtieth, + { "Thirtieth", "atsvc.DaysOfMonth.Thirtieth", FT_BOOLEAN, 32, + TFS(&Thirtieth_tfs), 0x20000000, + "", HFILL }}, + + { &hf_atsvc_DaysOfMonth_Thirtyfirst, + { "Thirtyfirst", "atsvc.DaysOfMonth.Thirtyfirst", FT_BOOLEAN, 32, + TFS(&Thirtyfirst_tfs), 0x40000000, + "", HFILL }}, + + { &hf_atsvc_DaysOfWeek_Monday, + { "Monday", "atsvc.DaysOfWeek.Monday", FT_BOOLEAN, 8, + TFS(&Monday_tfs), 0x01, + "", HFILL }}, + + { &hf_atsvc_DaysOfWeek_Tuesday, + { "Tuesday", "atsvc.DaysOfWeek.Tuesday", FT_BOOLEAN, 8, + TFS(&Tuesday_tfs), 0x02, + "", HFILL }}, + + { &hf_atsvc_DaysOfWeek_Wednesday, + { "Wednesday", "atsvc.DaysOfWeek.Wednesday", FT_BOOLEAN, 8, + TFS(&Wednesday_tfs), 0x04, + "", HFILL }}, + + { &hf_atsvc_DaysOfWeek_Thursday, + { "Thursday", "atsvc.DaysOfWeek.Thursday", FT_BOOLEAN, 8, + TFS(&Thursday_tfs), 0x08, + "", HFILL }}, + + { &hf_atsvc_DaysOfWeek_Friday, + { "Friday", "atsvc.DaysOfWeek.Friday", FT_BOOLEAN, 8, + TFS(&Friday_tfs), 0x10, + "", HFILL }}, + + { &hf_atsvc_DaysOfWeek_Saturday, + { "Saturday", "atsvc.DaysOfWeek.Saturday", FT_BOOLEAN, 8, + TFS(&Saturday_tfs), 0x20, + "", HFILL }}, + + { &hf_atsvc_DaysOfWeek_Sunday, + { "Sunday", "atsvc.DaysOfWeek.Sunday", FT_BOOLEAN, 8, + TFS(&Sunday_tfs), 0x40, + "", HFILL }}, + + { &hf_atsvc_Flags_JOB_RUN_PERIODICALLY, + { "JOB_RUN_PERIODICALLY", "atsvc.Flags.JOB_RUN_PERIODICALLY", FT_BOOLEAN, 8, + TFS(&JOB_RUN_PERIODICALLY_tfs), 0x01, + "", HFILL }}, + + { &hf_atsvc_Flags_JOB_EXEC_ERROR, + { "JOB_EXEC_ERROR", "atsvc.Flags.JOB_EXEC_ERROR", FT_BOOLEAN, 8, + TFS(&JOB_EXEC_ERROR_tfs), 0x02, + "", HFILL }}, + + { &hf_atsvc_Flags_JOB_RUNS_TODAY, + { "JOB_RUNS_TODAY", "atsvc.Flags.JOB_RUNS_TODAY", FT_BOOLEAN, 8, + TFS(&JOB_RUNS_TODAY_tfs), 0x04, + "", HFILL }}, + + { &hf_atsvc_Flags_JOB_ADD_CURRENT_DATE, + { "JOB_ADD_CURRENT_DATE", "atsvc.Flags.JOB_ADD_CURRENT_DATE", FT_BOOLEAN, 8, + TFS(&JOB_ADD_CURRENT_DATE_tfs), 0x08, + "", HFILL }}, + + { &hf_atsvc_Flags_JOB_NONINTERACTIVE, + { "JOB_NONINTERACTIVE", "atsvc.Flags.JOB_NONINTERACTIVE", FT_BOOLEAN, 8, + TFS(&JOB_NONINTERACTIVE_tfs), 0x10, + "", HFILL }}, + + { &hf_atsvc_JobInfo_days_of_month, + { "days_of_month", "atsvc.JobInfo.days_of_month", FT_UINT32, BASE_HEX, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobInfo_days_of_week, + { "days_of_week", "atsvc.JobInfo.days_of_week", FT_UINT8, BASE_HEX, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobInfo_flags, + { "flags", "atsvc.JobInfo.flags", FT_UINT8, BASE_HEX, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobInfo_command, + { "command", "atsvc.JobInfo.command", FT_STRING, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobAdd_servername, + { "servername", "atsvc.JobAdd.servername", FT_STRING, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobAdd_job_info, + { "job_info", "atsvc.JobAdd.job_info", FT_NONE, BASE_NONE, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobDel_servername, + { "servername", "atsvc.JobDel.servername", FT_STRING, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobDel_min_job_id, + { "min_job_id", "atsvc.JobDel.min_job_id", FT_UINT32, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobDel_max_job_id, + { "max_job_id", "atsvc.JobDel.max_job_id", FT_UINT32, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnumInfo_days_of_month, + { "days_of_month", "atsvc.JobEnumInfo.days_of_month", FT_UINT32, BASE_HEX, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnumInfo_days_of_week, + { "days_of_week", "atsvc.JobEnumInfo.days_of_week", FT_UINT8, BASE_HEX, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnumInfo_flags, + { "flags", "atsvc.JobEnumInfo.flags", FT_UINT8, BASE_HEX, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnumInfo_command, + { "command", "atsvc.JobEnumInfo.command", FT_STRING, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_enum_ctr_entries_read, + { "entries_read", "atsvc.enum_ctr.entries_read", FT_UINT32, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_enum_ctr_first_entry, + { "first_entry", "atsvc.enum_ctr.first_entry", FT_NONE, BASE_NONE, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnum_servername, + { "servername", "atsvc.JobEnum.servername", FT_STRING, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnum_ctr, + { "ctr", "atsvc.JobEnum.ctr", FT_NONE, BASE_NONE, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnum_preferred_max_len, + { "preferred_max_len", "atsvc.JobEnum.preferred_max_len", FT_UINT32, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnum_total_entries, + { "total_entries", "atsvc.JobEnum.total_entries", FT_UINT32, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobEnum_resume_handle, + { "resume_handle", "atsvc.JobEnum.resume_handle", FT_UINT32, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobGetInfo_servername, + { "servername", "atsvc.JobGetInfo.servername", FT_STRING, BASE_DEC, + NULL, 0, + "", HFILL }}, + + { &hf_atsvc_JobGetInfo_job_info, + { "job_info", "atsvc.JobGetInfo.job_info", FT_NONE, BASE_NONE, + NULL, 0, + "", HFILL }}, + +/* END OF INCLUDED FILE : ETH_HFARR */ - { &hf_atsvc_total_entries, - { "Total entries", "atsvc.total.entries", FT_INT32, - BASE_DEC, NULL, 0x0, "Total number of available entries", HFILL}}, }; static gint *ett[] = { - &ett_dcerpc_atsvc, - &ett_dcerpc_atsvc_job, - &ett_dcerpc_atsvc_job_flags - }; - proto_dcerpc_atsvc = proto_register_protocol( - "Microsoft Task Scheduler Service", "ATSVC", "atsvc"); +/* INCLUDED FILE : ETH_ETTARR */ + &ett_atsvc, + &ett_atsvc_DaysOfMonth, + &ett_atsvc_DaysOfWeek, + &ett_atsvc_Flags, + &ett_atsvc_JobInfo, + &ett_atsvc_JobEnumInfo, + &ett_atsvc_enum_ctr, +/* END OF INCLUDED FILE : ETH_ETTARR */ - proto_register_field_array(proto_dcerpc_atsvc, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + }; + proto_atsvc = proto_register_protocol( + "Microsoft Task Scheduler Service", + "ATSVC", "atsvc"); + proto_register_field_array(proto_atsvc, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } +static dcerpc_sub_dissector function_dissectors[] = { + + +/* INCLUDED FILE : ETH_FT */ + { 0, "JobAdd", + atsvc_dissect_JobAdd_request, + atsvc_dissect_JobAdd_response }, + { 1, "JobDel", + atsvc_dissect_JobDel_request, + atsvc_dissect_JobDel_response }, + { 2, "JobEnum", + atsvc_dissect_JobEnum_request, + atsvc_dissect_JobEnum_response }, + { 3, "JobGetInfo", + atsvc_dissect_JobGetInfo_request, + atsvc_dissect_JobGetInfo_response }, +/* END OF INCLUDED FILE : ETH_FT */ + + + { 0, NULL, NULL, NULL }, +}; void -proto_reg_handoff_dcerpc_atsvc(void) +proto_reg_handoff_atsvc(void) { - /* register protocol as dcerpc */ - dcerpc_init_uuid( - proto_dcerpc_atsvc, ett_dcerpc_atsvc, &uuid_dcerpc_atsvc, - ver_dcerpc_atsvc, dcerpc_atsvc_dissectors, hf_atsvc_opnum); + +/* INCLUDED FILE : ETH_HANDOFF */ + dcerpc_init_uuid(proto_atsvc, ett_atsvc, + &uuid_dcerpc_atsvc, ver_atsvc, + function_dissectors, hf_atsvc_opnum); +/* END OF INCLUDED FILE : ETH_HANDOFF */ + + } + diff --git a/epan/dissectors/packet-dcerpc-atsvc.h b/epan/dissectors/packet-dcerpc-atsvc.h index b5e79659be..a569a6c92a 100644 --- a/epan/dissectors/packet-dcerpc-atsvc.h +++ b/epan/dissectors/packet-dcerpc-atsvc.h @@ -1,6 +1,9 @@ +/* DO NOT EDIT + * This dissector is autogenerated + * Autogenerated based on the IDL definitions from samba 4 + */ /* packet-dcerpc-atsvc.h - * Routines for SMB \pipe\atsvc packet disassembly - * Copyright 2003 Jean-Baptiste Marchand <jbm@hsc.fr> + * Routines for ATSVC packet disassembly * * $Id$ * @@ -26,14 +29,17 @@ #ifndef __PACKET_DCERPC_ATSVC_H #define __PACKET_DCERPC_ATSVC_H -/* MSRPC functions available in the atsvc interface */ -#define ATSVC_JOB_ADD 0x00 -#define ATSVC_JOB_DEL 0x01 -#define ATSVC_JOB_ENUM 0x02 -#define ATSVC_JOB_GETINFO 0x03 -#endif /* packet-dcerpc-atsvc.h */ +/* INCLUDED FILE : ETH_HDR */ +int atsvc_dissect_DaysOfMonth(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param); +int atsvc_dissect_DaysOfWeek(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param); +int atsvc_dissect_Flags(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param); +int atsvc_dissect_JobInfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param); +int atsvc_dissect_JobEnumInfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param); +int atsvc_dissect_enum_ctr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param); +/* END OF INCLUDED FILE : ETH_HDR */ +#endif /* packet-dcerpc-atsvc.h */ |