aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lpd.c
diff options
context:
space:
mode:
authorDavid Perry <boolean263@protonmail.com>2022-08-19 22:53:58 +0000
committerAndersBroman <a.broman58@gmail.com>2022-08-19 22:53:58 +0000
commitd0c8efe8890fb1e45529f784753725caebf71ae8 (patch)
treea9a6d9d12f69dff32e6e583dd30f7b2456cb4a93 /epan/dissectors/packet-lpd.c
parentb809e73f7c7976040e7982efed8154e837808f34 (diff)
Use `register_dissector()` for more protocols
Diffstat (limited to 'epan/dissectors/packet-lpd.c')
-rw-r--r--epan/dissectors/packet-lpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-lpd.c b/epan/dissectors/packet-lpd.c
index 2cf16025bb..f6065eb14b 100644
--- a/epan/dissectors/packet-lpd.c
+++ b/epan/dissectors/packet-lpd.c
@@ -16,6 +16,8 @@
void proto_register_lpd(void);
void proto_reg_handoff_lpd(void);
+static dissector_handle_t lpd_handle;
+
#define TCP_PORT_PRINTER 515
static int proto_lpd = -1;
@@ -176,6 +178,7 @@ proto_register_lpd(void)
};
proto_lpd = proto_register_protocol("Line Printer Daemon Protocol", "LPD", "lpd");
+ lpd_handle = register_dissector("lpd", dissect_lpd, proto_lpd);
proto_register_field_array(proto_lpd, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@@ -183,9 +186,6 @@ proto_register_lpd(void)
void
proto_reg_handoff_lpd(void)
{
- dissector_handle_t lpd_handle;
-
- lpd_handle = create_dissector_handle(dissect_lpd, proto_lpd);
dissector_add_uint_with_preference("tcp.port", TCP_PORT_PRINTER, lpd_handle);
}