diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-03 07:53:48 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-03 07:53:48 +0000 |
commit | 3613c121fe53a2bcd70a3004a589bc38ecc2864d (patch) | |
tree | 8b8fd854a5439a0fff7bcda55cebf9e519245b3c /packet-ldp.c | |
parent | fee98dd94462787123ec7fa0d660044a4b1800c4 (diff) |
Add a new "prefs_register_protocol()" routine, which is like
"prefs_register_module()" except that it takes a protocol index as
returned by "proto_register_protocol()" as its first argument, rather
than taking two character strings as arguments as its first two
arguments, and uses the protocol's abbreviation as the name to use for
preferences in the preferences file and the "-o" flag and uses the
protocol's short name as the name to use in the tabs in the
"Edit->Preferences" window.
svn path=/trunk/; revision=2812
Diffstat (limited to 'packet-ldp.c')
-rw-r--r-- | packet-ldp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packet-ldp.c b/packet-ldp.c index ac73c02a19..4f0228e222 100644 --- a/packet-ldp.c +++ b/packet-ldp.c @@ -1,7 +1,7 @@ /* packet-ldp.c * Routines for ldp packet disassembly * - * $Id: packet-ldp.c,v 1.11 2001/01/03 06:55:29 guy Exp $ + * $Id: packet-ldp.c,v 1.12 2001/01/03 07:53:43 guy Exp $ * * Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com> * @@ -789,9 +789,15 @@ proto_register_ldp(void) }; module_t *ldp_module; + proto_ldp = proto_register_protocol("Label Distribution Protocol", + "LDP", "ldp"); + + proto_register_field_array(proto_ldp, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + /* Register our configuration options for , particularly our port */ - ldp_module = prefs_register_module("ldp", "LDP", proto_reg_handoff_ldp); + ldp_module = prefs_register_protocol(proto_ldp, proto_reg_handoff_ldp); prefs_register_uint_preference(ldp_module, "tcp.port", "LDP TCP Port", "Set the port for messages (if other" @@ -803,12 +809,6 @@ proto_register_ldp(void) " than the default of 646)", 10, &global_ldp_udp_port); - proto_ldp = proto_register_protocol("Label Distribution Protocol", - "LDP", "ldp"); - - proto_register_field_array(proto_ldp, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - } /* The registration hand-off routine */ |