diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-03-14 20:51:13 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-03-14 20:51:13 +0000 |
commit | 1fe0f9022eb0aba54b89a6c4f280f9f7f1071705 (patch) | |
tree | dfce12023675e300ec058a9592573c0af52ec2af /epan/dissectors/dcerpc | |
parent | e7a72ba624ab12a714fe272bf6992d8b41355e4d (diff) |
a lot of people dont specify top level pointers in teh idl and just
cerlare it as a parameter that is a struct/union and not a ref pointer to one.
this is ok since toplevel ref pointers are invisible in the wire encoding anyway.
unfortunatelky ethereal dce runtime needed to see that pointer to keep track of whisch one was a toplevel and which one wasnt.
implement a new api to call pointers which explicitely specifies whether the pointer is toplevel or embedded.
eventually all dce dissectors will use this new interface and the generic dissect_ndr_pointer() can be retired.
svn path=/trunk/; revision=13755
Diffstat (limited to 'epan/dissectors/dcerpc')
-rw-r--r-- | epan/dissectors/dcerpc/drsuapi/drsuapi.idl | 2 | ||||
-rw-r--r-- | epan/dissectors/dcerpc/idl2eth.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/epan/dissectors/dcerpc/drsuapi/drsuapi.idl b/epan/dissectors/dcerpc/drsuapi/drsuapi.idl index ac5df73d16..e4e5799f9e 100644 --- a/epan/dissectors/dcerpc/drsuapi/drsuapi.idl +++ b/epan/dissectors/dcerpc/drsuapi/drsuapi.idl @@ -277,7 +277,7 @@ interface drsuapi WERROR drsuapi_DsGetNCChanges( [in,ref] policy_handle *bind_handle, [in,out] int32 level, - [in,switch_is(level),ref] drsuapi_DsGetNCChangesRequest *req, + [in,switch_is(level)] drsuapi_DsGetNCChangesRequest req, [out,switch_is(level)] drsuapi_DsGetNCChangesCtr ctr ); diff --git a/epan/dissectors/dcerpc/idl2eth.c b/epan/dissectors/dcerpc/idl2eth.c index d79b96be0d..4b050c8ac4 100644 --- a/epan/dissectors/dcerpc/idl2eth.c +++ b/epan/dissectors/dcerpc/idl2eth.c @@ -1536,7 +1536,7 @@ void parsetypedefstruct(int pass) FPRINTF(eth_code, "static int\n"); FPRINTF(eth_code, "%s(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)\n", tmpstr); FPRINTF(eth_code, "{\n"); - FPRINTF(eth_code, " offset=dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, %s, %s, \"%s\", -1);\n", ptmpstr, ptr_to_define(pointer_type), field_name); + FPRINTF(eth_code, " offset=dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, %s, %s, \"%s\", -1);\n", ptmpstr, ptr_to_define(pointer_type), field_name); FPRINTF(eth_code, " return offset;\n"); FPRINTF(eth_code, "}\n"); FPRINTF(eth_code, "\n"); @@ -1630,7 +1630,7 @@ void parsetypedefstruct(int pass) FPRINTF(eth_code, "static int\n"); FPRINTF(eth_code, "%s(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)\n", tmpstr); FPRINTF(eth_code, "{\n"); - FPRINTF(eth_code, " offset=dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, %s, %s, \"%s\", -1);\n", ptmpstr, ptr_to_define(pointer_type), field_name); + FPRINTF(eth_code, " offset=dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, %s, %s, \"%s\", -1);\n", ptmpstr, ptr_to_define(pointer_type), field_name); FPRINTF(eth_code, " return offset;\n"); FPRINTF(eth_code, "}\n"); FPRINTF(eth_code, "\n"); @@ -2203,7 +2203,7 @@ void parsetypedefunion(int pass) FPRINTF(eth_code, "static int\n"); FPRINTF(eth_code, "%s(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)\n", tmpstr); FPRINTF(eth_code, "{\n"); - FPRINTF(eth_code, " offset=dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, %s, NDR_POINTER_UNIQUE, \"%s\", -1);\n", ptmpstr, ti->str); + FPRINTF(eth_code, " offset=dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, %s, NDR_POINTER_UNIQUE, \"%s\", -1);\n", ptmpstr, ti->str); FPRINTF(eth_code, " return offset;\n"); FPRINTF(eth_code, "}\n"); FPRINTF(eth_code, "\n"); @@ -2481,7 +2481,7 @@ void parsefunction(int pass) FPRINTF(eth_code, "static int\n"); FPRINTF(eth_code, "%s(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)\n", tmpstr); FPRINTF(eth_code, "{\n"); - FPRINTF(eth_code, " offset=dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, %s, %s, \"%s\", -1);\n", ptmpstr, ptr_to_define(pointer_type), ti->str); + FPRINTF(eth_code, " offset=dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, %s, %s, \"%s\", -1);\n", ptmpstr, ptr_to_define(pointer_type), ti->str); FPRINTF(eth_code, " return offset;\n"); FPRINTF(eth_code, "}\n"); FPRINTF(eth_code, "\n"); @@ -2523,10 +2523,12 @@ void parsefunction(int pass) if((pass==1)&&(bi->flags&BI_IN)){ FPRINTF(eth_code, " offset=%s(tvb, offset, pinfo, tree, drep);\n", ptmpstr); + FPRINTF(eth_code, " offset=dissect_deferred_pointers(pinfo, tvb, offset, drep);\n"); FPRINTF(eth_code, "\n"); } if((pass==2)&&(bi->flags&BI_OUT)){ FPRINTF(eth_code, " offset=%s(tvb, offset, pinfo, tree, drep);\n", ptmpstr); + FPRINTF(eth_code, " offset=dissect_deferred_pointers(pinfo, tvb, offset, drep);\n"); FPRINTF(eth_code, "\n"); } } |