diff options
Diffstat (limited to 'epan/dissectors/dcerpc')
-rw-r--r-- | epan/dissectors/dcerpc/drsuapi/drsuapi.idl | 9 | ||||
-rw-r--r-- | epan/dissectors/dcerpc/idl2eth.c | 46 |
2 files changed, 49 insertions, 6 deletions
diff --git a/epan/dissectors/dcerpc/drsuapi/drsuapi.idl b/epan/dissectors/dcerpc/drsuapi/drsuapi.idl index e4e5799f9e..e76f9249e3 100644 --- a/epan/dissectors/dcerpc/drsuapi/drsuapi.idl +++ b/epan/dissectors/dcerpc/drsuapi/drsuapi.idl @@ -451,8 +451,7 @@ interface drsuapi } drsuapi_DsWriteAccountSpnRequest; typedef struct { -# WERROR status; - uint32 status; + WERROR status; } drsuapi_DsWriteAccountSpnResult1; typedef [switch_type(int32)] union { @@ -625,8 +624,7 @@ interface drsuapi hyper highest_usn; NTTIME last_success; NTTIME last_attempt; -# WERROR result_last_attempt; - uint32 result_last_attempt; + WERROR result_last_attempt; uint32 consecutive_sync_failures; } drsuapi_DsReplicaNeighbour; @@ -662,8 +660,7 @@ interface drsuapi GUID dsa_obj_guid; NTTIME first_failure; uint32 num_failures; -# WERROR last_result; - uint32 last_result; + WERROR last_result; } drsuapi_DsReplicaKccDsaFailure; typedef struct { diff --git a/epan/dissectors/dcerpc/idl2eth.c b/epan/dissectors/dcerpc/idl2eth.c index 4b050c8ac4..187326416e 100644 --- a/epan/dissectors/dcerpc/idl2eth.c +++ b/epan/dissectors/dcerpc/idl2eth.c @@ -13,6 +13,38 @@ TODO add code to verify that union tag length is correct */ +/* List of built in types : + WERROR A 32 bit integer holding a DCE/NT status code. + + uint8 A 8 bit integer + int8 + + uint16 A 16 bit integer + int16 + + uint32 A 32 bit integer + int32 + + uint64 A 64 bit integer + + udlong A 64 bit integer aligned on 4 byte boundary + dlong + + time_t A 32 bit integer holding a unix style time_t + + + + bool8 + + unistr + ascstr + GUID + uuid_t + policy_handle + NTTIME + NTTIME_hyper +*/ + /* All field dissectors that call a normal type (i.e. not a pointer, not an array) has a local variable guint param declared which is passed on to the @@ -1197,6 +1229,20 @@ find_type(char *name) FPRINTF(eth_code, "}\n"); FPRINTF(eth_code, "\n"); tmptype=register_new_type("time_t", dissectorname, "FT_ABSOLUTE_TIME", "BASE_DEC", "0", "NULL", 4); + } else if(!strcmp(name,"WERROR")){ + sprintf(dissectorname, "%s_dissect_%s", ifname, name); + FPRINTF(NULL,"\nAutogenerating built-in type:%s\n------------\n",name); + FPRINTF(eth_code, "\n"); + FPRINTF(eth_code, "static int\n"); + FPRINTF(eth_code, "%s(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param _U_)\n", dissectorname); + FPRINTF(eth_code, "{\n"); + FPRINTF(eth_code, " \n"); + FPRINTF(eth_code, " offset=dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, NULL);\n"); + FPRINTF(eth_code, "\n"); + FPRINTF(eth_code, " return offset;\n"); + FPRINTF(eth_code, "}\n"); + FPRINTF(eth_code, "\n"); + tmptype=register_new_type("WERROR", dissectorname, "FT_UINT32", "BASE_DEC", "0", "VALS(NT_errors)", 4); } } |