X-Git-Url: http://git.samba.org/samba.git/?p=obnox%2Fwireshark%2Fwip.git;a=blobdiff_plain;f=docbook%2Fwsdg_src%2FWSDG_chapter_dissection.xml;h=69d229a0d00ff1bcac11c629147d7e7d4c32bf3d;hp=0389508b43e47af21ee06db605b9a3ca77363c6c;hb=b162016c17e2624f7ff2f57e8020e72a618a8070;hpb=195c06d6ea33ed296a01886671812dd67c619580 diff --git a/docbook/wsdg_src/WSDG_chapter_dissection.xml b/docbook/wsdg_src/WSDG_chapter_dissection.xml index 0389508b43..69d229a0d0 100644 --- a/docbook/wsdg_src/WSDG_chapter_dissection.xml +++ b/docbook/wsdg_src/WSDG_chapter_dissection.xml @@ -536,9 +536,10 @@ static const value_string packettypenames[] = { @@ -558,19 +559,22 @@ static int hf_foo_endflag = -1; static int hf_foo_priorityflag = -1; ... { &hf_foo_startflag, - { "FOO PDU Start Flags", "foo.flags.start", - FT_BOOLEAN, 8, NULL, FOO_START_FLAG, - "", HFILL } + { "FOO PDU Start Flags", "foo.flags.start", + FT_BOOLEAN, 8, + NULL, FOO_START_FLAG, + NULL, HFILL } }, { &hf_foo_endflag, - { "FOO PDU End Flags", "foo.flags.end", - FT_BOOLEAN, 8, NULL, FOO_END_FLAG, - "", HFILL } + { "FOO PDU End Flags", "foo.flags.end", + FT_BOOLEAN, 8, + NULL, FOO_END_FLAG, + NULL, HFILL } }, { &hf_foo_priorityflag, - { "FOO PDU Priority Flags", "foo.flags.priority", - FT_BOOLEAN, 8, NULL, FOO_PRIORITY_FLAG, - "", HFILL } + { "FOO PDU Priority Flags", "foo.flags.priority", + FT_BOOLEAN, 8, + NULL, FOO_PRIORITY_FLAG, + NULL, HFILL } }, ... proto_tree_add_item(foo_tree, hf_foo_flags, tvb, offset, 1, FALSE); @@ -678,7 +682,6 @@ dissect_foo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_real_data(decompressed_buffer, orig_size, orig_size); tvb_set_child_real_data_tvbuff(tvb, next_tvb); add_new_data_source(pinfo, next_tvb, "Decompressed Data"); - tvb_set_free_cb(next_tvb, g_free); } else { next_tvb = tvb_new_subset(tvb, offset, -1, -1); } @@ -1038,7 +1041,7 @@ static void dissect_foo_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t } /* determine PDU length of protocol foo */ -static guint get_foo_message_len(tvbuff_t *tvb, int offset) +static guint get_foo_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset) { /* TODO: change this to your needs */ return (guint)tvb_get_ntohl(tvb, offset+4); /* e.g. length is at offset 4 */