diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
commit | a86c5f7cae7ec9a3398300555a0b644689d946a1 (patch) | |
tree | 39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-lpd.c | |
parent | Releasing progress-linux version 4.2.6-1~progress7.99u1. (diff) | |
download | wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-lpd.c')
-rw-r--r-- | epan/dissectors/packet-lpd.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/epan/dissectors/packet-lpd.c b/epan/dissectors/packet-lpd.c index f6065eb1..ce056377 100644 --- a/epan/dissectors/packet-lpd.c +++ b/epan/dissectors/packet-lpd.c @@ -20,18 +20,18 @@ static dissector_handle_t lpd_handle; #define TCP_PORT_PRINTER 515 -static int proto_lpd = -1; -static int hf_lpd_response = -1; -static int hf_lpd_request = -1; -static int hf_lpd_client_code = -1; -static int hf_lpd_printer_option = -1; -static int hf_lpd_response_code = -1; +static int proto_lpd; +static int hf_lpd_response; +static int hf_lpd_request; +static int hf_lpd_client_code; +static int hf_lpd_printer_option; +static int hf_lpd_response_code; -static gint ett_lpd = -1; +static int ett_lpd; enum lpr_type { request, response, unknown }; -static gint find_printer_string(tvbuff_t *tvb, int offset); +static int find_printer_string(tvbuff_t *tvb, int offset); /* This information comes from the LPRng HOWTO, which also describes RFC 1179. http://www.astart.com/lprng/LPRng-HOWTO.html */ @@ -61,14 +61,14 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) proto_tree *lpd_tree; proto_item *ti, *hidden_item; enum lpr_type lpr_packet_type; - guint8 code; - gint printer_len; + uint8_t code; + int printer_len; col_set_str(pinfo->cinfo, COL_PROTOCOL, "LPD"); col_clear(pinfo->cinfo, COL_INFO); /* rfc1179 states that all responses are 1 byte long */ - code = tvb_get_guint8(tvb, 0); + code = tvb_get_uint8(tvb, 0); if (tvb_reported_length(tvb) == 1) { lpr_packet_type = response; } @@ -94,10 +94,10 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) if (lpr_packet_type == response) { hidden_item = proto_tree_add_boolean(lpd_tree, hf_lpd_response, - tvb, 0, 0, TRUE); + tvb, 0, 0, true); } else { hidden_item = proto_tree_add_boolean(lpd_tree, hf_lpd_request, - tvb, 0, 0, TRUE); + tvb, 0, 0, true); } proto_item_set_hidden(hidden_item); @@ -129,15 +129,15 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) } -static gint +static int find_printer_string(tvbuff_t *tvb, int offset) { int i; /* try to find end of string, either '\n' or '\0' */ - i = tvb_find_guint8(tvb, offset, -1, '\0'); + i = tvb_find_uint8(tvb, offset, -1, '\0'); if (i == -1) - i = tvb_find_guint8(tvb, offset, -1, '\n'); + i = tvb_find_uint8(tvb, offset, -1, '\n'); if (i == -1) return -1; return i - offset; /* length of string */ @@ -151,12 +151,12 @@ proto_register_lpd(void) { &hf_lpd_response, { "Response", "lpd.response", FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "TRUE if LPD response", HFILL }}, + "true if LPD response", HFILL }}, { &hf_lpd_request, { "Request", "lpd.request", FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "TRUE if LPD request", HFILL }}, + "true if LPD request", HFILL }}, { &hf_lpd_client_code, { "Client code", "lpd.client_code", @@ -173,7 +173,7 @@ proto_register_lpd(void) FT_UINT8, BASE_DEC, VALS(lpd_server_code), 0x0, NULL, HFILL }}, }; - static gint *ett[] = { + static int *ett[] = { &ett_lpd, }; |