diff options
Diffstat (limited to 'epan/dissectors/packet-lsd.c')
-rw-r--r-- | epan/dissectors/packet-lsd.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/epan/dissectors/packet-lsd.c b/epan/dissectors/packet-lsd.c index ce5b405e85..72968fe36a 100644 --- a/epan/dissectors/packet-lsd.c +++ b/epan/dissectors/packet-lsd.c @@ -14,6 +14,7 @@ #include <epan/packet.h> #include <epan/expert.h> +#include <epan/strutil.h> #include <wsutil/pint.h> #include <wsutil/strtoi.h> @@ -23,16 +24,16 @@ void proto_reg_handoff_lsd(void); #define LSD_MULTICAST_ADDRESS 0xEFC0988F /* 239.192.152.143 */ #define LSD_PORT 6771 -static int proto_lsd = -1; -static int hf_lsd_header = -1; -static int hf_lsd_host = -1; -static int hf_lsd_port = -1; -static int hf_lsd_infohash = -1; -static int hf_lsd_cookie = -1; +static int proto_lsd; +static int hf_lsd_header; +static int hf_lsd_host; +static int hf_lsd_port; +static int hf_lsd_infohash; +static int hf_lsd_cookie; -static gint ett_lsd = -1; +static gint ett_lsd; -static expert_field ei_lsd_field = EI_INIT; +static expert_field ei_lsd_field; static gboolean parse_string_field(proto_tree *tree, int hf, packet_info *pinfo, tvbuff_t *tvb, int offset, int* next_offset, int* linelen) @@ -87,7 +88,7 @@ dissect_lsd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) ti = proto_tree_add_item(tree, proto_lsd, tvb, 0, -1, ENC_NA); lsd_tree = proto_item_add_subtree(ti, ett_lsd); - proto_tree_add_item(lsd_tree, hf_lsd_header, tvb, offset, linelen, ENC_ASCII|ENC_NA); + proto_tree_add_item(lsd_tree, hf_lsd_header, tvb, offset, linelen, ENC_ASCII); offset = next_offset; if (!parse_string_field(lsd_tree, hf_lsd_host, pinfo, tvb, offset, &next_offset, &linelen)) @@ -123,7 +124,7 @@ dissect_lsd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE); if (linelen < 0) return offset+linelen; - /* Cookie is optionnal */ + /* Cookie is optional */ if (tvb_strncaseeql(tvb, offset, "cookie", strlen("cookie")) == 0) { if (!parse_string_field(lsd_tree, hf_lsd_cookie, pinfo, tvb, offset, &next_offset, &linelen)) |