Make some prefs callback functions static. (These modules don't use proto_reg_handoff_*() as their prefs callback.)

svn path=/trunk/; revision=35138
This commit is contained in:
Jeff Morriss 2010-12-06 22:08:48 +00:00
parent c0565d8936
commit f2fc5d42fd
16 changed files with 142 additions and 110 deletions

View File

@ -48,7 +48,7 @@
#include "packet-dap.h"
#include <epan/strutil.h>
/* we don't have a separate dissector for X519 -
/* we don't have a separate dissector for X519 -
most of DAP is defined in X511 */
#define PNAME "X.519 Directory Access Protocol"
#define PSNAME "DAP"
@ -56,7 +56,7 @@
static guint global_dap_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_dap(void); /* forward declaration for use in preferences registration */
static void prefs_register_dap(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -134,9 +134,9 @@ void proto_reg_handoff_dap(void) {
oid_add_from_string("id-ac-directory-access","2.5.3.1");
/* ABSTRACT SYNTAXES */
/* Register DAP with ROS (with no use of RTSE) */
register_ros_protocol_info("2.5.9.1", &dap_ros_info, 0, "id-as-directory-access", FALSE);
register_ros_protocol_info("2.5.9.1", &dap_ros_info, 0, "id-as-directory-access", FALSE);
register_idmp_protocol_info("2.5.33.0", &dap_ros_info, 0, "dap-ip");
@ -154,7 +154,9 @@ void proto_reg_handoff_dap(void) {
}
void prefs_register_dap(void) {
static void
prefs_register_dap(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -49,7 +49,7 @@
#include "packet-disp.h"
/* we don't have a separate dissector for X519 -
/* we don't have a separate dissector for X519 -
and most of DISP is defined in X525 */
#define PNAME "X.519 Directory Information Shadowing Protocol"
#define PSNAME "DISP"
@ -57,7 +57,7 @@
static guint global_disp_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_disp(void); /* forward declaration for use in preferences registration */
static void prefs_register_disp(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -94,7 +94,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -246,9 +246,9 @@ void proto_reg_handoff_disp(void) {
disp_handle = find_dissector("disp");
register_ros_oid_dissector_handle("2.5.9.3", disp_handle, 0, "id-as-directory-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.5", disp_handle, 0, "id-as-directory-reliable-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.6", disp_handle, 0, "id-as-directory-reliable-binding", FALSE);
register_ros_oid_dissector_handle("2.5.9.3", disp_handle, 0, "id-as-directory-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.5", disp_handle, 0, "id-as-directory-reliable-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.6", disp_handle, 0, "id-as-directory-reliable-binding", FALSE);
/* OPERATIONAL BINDING */
oid_add_from_string("id-op-binding-shadow","2.5.1.0.5.1");
@ -261,7 +261,9 @@ void proto_reg_handoff_disp(void) {
}
void prefs_register_disp(void) {
static void
prefs_register_disp(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -54,7 +54,7 @@
static guint global_dop_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_dop(void); /* forward declaration for use in preferences registration */
static void prefs_register_dop(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
static int proto_dop = -1;
@ -132,7 +132,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -277,16 +277,16 @@ void proto_register_dop(void) {
void proto_reg_handoff_dop(void) {
dissector_handle_t dop_handle;
#include "packet-dop-dis-tab.c"
#include "packet-dop-dis-tab.c"
/* APPLICATION CONTEXT */
oid_add_from_string("id-ac-directory-operational-binding-management","2.5.3.3");
/* ABSTRACT SYNTAXES */
/* Register DOP with ROS (with no use of RTSE) */
dop_handle = find_dissector("dop");
register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", FALSE);
register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", FALSE);
/* BINDING TYPES */
@ -316,7 +316,9 @@ void proto_reg_handoff_dop(void) {
}
void prefs_register_dop(void) {
static void
prefs_register_dop(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -51,7 +51,7 @@
static guint global_dsp_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_dsp(void); /* forward declaration for use in preferences registration */
static void prefs_register_dsp(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -88,7 +88,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -306,24 +306,26 @@ void proto_register_dsp(void) {
void proto_reg_handoff_dsp(void) {
dissector_handle_t dsp_handle;
#include "packet-dsp-dis-tab.c"
#include "packet-dsp-dis-tab.c"
/* APPLICATION CONTEXT */
oid_add_from_string("id-ac-directory-system","2.5.3.2");
/* ABSTRACT SYNTAXES */
/* remember the tpkt handler for change in preferences */
tpkt_handle = find_dissector("tpkt");
/* Register DSP with ROS (with no use of RTSE) */
dsp_handle = find_dissector("dsp");
register_ros_oid_dissector_handle("2.5.9.2", dsp_handle, 0, "id-as-directory-system", FALSE);
register_ros_oid_dissector_handle("2.5.9.2", dsp_handle, 0, "id-as-directory-system", FALSE);
}
void prefs_register_dsp(void) {
static void
prefs_register_dsp(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -59,7 +59,7 @@ static const char *protocolID = NULL;
static const char *saved_protocolID = NULL;
static guint32 opcode = -1;
void prefs_register_idmp(void); /* forward declaration for use in preferences registration */
static void prefs_register_idmp(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
int proto_idmp = -1;
@ -71,7 +71,7 @@ static int hf_idmp_PDU = -1;
static GHashTable *idmp_segment_table = NULL;
static GHashTable *idmp_reassembled_table = NULL;
static int hf_idmp_fragments = -1;
static int hf_idmp_fragment = -1;
static int hf_idmp_fragment_overlap = -1;
@ -106,10 +106,10 @@ static const fragment_items idmp_frag_items = {
};
static int call_idmp_oid_callback(tvbuff_t *tvb, int offset, packet_info *pinfo, int op, proto_tree *tree _U_)
static int call_idmp_oid_callback(tvbuff_t *tvb, int offset, packet_info *pinfo, int op, proto_tree *tree _U_)
{
struct SESSION_DATA_STRUCTURE *session;
if((session = (struct SESSION_DATA_STRUCTURE*)pinfo->private_data) != NULL) {
if((!saved_protocolID) && (op == (ROS_OP_BIND | ROS_OP_RESULT))) {
@ -179,9 +179,9 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
/* now check the segment fields */
proto_tree_add_item(tree, hf_idmp_version, tvb, offset, 1, FALSE); offset++;
proto_tree_add_item(tree, hf_idmp_final, tvb, offset, 1, FALSE);
proto_tree_add_item(tree, hf_idmp_final, tvb, offset, 1, FALSE);
idmp_final = tvb_get_guint8(tvb, offset); offset++;
proto_tree_add_item(tree, hf_idmp_length, tvb, offset, 4, FALSE);
proto_tree_add_item(tree, hf_idmp_length, tvb, offset, 4, FALSE);
idmp_length = tvb_get_ntohl(tvb, offset); offset += 4;
if(idmp_reassemble) {
@ -189,7 +189,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
pinfo->fragmented = !idmp_final;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " [%sIDMP fragment, %u byte%s]",
col_append_fstr(pinfo->cinfo, COL_INFO, " [%sIDMP fragment, %u byte%s]",
idmp_final ? "Final " : "" ,
idmp_length, plurality(idmp_length, "", "s"));
@ -200,7 +200,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
if(fd_head && fd_head->next) {
proto_tree_add_text(tree, tvb, offset, (idmp_length) ? -1 : 0,
"IDMP segment data (%u byte%s)", idmp_length,
plurality(idmp_length, "", "s"));
plurality(idmp_length, "", "s"));
if (idmp_final) {
/* This is the last segment */
@ -213,17 +213,17 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
tvb, 0, 0, fd_head->reassembled_in);
}
}
} else {
} else {
if(!idmp_final) {
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " [IDMP fragment, %u byte%s, IDMP reassembly not enabled]",
col_append_fstr(pinfo->cinfo, COL_INFO, " [IDMP fragment, %u byte%s, IDMP reassembly not enabled]",
idmp_length, plurality(idmp_length, "", "s"));
proto_tree_add_text(tree, tvb, offset, (idmp_length) ? -1 : 0,
"IDMP segment data (%u byte%s) (IDMP reassembly not enabled)", idmp_length,
plurality(idmp_length, "", "s"));
plurality(idmp_length, "", "s"));
}
}
/* not reassembling - just dissect */
@ -234,7 +234,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
offset = dissect_idmp_IDM_PDU(FALSE, tvb, offset, &asn1_ctx, tree, hf_idmp_PDU);
pinfo->private_data = save_private_data;
}
}
}
@ -354,7 +354,7 @@ void proto_register_idmp(void) {
" To use this option, you must also enable"
" \"Allow subdissectors to reassemble TCP streams\""
" in the TCP protocol settings.", &idmp_reassemble);
prefs_register_uint_preference(idmp_module, "tcp.port", "IDMP TCP Port",
"Set the port for Internet Directly Mapped Protocol requests/responses",
10, &global_idmp_tcp_port);
@ -371,7 +371,9 @@ void proto_reg_handoff_idm(void) {
}
void prefs_register_idmp(void) {
static void
prefs_register_idmp(void)
{
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */

View File

@ -222,7 +222,7 @@ static dissector_handle_t spnego_handle;
static dissector_handle_t ssl_handle;
static dissector_handle_t ldap_handle ;
void prefs_register_ldap(void); /* forward declaration for use in preferences registration */
static void prefs_register_ldap(void); /* forward declaration for use in preferences registration */
/* different types of rpc calls ontop of ms cldap */
@ -2199,7 +2199,9 @@ proto_reg_handoff_ldap(void)
}
void prefs_register_ldap(void) {
static void
prefs_register_ldap(void)
{
if(tcp_port != global_ldap_tcp_port) {
if(tcp_port)

View File

@ -50,7 +50,7 @@ static dissector_handle_t tpkt_handle;
static const char *object_identifier_id = NULL; /* attribute identifier */
static int seqno = 0;
void prefs_register_p7(void); /* forward declaration for use in preferences registration */
static void prefs_register_p7(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -130,16 +130,18 @@ void proto_reg_handoff_p7(void) {
/* ABSTRACT SYNTAXES */
/* Register P7 with ROS (with no use of RTSE) */
register_ros_protocol_info("2.6.0.2.9", &p7_ros_info, 0, "id-as-ms", FALSE);
register_ros_protocol_info("2.6.0.2.5", &p7_ros_info, 0, "id-as-mrse", FALSE);
register_ros_protocol_info("2.6.0.2.1", &p7_ros_info, 0, "id-as-msse", FALSE);
register_ros_protocol_info("2.6.0.2.9", &p7_ros_info, 0, "id-as-ms", FALSE);
register_ros_protocol_info("2.6.0.2.5", &p7_ros_info, 0, "id-as-mrse", FALSE);
register_ros_protocol_info("2.6.0.2.1", &p7_ros_info, 0, "id-as-msse", FALSE);
/* remember the tpkt handler for change in preferences */
tpkt_handle = find_dissector("tpkt");
}
void prefs_register_p7(void) {
static void
prefs_register_p7(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -53,7 +53,7 @@
static guint global_x411_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_x411(void); /* forward declaration for use in preferences registration */
static void prefs_register_x411(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
static int proto_x411 = -1;
@ -165,7 +165,7 @@ dissect_x411(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -301,7 +301,7 @@ void proto_reg_handoff_x411(void) {
/* ABSTRACT SYNTAXES */
x411_handle = find_dissector("x411");
register_rtse_oid_dissector_handle("2.6.0.2.12", x411_handle, 0, "id-as-mta-rtse", TRUE);
register_rtse_oid_dissector_handle("2.6.0.2.12", x411_handle, 0, "id-as-mta-rtse", TRUE);
register_rtse_oid_dissector_handle("2.6.0.2.7", x411_handle, 0, "id-as-mtse", FALSE);
register_rtse_oid_dissector_handle("applicationProtocol.1", x411_handle, 0, "mts-transfer-protocol-1984", FALSE);
@ -319,19 +319,21 @@ void proto_reg_handoff_x411(void) {
/* Register P3 with ROS */
register_ros_protocol_info(id_as_msse, &p3_ros_info, 0, "id-as-msse", FALSE);
register_ros_protocol_info(id_as_msse, &p3_ros_info, 0, "id-as-msse", FALSE);
register_ros_protocol_info(id_as_mdse_88, &p3_ros_info, 0, "id-as-mdse-88", FALSE);
register_ros_protocol_info(id_as_mdse_94, &p3_ros_info, 0, "id-as-mdse-94", FALSE);
register_ros_protocol_info(id_as_mdse_88, &p3_ros_info, 0, "id-as-mdse-88", FALSE);
register_ros_protocol_info(id_as_mdse_94, &p3_ros_info, 0, "id-as-mdse-94", FALSE);
register_ros_protocol_info(id_as_mase_88, &p3_ros_info, 0, "id-as-mase-88", FALSE);
register_ros_protocol_info(id_as_mase_94, &p3_ros_info, 0, "id-as-mase-94", FALSE);
register_ros_protocol_info(id_as_mase_88, &p3_ros_info, 0, "id-as-mase-88", FALSE);
register_ros_protocol_info(id_as_mase_94, &p3_ros_info, 0, "id-as-mase-94", FALSE);
register_ros_protocol_info(id_as_mts, &p3_ros_info, 0, "id-as-mts", FALSE);
register_ros_protocol_info(id_as_mts, &p3_ros_info, 0, "id-as-mts", FALSE);
}
void prefs_register_x411(void) {
static void
prefs_register_x411(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -56,7 +56,7 @@
#include "packet-dap.h"
#include <epan/strutil.h>
/* we don't have a separate dissector for X519 -
/* we don't have a separate dissector for X519 -
most of DAP is defined in X511 */
#define PNAME "X.519 Directory Access Protocol"
#define PSNAME "DAP"
@ -64,7 +64,7 @@
static guint global_dap_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_dap(void); /* forward declaration for use in preferences registration */
static void prefs_register_dap(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -6693,9 +6693,9 @@ void proto_reg_handoff_dap(void) {
oid_add_from_string("id-ac-directory-access","2.5.3.1");
/* ABSTRACT SYNTAXES */
/* Register DAP with ROS (with no use of RTSE) */
register_ros_protocol_info("2.5.9.1", &dap_ros_info, 0, "id-as-directory-access", FALSE);
register_ros_protocol_info("2.5.9.1", &dap_ros_info, 0, "id-as-directory-access", FALSE);
register_idmp_protocol_info("2.5.33.0", &dap_ros_info, 0, "dap-ip");
@ -6713,7 +6713,9 @@ void proto_reg_handoff_dap(void) {
}
void prefs_register_dap(void) {
static void
prefs_register_dap(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -57,7 +57,7 @@
#include "packet-disp.h"
/* we don't have a separate dissector for X519 -
/* we don't have a separate dissector for X519 -
and most of DISP is defined in X525 */
#define PNAME "X.519 Directory Information Shadowing Protocol"
#define PSNAME "DISP"
@ -65,7 +65,7 @@
static guint global_disp_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_disp(void); /* forward declaration for use in preferences registration */
static void prefs_register_disp(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -1521,7 +1521,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -2176,9 +2176,9 @@ void proto_reg_handoff_disp(void) {
disp_handle = find_dissector("disp");
register_ros_oid_dissector_handle("2.5.9.3", disp_handle, 0, "id-as-directory-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.5", disp_handle, 0, "id-as-directory-reliable-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.6", disp_handle, 0, "id-as-directory-reliable-binding", FALSE);
register_ros_oid_dissector_handle("2.5.9.3", disp_handle, 0, "id-as-directory-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.5", disp_handle, 0, "id-as-directory-reliable-shadow", FALSE);
register_rtse_oid_dissector_handle("2.5.9.6", disp_handle, 0, "id-as-directory-reliable-binding", FALSE);
/* OPERATIONAL BINDING */
oid_add_from_string("id-op-binding-shadow","2.5.1.0.5.1");
@ -2191,7 +2191,9 @@ void proto_reg_handoff_disp(void) {
}
void prefs_register_disp(void) {
static void
prefs_register_disp(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -62,7 +62,7 @@
static guint global_dop_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_dop(void); /* forward declaration for use in preferences registration */
static void prefs_register_dop(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
static int proto_dop = -1;
@ -2094,7 +2094,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -3105,10 +3105,10 @@ void proto_reg_handoff_dop(void) {
oid_add_from_string("id-ac-directory-operational-binding-management","2.5.3.3");
/* ABSTRACT SYNTAXES */
/* Register DOP with ROS (with no use of RTSE) */
dop_handle = find_dissector("dop");
register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", FALSE);
register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", FALSE);
/* BINDING TYPES */
@ -3138,7 +3138,9 @@ void proto_reg_handoff_dop(void) {
}
void prefs_register_dop(void) {
static void
prefs_register_dop(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -59,7 +59,7 @@
static guint global_dsp_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_dsp(void); /* forward declaration for use in preferences registration */
static void prefs_register_dsp(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -1810,7 +1810,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -2675,17 +2675,19 @@ void proto_reg_handoff_dsp(void) {
oid_add_from_string("id-ac-directory-system","2.5.3.2");
/* ABSTRACT SYNTAXES */
/* remember the tpkt handler for change in preferences */
tpkt_handle = find_dissector("tpkt");
/* Register DSP with ROS (with no use of RTSE) */
dsp_handle = find_dissector("dsp");
register_ros_oid_dissector_handle("2.5.9.2", dsp_handle, 0, "id-as-directory-system", FALSE);
register_ros_oid_dissector_handle("2.5.9.2", dsp_handle, 0, "id-as-directory-system", FALSE);
}
void prefs_register_dsp(void) {
static void
prefs_register_dsp(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -67,7 +67,7 @@ static const char *protocolID = NULL;
static const char *saved_protocolID = NULL;
static guint32 opcode = -1;
void prefs_register_idmp(void); /* forward declaration for use in preferences registration */
static void prefs_register_idmp(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
int proto_idmp = -1;
@ -79,7 +79,7 @@ static int hf_idmp_PDU = -1;
static GHashTable *idmp_segment_table = NULL;
static GHashTable *idmp_reassembled_table = NULL;
static int hf_idmp_fragments = -1;
static int hf_idmp_fragment = -1;
static int hf_idmp_fragment_overlap = -1;
@ -114,10 +114,10 @@ static const fragment_items idmp_frag_items = {
};
static int call_idmp_oid_callback(tvbuff_t *tvb, int offset, packet_info *pinfo, int op, proto_tree *tree _U_)
static int call_idmp_oid_callback(tvbuff_t *tvb, int offset, packet_info *pinfo, int op, proto_tree *tree _U_)
{
struct SESSION_DATA_STRUCTURE *session;
if((session = (struct SESSION_DATA_STRUCTURE*)pinfo->private_data) != NULL) {
if((!saved_protocolID) && (op == (ROS_OP_BIND | ROS_OP_RESULT))) {
@ -661,9 +661,9 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
/* now check the segment fields */
proto_tree_add_item(tree, hf_idmp_version, tvb, offset, 1, FALSE); offset++;
proto_tree_add_item(tree, hf_idmp_final, tvb, offset, 1, FALSE);
proto_tree_add_item(tree, hf_idmp_final, tvb, offset, 1, FALSE);
idmp_final = tvb_get_guint8(tvb, offset); offset++;
proto_tree_add_item(tree, hf_idmp_length, tvb, offset, 4, FALSE);
proto_tree_add_item(tree, hf_idmp_length, tvb, offset, 4, FALSE);
idmp_length = tvb_get_ntohl(tvb, offset); offset += 4;
if(idmp_reassemble) {
@ -671,7 +671,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
pinfo->fragmented = !idmp_final;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " [%sIDMP fragment, %u byte%s]",
col_append_fstr(pinfo->cinfo, COL_INFO, " [%sIDMP fragment, %u byte%s]",
idmp_final ? "Final " : "" ,
idmp_length, plurality(idmp_length, "", "s"));
@ -682,7 +682,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
if(fd_head && fd_head->next) {
proto_tree_add_text(tree, tvb, offset, (idmp_length) ? -1 : 0,
"IDMP segment data (%u byte%s)", idmp_length,
plurality(idmp_length, "", "s"));
plurality(idmp_length, "", "s"));
if (idmp_final) {
/* This is the last segment */
@ -695,17 +695,17 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
tvb, 0, 0, fd_head->reassembled_in);
}
}
} else {
} else {
if(!idmp_final) {
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " [IDMP fragment, %u byte%s, IDMP reassembly not enabled]",
col_append_fstr(pinfo->cinfo, COL_INFO, " [IDMP fragment, %u byte%s, IDMP reassembly not enabled]",
idmp_length, plurality(idmp_length, "", "s"));
proto_tree_add_text(tree, tvb, offset, (idmp_length) ? -1 : 0,
"IDMP segment data (%u byte%s) (IDMP reassembly not enabled)", idmp_length,
plurality(idmp_length, "", "s"));
plurality(idmp_length, "", "s"));
}
}
/* not reassembling - just dissect */
@ -716,7 +716,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
offset = dissect_idmp_IDM_PDU(FALSE, tvb, offset, &asn1_ctx, tree, hf_idmp_PDU);
pinfo->private_data = save_private_data;
}
}
}
@ -984,7 +984,7 @@ void proto_register_idmp(void) {
" To use this option, you must also enable"
" \"Allow subdissectors to reassemble TCP streams\""
" in the TCP protocol settings.", &idmp_reassemble);
prefs_register_uint_preference(idmp_module, "tcp.port", "IDMP TCP Port",
"Set the port for Internet Directly Mapped Protocol requests/responses",
10, &global_idmp_tcp_port);
@ -1001,7 +1001,9 @@ void proto_reg_handoff_idm(void) {
}
void prefs_register_idmp(void) {
static void
prefs_register_idmp(void)
{
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */

View File

@ -439,7 +439,7 @@ static dissector_handle_t spnego_handle;
static dissector_handle_t ssl_handle;
static dissector_handle_t ldap_handle ;
void prefs_register_ldap(void); /* forward declaration for use in preferences registration */
static void prefs_register_ldap(void); /* forward declaration for use in preferences registration */
/* different types of rpc calls ontop of ms cldap */
@ -5737,7 +5737,9 @@ proto_reg_handoff_ldap(void)
}
void prefs_register_ldap(void) {
static void
prefs_register_ldap(void)
{
if(tcp_port != global_ldap_tcp_port) {
if(tcp_port)

View File

@ -58,7 +58,7 @@ static dissector_handle_t tpkt_handle;
static const char *object_identifier_id = NULL; /* attribute identifier */
static int seqno = 0;
void prefs_register_p7(void); /* forward declaration for use in preferences registration */
static void prefs_register_p7(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@ -5842,16 +5842,18 @@ void proto_reg_handoff_p7(void) {
/* ABSTRACT SYNTAXES */
/* Register P7 with ROS (with no use of RTSE) */
register_ros_protocol_info("2.6.0.2.9", &p7_ros_info, 0, "id-as-ms", FALSE);
register_ros_protocol_info("2.6.0.2.5", &p7_ros_info, 0, "id-as-mrse", FALSE);
register_ros_protocol_info("2.6.0.2.1", &p7_ros_info, 0, "id-as-msse", FALSE);
register_ros_protocol_info("2.6.0.2.9", &p7_ros_info, 0, "id-as-ms", FALSE);
register_ros_protocol_info("2.6.0.2.5", &p7_ros_info, 0, "id-as-mrse", FALSE);
register_ros_protocol_info("2.6.0.2.1", &p7_ros_info, 0, "id-as-msse", FALSE);
/* remember the tpkt handler for change in preferences */
tpkt_handle = find_dissector("tpkt");
}
void prefs_register_p7(void) {
static void
prefs_register_p7(void)
{
static guint tcp_port = 0;
/* de-register the old port */

View File

@ -61,7 +61,7 @@
static guint global_x411_tcp_port = 102;
static dissector_handle_t tpkt_handle;
void prefs_register_x411(void); /* forward declaration for use in preferences registration */
static void prefs_register_x411(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
static int proto_x411 = -1;
@ -8329,7 +8329,7 @@ dissect_x411(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if(parent_tree){
proto_tree_add_text(parent_tree, tvb, offset, -1,
"Internal error: can't get operation information from ROS dissector.");
}
}
return ;
} else {
session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
@ -11069,7 +11069,7 @@ void proto_reg_handoff_x411(void) {
/* ABSTRACT SYNTAXES */
x411_handle = find_dissector("x411");
register_rtse_oid_dissector_handle("2.6.0.2.12", x411_handle, 0, "id-as-mta-rtse", TRUE);
register_rtse_oid_dissector_handle("2.6.0.2.12", x411_handle, 0, "id-as-mta-rtse", TRUE);
register_rtse_oid_dissector_handle("2.6.0.2.7", x411_handle, 0, "id-as-mtse", FALSE);
register_rtse_oid_dissector_handle("applicationProtocol.1", x411_handle, 0, "mts-transfer-protocol-1984", FALSE);
@ -11087,19 +11087,21 @@ void proto_reg_handoff_x411(void) {
/* Register P3 with ROS */
register_ros_protocol_info(id_as_msse, &p3_ros_info, 0, "id-as-msse", FALSE);
register_ros_protocol_info(id_as_msse, &p3_ros_info, 0, "id-as-msse", FALSE);
register_ros_protocol_info(id_as_mdse_88, &p3_ros_info, 0, "id-as-mdse-88", FALSE);
register_ros_protocol_info(id_as_mdse_94, &p3_ros_info, 0, "id-as-mdse-94", FALSE);
register_ros_protocol_info(id_as_mdse_88, &p3_ros_info, 0, "id-as-mdse-88", FALSE);
register_ros_protocol_info(id_as_mdse_94, &p3_ros_info, 0, "id-as-mdse-94", FALSE);
register_ros_protocol_info(id_as_mase_88, &p3_ros_info, 0, "id-as-mase-88", FALSE);
register_ros_protocol_info(id_as_mase_94, &p3_ros_info, 0, "id-as-mase-94", FALSE);
register_ros_protocol_info(id_as_mase_88, &p3_ros_info, 0, "id-as-mase-88", FALSE);
register_ros_protocol_info(id_as_mase_94, &p3_ros_info, 0, "id-as-mase-94", FALSE);
register_ros_protocol_info(id_as_mts, &p3_ros_info, 0, "id-as-mts", FALSE);
register_ros_protocol_info(id_as_mts, &p3_ros_info, 0, "id-as-mts", FALSE);
}
void prefs_register_x411(void) {
static void
prefs_register_x411(void)
{
static guint tcp_port = 0;
/* de-register the old port */