forked from osmocom/wireshark
From Kovarththanan Rajaratnam:
- Fix ncp2222.py and all the epan/dissectors/dcerpc dissectors. The latter required changes to idl2wrs which used variadic macros (not supported in MSVC 6.0). - Cleanup PIDL conformance files svn path=/trunk/; revision=28856
This commit is contained in:
parent
bdfbccf343
commit
e4fea1939c
|
@ -102,9 +102,9 @@ proto_register_drsuapi(void)
|
|||
{
|
||||
static hf_register_info hf[] = {
|
||||
{ &hf_drsuapi_DsReplicaSyncRequest1Info_nc_dn,
|
||||
{ "nc_dn", "drsuapi.DsReplicaSyncRequest1Info.nc_dn", FT_STRING, BASE_DEC,
|
||||
{ "nc_dn", "drsuapi.DsReplicaSyncRequest1Info.nc_dn", FT_STRING, BASE_NONE,
|
||||
NULL, 0,
|
||||
"", HFILL }},
|
||||
NULL, HFILL }},
|
||||
|
||||
ETH_HFARR
|
||||
};
|
||||
|
|
|
@ -65,6 +65,7 @@ TODO
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
FILE *fh, *tfh, *eth_code, *eth_hdr, *eth_hf, *eth_hfarr, *eth_ett, *eth_ettarr, *eth_ft, *eth_handoff;
|
||||
char *uuid=NULL;
|
||||
|
@ -75,13 +76,15 @@ char hf_status[256];
|
|||
int lineno,linepos;
|
||||
char line[1024];
|
||||
|
||||
|
||||
#define FPRINTF(fh, ...) \
|
||||
{\
|
||||
fprintf(stderr, __VA_ARGS__ );\
|
||||
if(fh)fprintf(fh, __VA_ARGS__ );\
|
||||
}
|
||||
|
||||
void FPRINTF(FILE *fh, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vfprintf (stderr, format, args);
|
||||
if (fh)
|
||||
vfprintf (fh, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
typedef struct _pointer_item_t {
|
||||
struct _pointer_item_t *next;
|
||||
|
@ -323,7 +326,10 @@ register_hf_field(char *hf_name, char *title, char *filter_name, char *ft_type,
|
|||
FPRINTF(eth_hfarr, " { &%s,\n", hf_name);
|
||||
FPRINTF(eth_hfarr, " { \"%s\", \"%s\", %s, %s,\n", title, filter_name, ft_type, base_type);
|
||||
FPRINTF(eth_hfarr, " %s, %s,\n", valsstring, mask);
|
||||
FPRINTF(eth_hfarr, " \"%s\", HFILL }},\n", blurb);
|
||||
if (strlen(blurb) > 0)
|
||||
FPRINTF(eth_hfarr, " \"%s\", HFILL }},\n", blurb);
|
||||
else
|
||||
FPRINTF(eth_hfarr, " NULL, HFILL }},\n");
|
||||
FPRINTF(eth_hfarr, "\n");
|
||||
|
||||
return hf_name;
|
||||
|
@ -1112,7 +1118,7 @@ find_type(char *name)
|
|||
FPRINTF(eth_code, " return offset;\n");
|
||||
FPRINTF(eth_code, "}\n");
|
||||
FPRINTF(eth_code, "\n");
|
||||
tmptype=register_new_type("unistr", dissectorname, "FT_STRING", "BASE_DEC", "0", "NULL", 4);
|
||||
tmptype=register_new_type("unistr", dissectorname, "FT_STRING", "BASE_NONE", "0", "NULL", 4);
|
||||
} else if(!strcmp(name,"ascstr")){
|
||||
sprintf(dissectorname, "%s_dissect_%s", ifname, name);
|
||||
FPRINTF(NULL,"\nAutogenerating built-in type:%s\n------------\n",name);
|
||||
|
@ -1124,7 +1130,7 @@ find_type(char *name)
|
|||
FPRINTF(eth_code, " return offset;\n");
|
||||
FPRINTF(eth_code, "}\n");
|
||||
FPRINTF(eth_code, "\n");
|
||||
tmptype=register_new_type("ascstr", dissectorname, "FT_STRING", "BASE_DEC", "0", "NULL", 4);
|
||||
tmptype=register_new_type("ascstr", dissectorname, "FT_STRING", "BASE_NONE", "0", "NULL", 4);
|
||||
} else if(!strcmp(name,"GUID")
|
||||
||!strcmp(name,"uuid_t")){
|
||||
sprintf(dissectorname, "%s_dissect_%s", ifname, name);
|
||||
|
@ -1262,7 +1268,7 @@ find_type(char *name)
|
|||
FPRINTF(eth_code, " return offset;\n");
|
||||
FPRINTF(eth_code, "}\n");
|
||||
FPRINTF(eth_code, "\n");
|
||||
tmptype=register_new_type("time_t", dissectorname, "FT_ABSOLUTE_TIME", "BASE_DEC", "0", "NULL", 4);
|
||||
tmptype=register_new_type("time_t", dissectorname, "FT_ABSOLUTE_TIME", "BASE_NONE", "0", "NULL", 4);
|
||||
} else if(!strcmp(name,"SID")){
|
||||
sprintf(dissectorname, "%s_dissect_%s", ifname, name);
|
||||
FPRINTF(NULL,"\nAutogenerating built-in type:%s\n------------\n",name);
|
||||
|
@ -1278,7 +1284,7 @@ find_type(char *name)
|
|||
FPRINTF(eth_code, " return offset;\n");
|
||||
FPRINTF(eth_code, "}\n");
|
||||
FPRINTF(eth_code, "\n");
|
||||
tmptype=register_new_type("SID", dissectorname, "FT_STRING", "BASE_DEC", "0", "NULL", 4);
|
||||
tmptype=register_new_type("SID", dissectorname, "FT_STRING", "BASE_NONE", "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);
|
||||
|
|
|
@ -894,7 +894,7 @@ class boolean32(uint32):
|
|||
ftype = "FT_BOOLEAN"
|
||||
|
||||
class nstring:
|
||||
pass
|
||||
disp = "BASE_NONE"
|
||||
|
||||
class nstring8(Type, nstring):
|
||||
"""A string of up to (2^8)-1 characters. The first byte
|
||||
|
@ -927,6 +927,7 @@ class fw_string(Type):
|
|||
"""A fixed-width string of n bytes."""
|
||||
|
||||
type = "fw_string"
|
||||
disp = "BASE_NONE"
|
||||
ftype = "FT_STRING"
|
||||
|
||||
def __init__(self, abbrev, descr, bytes):
|
||||
|
@ -937,6 +938,7 @@ class stringz(Type):
|
|||
"NUL-terminated string, with a maximum length"
|
||||
|
||||
type = "stringz"
|
||||
disp = "BASE_NONE"
|
||||
ftype = "FT_STRINGZ"
|
||||
def __init__(self, abbrev, descr):
|
||||
Type.__init__(self, abbrev, descr, PROTO_LENGTH_UNKNOWN)
|
||||
|
@ -994,13 +996,14 @@ class val_string32(val_string):
|
|||
|
||||
class bytes(Type):
|
||||
type = 'bytes'
|
||||
disp = "BASE_NONE"
|
||||
ftype = 'FT_BYTES'
|
||||
|
||||
def __init__(self, abbrev, descr, bytes):
|
||||
Type.__init__(self, abbrev, descr, bytes, NA)
|
||||
|
||||
class nbytes:
|
||||
pass
|
||||
disp = "BASE_NONE"
|
||||
|
||||
class nbytes8(Type, nbytes):
|
||||
"""A series of up to (2^8)-1 bytes. The first byte
|
||||
|
@ -1070,7 +1073,7 @@ class bf_val_str32(bf_val_str, val_string32):
|
|||
bytes = 4
|
||||
|
||||
class bf_boolean:
|
||||
pass
|
||||
disp = "BASE_NONE"
|
||||
|
||||
class bf_boolean8(bf_uint, boolean8, bf_boolean):
|
||||
type = "bf_boolean8"
|
||||
|
@ -8262,7 +8265,7 @@ proto_register_ncp2222(void)
|
|||
# Print the registration code for the hf variables
|
||||
for var in sorted_vars:
|
||||
print "\t{ &%s," % (var.HFName())
|
||||
print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
|
||||
print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, NULL, HFILL }},\n" % \
|
||||
(var.Description(), var.DFilter(),
|
||||
var.WiresharkFType(), var.Display(), var.ValuesName(),
|
||||
var.Mask())
|
||||
|
|
|
@ -2,12 +2,12 @@ HF_FIELD hf_atsvc_job_id "Job Id" "atsvc.job_id" FT_UINT32 BASE_DEC NULL 0 "Iden
|
|||
HF_RENAME hf_atsvc_atsvc_JobAdd_job_id hf_atsvc_job_id
|
||||
HF_RENAME hf_atsvc_atsvc_JobEnumInfo_job_id hf_atsvc_job_id
|
||||
HF_RENAME hf_atsvc_atsvc_JobGetInfo_job_id hf_atsvc_job_id
|
||||
HF_FIELD hf_atsvc_servername "Server" "atsvc.server" FT_STRING BASE_HEX NULL 0 "Name of the server"
|
||||
HF_FIELD hf_atsvc_servername "Server" "atsvc.server" FT_STRING BASE_NONE NULL 0 "Name of the server"
|
||||
HF_RENAME hf_atsvc_atsvc_JobEnum_servername hf_atsvc_servername
|
||||
HF_RENAME hf_atsvc_atsvc_JobDel_servername hf_atsvc_servername
|
||||
HF_RENAME hf_atsvc_atsvc_JobAdd_servername hf_atsvc_servername
|
||||
HF_RENAME hf_atsvc_atsvc_JobGetInfo_servername hf_atsvc_servername
|
||||
HF_FIELD hf_atsvc_job_info "JobInfo" "atcvs.job_info" FT_NONE BASE_HEX NULL 0 "JobInfo structure"
|
||||
HF_FIELD hf_atsvc_job_info "JobInfo" "atcvs.job_info" FT_NONE BASE_NONE NULL 0 "JobInfo structure"
|
||||
HF_RENAME hf_atsvc_atsvc_JobGetInfo_job_info hf_atsvc_job_info
|
||||
HF_RENAME hf_atsvc_atsvc_JobAdd_job_info hf_atsvc_job_info
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ HF_FIELD hf_mapi_MAPI_OPNUM "Opnum" "mapi.EcDoRpc_MAPI_REQ.opnum" FT_UINT8 BASE_
|
|||
HF_RENAME hf_mapi_EcDoRpc_MAPI_REQ_opnum hf_mapi_MAPI_OPNUM
|
||||
|
||||
HF_FIELD hf_mapi_pdu_len "Length" "mapi.pdu.len" FT_UINT16 BASE_HEX NULL 0x0 "Size of the command PDU" HFILL
|
||||
HF_FIELD hf_mapi_decrypted_data "Decrypted data" "mapi.decrypted.data" FT_BYTES BASE_HEX NULL 0x0 "Decrypted data" HFILL
|
||||
HF_FIELD hf_mapi_decrypted_data "Decrypted data" "mapi.decrypted.data" FT_BYTES BASE_NONE NULL 0 "" ""
|
||||
|
||||
NOEMIT SBinary_short
|
||||
NOEMIT MV_LONG_STRUCT
|
||||
|
|
|
@ -8,7 +8,7 @@ MANUAL mapi_dissect_element_EcDoRpc_request__
|
|||
NOEMIT request
|
||||
ETT_FIELD ett_mapi_mapi_request
|
||||
MANUAL mapi_dissect_struct_request
|
||||
HF_FIELD hf_mapi_mapi_request_mapi_req "Mapi Req" "mapi.mapi_request.mapi_req" FT_NONE BASE_HEX NULL 0 "" HFILL
|
||||
HF_FIELD hf_mapi_mapi_request_mapi_req "Mapi Req" "mapi.mapi_request.mapi_req" FT_NONE BASE_NONE NULL 0 "" HFILL
|
||||
|
||||
#
|
||||
# EcDoRpc_MAPI_REQ
|
||||
|
|
|
@ -8,7 +8,7 @@ MANUAL mapi_dissect_element_EcDoRpc_response__
|
|||
NOEMIT response
|
||||
ETT_FIELD ett_mapi_mapi_response
|
||||
MANUAL mapi_dissect_struct_response
|
||||
HF_FIELD hf_mapi_mapi_response_mapi_repl "Mapi Repl" "mapi.mapi_response.mapi_repl" FT_NONE BASE_HEX NULL 0 "" HFILL
|
||||
HF_FIELD hf_mapi_mapi_response_mapi_repl "Mapi Repl" "mapi.mapi_response.mapi_repl" FT_NONE BASE_NONE NULL 0 "" HFILL
|
||||
|
||||
#
|
||||
# EcDoRpc_MAPI_REPL
|
||||
|
|
Loading…
Reference in New Issue