From 73c291029d9b8e7412548405b051827708aedc4f Mon Sep 17 00:00:00 2001 From: John Thacker Date: Thu, 3 Nov 2022 20:55:05 -0400 Subject: [PATCH] skinny: Resync xml code with dissector, regenerate Make changes to packet-skinny.c.in and SkinnyProtocolOptimized.xml that incorporate changes from 67f05835cac0a26636a7e04739a4cc0dd225c077 and 8efad466c4e62b0371659c8fd1d909038c36da27 made to the dissector manually and regenerate. Also fix a case where a comment mixed tabs and spaces, which caused the python conversion tool to complain. --- epan/dissectors/packet-skinny.c | 6 +++--- epan/dissectors/packet-skinny.c.in | 8 ++++---- tools/SkinnyProtocolOptimized.xml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c index cf95caabf2..98e38ae558 100644 --- a/epan/dissectors/packet-skinny.c +++ b/epan/dissectors/packet-skinny.c @@ -21,7 +21,7 @@ */ /* - * Generated Automatically Using (from wireshark base directory): + * Generated automatically Using (from wireshark base directory): * cog.py -D xmlfile=tools/SkinnyProtocolOptimized.xml -d -c -o epan/dissectors/packet-skinny.c epan/dissectors/packet-skinny.c.in */ @@ -2251,7 +2251,7 @@ dissect_skinny_xml(ptvcursor_t *cursor, int hfindex, packet_info *pinfo, guint32 length = maxlength; } - ptvcursor_add_no_advance(cursor, hfindex, length, ENC_ASCII|ENC_NA); + ptvcursor_add_no_advance(cursor, hfindex, length, ENC_ASCII); item = proto_tree_add_item(tree, hf_skinny_xmlData, tvb, offset, length, ENC_ASCII); subtree = proto_item_add_subtree(item, 0); @@ -2337,7 +2337,7 @@ dissect_skinny_displayLabel(ptvcursor_t *cursor, packet_info *pinfo, int hfindex } } - item = proto_tree_add_item(tree, hfindex, tvb, offset, length, ENC_ASCII | ENC_NA); + item = proto_tree_add_item(tree, hfindex, tvb, offset, length, ENC_ASCII); wmem_new = wmem_strbuf_sized_new(pinfo->pool, length + 1, 0); disp_string = (gchar*) wmem_alloc(pinfo->pool, length + 1); diff --git a/epan/dissectors/packet-skinny.c.in b/epan/dissectors/packet-skinny.c.in index 30bcf4bca7..9316abe3e2 100644 --- a/epan/dissectors/packet-skinny.c.in +++ b/epan/dissectors/packet-skinny.c.in @@ -210,7 +210,7 @@ dissect_skinny_xml(ptvcursor_t *cursor, int hfindex, packet_info *pinfo, guint32 length = maxlength; } - ptvcursor_add_no_advance(cursor, hfindex, length, ENC_ASCII|ENC_NA); + ptvcursor_add_no_advance(cursor, hfindex, length, ENC_ASCII); item = proto_tree_add_item(tree, hf_skinny_xmlData, tvb, offset, length, ENC_ASCII); subtree = proto_item_add_subtree(item, 0); @@ -296,7 +296,7 @@ dissect_skinny_displayLabel(ptvcursor_t *cursor, packet_info *pinfo, int hfindex } } - item = proto_tree_add_item(tree, hfindex, tvb, offset, length, ENC_ASCII | ENC_NA); + item = proto_tree_add_item(tree, hfindex, tvb, offset, length, ENC_ASCII); wmem_new = wmem_strbuf_sized_new(pinfo->pool, length + 1, 0); disp_string = (gchar*) wmem_alloc(pinfo->pool, length + 1); @@ -410,9 +410,9 @@ cog.out('static const skinny_opcode_map_t skinny_opcode_map[] = {\n') for message in skinny.message: msg_type = "SKINNY_MSGTYPE_EVENT" if message.msgtype == "request": - msg_type = "SKINNY_MSGTYPE_REQUEST" + msg_type = "SKINNY_MSGTYPE_REQUEST" if message.msgtype == "response" and message.request is not None: - msg_type = "SKINNY_MSGTYPE_RESPONSE" + msg_type = "SKINNY_MSGTYPE_RESPONSE" cog.out(' {%-6s, %-47s, %-24s, "%s"},\n' %(message.opcode, message.gen_handler(), msg_type, message.name)) cog.out('};\n') ]]]*/ diff --git a/tools/SkinnyProtocolOptimized.xml b/tools/SkinnyProtocolOptimized.xml index 8bf53d3e1f..5e4bd7315e 100644 --- a/tools/SkinnyProtocolOptimized.xml +++ b/tools/SkinnyProtocolOptimized.xml @@ -846,12 +846,12 @@ - + - +