Exemplo n.º 1
0
void
proto_register_etv(void)
{
	static hf_register_info hf_ddb[] = {
		{ &hf_etv_ddb_filter_info, {
			"Filter Info", "etv-ddb.filter_info",
			FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_etv_ddb_reserved, {
			"Reserved", "etv-ddb.reserved",
			FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
		} }
	};

	static hf_register_info hf_dii[] = {
		{ &hf_etv_dii_filter_info, {
			"Filter Info", "etv-dii.filter_info",
			FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_etv_dii_reserved, {
			"Reserved", "etv-dii.reserved",
			FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
		} }
	};

	static gint *ett[] = {
		&ett_etv,
		&ett_etv_payload
	};

	static ei_register_info ei_ddb[] = {
		{ &ei_etv_ddb_invalid_section_syntax_indicator, { "etv-ddb.invalid_section_syntax_indicator", PI_MALFORMED, PI_ERROR, "Invalid section_syntax_indicator (should be 0)", EXPFILL }},
		{ &ei_etv_ddb_invalid_reserved_bits, { "etv-ddb.invalid_reserved_bits", PI_MALFORMED, PI_ERROR, "Invalid reserved bits", EXPFILL }},
		{ &ei_etv_ddb_invalid_section_length, { "etv-ddb.invalid_section_length", PI_MALFORMED, PI_ERROR, "Invalid section_length (must not exceed 1021)", EXPFILL }},
		{ &ei_etv_ddb_filter_info, { "etv-ddb.filter_info.invalid", PI_MALFORMED, PI_ERROR, "Invalid filter info", EXPFILL }},
	};

	static ei_register_info ei_dii[] = {
		{ &ei_etv_dii_invalid_section_syntax_indicator, { "etv-dii.invalid_section_syntax_indicator", PI_MALFORMED, PI_ERROR, "Invalid section_syntax_indicator (should be 0)", EXPFILL }},
		{ &ei_etv_dii_invalid_reserved_bits, { "etv-dii.invalid_reserved_bits", PI_MALFORMED, PI_ERROR, "Invalid reserved bits", EXPFILL }},
		{ &ei_etv_dii_invalid_section_length, { "etv-dii.invalid_section_length", PI_MALFORMED, PI_ERROR, "Invalid section_length (must not exceed 1021)", EXPFILL }},
		{ &ei_etv_dii_filter_info, { "etv-dii.filter_info.invalid", PI_MALFORMED, PI_ERROR, "Invalid filter info", EXPFILL }},
	};

	expert_module_t* expert_etv_dii;
	expert_module_t* expert_etv_ddb;

	proto_etv_dii = proto_register_protocol("ETV-AM DII Section", "ETV-AM DII", "etv-dii");
	proto_etv_ddb = proto_register_protocol("ETV-AM DDB Section", "ETV-AM DDB", "etv-ddb");

	proto_register_field_array(proto_etv_dii, hf_dii, array_length(hf_dii));
	proto_register_field_array(proto_etv_ddb, hf_ddb, array_length(hf_ddb));
	proto_register_subtree_array(ett, array_length(ett));
	expert_etv_dii = expert_register_protocol(proto_etv_dii);
	expert_register_field_array(expert_etv_dii, ei_dii, array_length(ei_dii));
	expert_etv_ddb = expert_register_protocol(proto_etv_ddb);
	expert_register_field_array(expert_etv_ddb, ei_ddb, array_length(ei_ddb));
}
Exemplo n.º 2
0
void
register_show_exception(void)
{
	static ei_register_info ei[] = {
		{ &ei_malformed_dissector_bug, { "_ws.malformed.dissector_bug", PI_MALFORMED, PI_ERROR, "Dissector bug", EXPFILL }},
		{ &ei_malformed_reassembly, { "_ws.malformed.reassembly", PI_MALFORMED, PI_ERROR, "Reassembly error", EXPFILL }},
		{ &ei_malformed, { "_ws.malformed.expert", PI_MALFORMED, PI_ERROR, "Malformed Packet (Exception occurred)", EXPFILL }},
	};

	expert_module_t* expert_malformed;

	proto_short = proto_register_protocol("Short Frame", "Short frame", "_ws.short");
	proto_malformed = proto_register_protocol("Malformed Packet",
	    "Malformed packet", "_ws.malformed");
	proto_unreassembled = proto_register_protocol(
	    "Unreassembled Fragmented Packet",
	    "Unreassembled fragmented packet", "_ws.unreassembled");

	expert_malformed = expert_register_protocol(proto_malformed);
	expert_register_field_array(expert_malformed, ei, array_length(ei));

	/* "Short Frame", "Malformed Packet", and "Unreassembled Fragmented
	   Packet" aren't really protocols, they're error indications;
	   disabling them makes no sense. */
	proto_set_cant_toggle(proto_short);
	proto_set_cant_toggle(proto_malformed);
	proto_set_cant_toggle(proto_unreassembled);
}
/* Register all the bits needed with the filtering engine */
void
proto_register_charging_ase(void)
{
  /* List of fields */
  static hf_register_info hf[] = {
#include "packet-charging_ase-hfarr.c"
  };

  /* List of subtrees */
    static gint *ett[] = {
    &ett_charging_ase,
#include "packet-charging_ase-ettarr.c"
        };

  static ei_register_info ei[] = {
      { &ei_charging_ase_extensions_not_dissected, { "charging_ase.extensions_not_dissected", PI_UNDECODED, PI_WARN, "Extensions not dissected", EXPFILL }},
  };

  expert_module_t* expert_charging_ase;

  proto_charging_ase = proto_register_protocol(PNAME, PSNAME, PFNAME);

  proto_register_field_array(proto_charging_ase, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_charging_ase = expert_register_protocol(proto_charging_ase);
  expert_register_field_array(expert_charging_ase, ei, array_length(ei));
}
Exemplo n.º 4
0
void proto_register_cdt (void) {

  /* List of fields */
  static hf_register_info hf[] = {
#include "packet-cdt-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
#include "packet-cdt-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_cdt_unable_compress_content, { "cdt.unable_compress_content", PI_UNDECODED, PI_ERROR, "Unable to get compressed content", EXPFILL }},
     { &ei_cdt_unable_uncompress_content, { "cdt.unable_uncompress_content", PI_UNDECODED, PI_ERROR, "Unable to get uncompressed content", EXPFILL }},
  };

  expert_module_t* expert_cdt;

  /* Register protocol */
  proto_cdt = proto_register_protocol (PNAME, PSNAME, PFNAME);

  /* Register fields and subtrees */
  proto_register_field_array (proto_cdt, hf, array_length(hf));
  proto_register_subtree_array (ett, array_length(ett));
  expert_cdt = expert_register_protocol(proto_cdt);
  expert_register_field_array(expert_cdt, ei, array_length(ei));
}
/*--- proto_register_q932_ros -----------------------------------------------*/
void proto_register_q932_ros(void) {

  /* List of fields */
  static hf_register_info hf[] = {
#include "packet-q932-ros-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
#include "packet-q932-ros-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_ros_undecoded, { "q932.ros.undecoded", PI_UNDECODED, PI_WARN, "Undecoded", EXPFILL }},
  };

  expert_module_t* expert_q932_ros;

  /* Register protocol and dissector */
  proto_q932_ros = proto_register_protocol(PNAME, PSNAME, PFNAME);
  proto_set_cant_toggle(proto_q932_ros);

  /* Register fields and subtrees */
  proto_register_field_array(proto_q932_ros, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_q932_ros = expert_register_protocol(proto_q932_ros);
  expert_register_field_array(expert_q932_ros, ei, array_length(ei));

  new_register_dissector(PFNAME, dissect_q932_ros, proto_q932_ros);
}
Exemplo n.º 6
0
void
proto_register_etherip(void)
{
  static hf_register_info hf_etherip[] = {
    { &hf_etherip_ver,
      { "Version", "etherip.ver", FT_UINT16, BASE_DEC, NULL, ETHERIP_VERS_MASK,
        NULL, HFILL }},
    { &hf_etherip_reserved,
      { "Reserved", "etherip.reserved", FT_UINT16, BASE_HEX, NULL, ETHERIP_RESERVE_MASK,
        "Reserved (must be 0)", HFILL }},
  };

  static gint *ett[] = {
    &ett_etherip,
  };

  static ei_register_info ei[] = {
     { &ei_etherip_ver_3, { "etherip.ver.not3", PI_PROTOCOL, PI_WARN, "Version must be 3", EXPFILL }},
     { &ei_etherip_reserved_0, { "etherip.reserved.not0", PI_PROTOCOL, PI_WARN, "Reserved field must be 0", EXPFILL }},
  };

  expert_module_t* expert_etherip;

  proto_etherip = proto_register_protocol("Ethernet over IP",
                                          "ETHERIP", "etherip");
  proto_register_field_array(proto_etherip, hf_etherip, array_length(hf_etherip));
  proto_register_subtree_array(ett, array_length(ett));
  expert_etherip = expert_register_protocol(proto_etherip);
  expert_register_field_array(expert_etherip, ei, array_length(ei));

  register_dissector("etherip", dissect_etherip, proto_etherip);
}
/*--- proto_register_mms -------------------------------------------*/
void proto_register_mms(void) {

	/* List of fields */
  static hf_register_info hf[] =
  {
#include "packet-mms-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_mms,
#include "packet-mms-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_mms_mal_timeofday_encoding, { "mms.malformed.timeofday_encoding", PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding", EXPFILL }},
     { &ei_mms_mal_utctime_encoding, { "mms.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding", EXPFILL }},
  };

  expert_module_t* expert_mms;

  /* Register protocol */
  proto_mms = proto_register_protocol(PNAME, PSNAME, PFNAME);
  register_dissector("mms", dissect_mms, proto_mms);
  /* Register fields and subtrees */
  proto_register_field_array(proto_mms, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_mms = expert_register_protocol(proto_mms);
  expert_register_field_array(expert_mms, ei, array_length(ei));

}
Exemplo n.º 8
0
void proto_register_user_encap(void)
{
    module_t *module;
    expert_module_t* expert_user_encap;

    static uat_field_t user_flds[] = {
        UAT_FLD_VS(user_encap,encap,"DLT",user_dlts,"The DLT"),
        UAT_FLD_PROTO(user_encap,payload_proto,"Payload protocol",
                      "Protocol to be used for the payload of this DLT"),
        UAT_FLD_DEC(user_encap,header_size,"Header size",
                    "Size of an eventual header that precedes the actual payload, 0 means none"),
        UAT_FLD_PROTO(user_encap,header_proto,"Header protocol",
                      "Protocol to be used for the header (empty = data)"),
        UAT_FLD_DEC(user_encap,trailer_size,"Trailer size",
                    "Size of an eventual trailer that follows the actual payload, 0 means none"),
        UAT_FLD_PROTO(user_encap,trailer_proto,"Trailer protocol",
                      "Protocol to be used for the trailer (empty = data)"),
        UAT_END_FIELDS
    };

    static ei_register_info ei[] = {
        { &ei_user_encap_not_handled, { "user_dlt.not_handled", PI_UNDECODED, PI_WARN, "Formatted text", EXPFILL }},
    };

    proto_user_encap = proto_register_protocol("DLT User","DLT_USER","user_dlt");
    expert_user_encap = expert_register_protocol(proto_user_encap);
    expert_register_field_array(expert_user_encap, ei, array_length(ei));

    module = prefs_register_protocol(proto_user_encap, NULL);

    encaps_uat = uat_new("User DLTs Table",
                         sizeof(user_encap_t),
                         "user_dlts",
                         TRUE,
                         &encaps,
                         &num_encaps,
                         UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */
                         "ChUserDLTsSection",
                         user_copy_cb,
                         NULL,
                         user_free_cb,
                         NULL,
                         user_flds );

    prefs_register_uat_preference(module,
                      "encaps_table",
                      "Encapsulations Table",
                      "A table that enumerates the various protocols to be used against a certain user DLT",
                      encaps_uat);


    register_dissector("user_dlt",dissect_user,proto_user_encap);

    /*
    prefs_register_protocol_obsolete(proto_register_protocol("DLT User A","DLT_USER_A","user_dlt_a"));
    prefs_register_protocol_obsolete(proto_register_protocol("DLT User B","DLT_USER_B","user_dlt_b"));
    prefs_register_protocol_obsolete(proto_register_protocol("DLT User C","DLT_USER_C","user_dlt_c"));
    prefs_register_protocol_obsolete(proto_register_protocol("DLT User D","DLT_USER_D","user_dlt_d"));
    */
}
Exemplo n.º 9
0
/*--- proto_register_rrc -------------------------------------------*/
void proto_register_rrc(void) {

  /* List of fields */
  static hf_register_info hf[] = {

#include "packet-rrc-hfarr.c"
    { &hf_test,
      { "RAB Test", "rrc.RAB.test",
        FT_UINT8, BASE_DEC, NULL, 0,
        "rrc.RAB_Info_r6", HFILL }},
    { &hf_rrc_eutra_feat_group_ind_1,
      { "Indicator 1", "rrc.eutra_feat_group_ind_1",
        FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_1_val), 0,
        "EUTRA Feature Group Indicator 1", HFILL }},
    { &hf_rrc_eutra_feat_group_ind_2,
      { "Indicator 2", "rrc.eutra_feat_group_ind_2",
        FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_2_val), 0,
        "EUTRA Feature Group Indicator 2", HFILL }},
    { &hf_rrc_eutra_feat_group_ind_3,
      { "Indicator 3", "rrc.eutra_feat_group_ind_3",
        FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_3_val), 0,
        "EUTRA Feature Group Indicator 3", HFILL }},
    { &hf_rrc_eutra_feat_group_ind_4,
      { "Indicator 4", "rrc.eutra_feat_group_ind_4",
        FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_4_val), 0,
        "EUTRA Feature Group Indicator 4", HFILL }},
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_rrc,
#include "packet-rrc-ettarr.c"
    &ett_rrc_eutraFeatureGroupIndicators,
    &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
  };

  static ei_register_info ei[] = {
     { &ei_rrc_no_hrnti, { "rrc.no_hrnti", PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI", EXPFILL }},
  };

  expert_module_t* expert_rrc;

  /* Register protocol */
  proto_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_rrc, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_rrc = expert_register_protocol(proto_rrc);
  expert_register_field_array(expert_rrc, ei, array_length(ei));

  register_dissector("rrc", dissect_rrc, proto_rrc);

#include "packet-rrc-dis-reg.c"




    register_init_routine(rrc_init);
}
Exemplo n.º 10
0
void
proto_register_pw_fr(void)
{
static hf_register_info hf[] = {
	{&hf_cw_bits03	,{"Bits 0 to 3"		,"pwfr.bits03"	,FT_UINT8	,BASE_HEX
			  ,NULL			,0xf0		,NULL
			  ,HFILL }},

	{&hf_cw_fecn	,{"FR FECN"		,"pwfr.fecn"	,FT_UINT8	,BASE_DEC
			  ,NULL			,0x08		,"FR Forward Explicit Congestion Notification bit"
			  ,HFILL}},

	{&hf_cw_becn	,{"FR BECN"		,"pwfr.becn"	,FT_UINT8	,BASE_DEC
			  ,NULL			,0x04		,"FR Backward Explicit Congestion Notification bit"
			  ,HFILL}},

	{&hf_cw_de	,{"FR DE bit"		,"pwfr.de"	,FT_UINT8	,BASE_DEC
			  ,NULL			,0x02		,"FR Discard Eligibility bit"
			  ,HFILL}},

	{&hf_cw_cr	,{"FR Frame C/R"	,"pwfr.cr"	,FT_UINT8	,BASE_DEC
			  ,NULL			,0x01		,"FR frame Command/Response bit"
			  ,HFILL}},

	{&hf_cw_frg	,{"Fragmentation"	,"pwfr.frag"	,FT_UINT8	,BASE_DEC
			  ,vals_frg		,0xc0		,NULL
			  ,HFILL}},

	{&hf_cw_len	,{"Length"		,"pwfr.length"	,FT_UINT8	,BASE_DEC
			  ,NULL			,0x3f		,NULL
			  ,HFILL}},

	{&hf_cw_seq	,{"Sequence number"	,"pwfr.length"	,FT_UINT16	,BASE_DEC
			  ,NULL			,0		,NULL
			  ,HFILL}}
};

	static gint *ett[] = {
		&ett_encaps
	};

	static ei_register_info ei[] = {
		{ &ei_cw_packet_size_too_small, { "pwfr.packet_size_too_small", PI_MALFORMED, PI_ERROR, "PW packet is smaller than PW encapsulation header", EXPFILL }},
		{ &ei_cw_bits03, { "pwfr.cw.bits03.not_zero", PI_MALFORMED, PI_ERROR, "Bits 0..3 of Control Word must be 0", EXPFILL }},
		{ &ei_payload_size_invalid, { "pwfr.payload.size_invalid", PI_MALFORMED, PI_ERROR, "Bad Length: greater than FR payload size", EXPFILL }},
	};
	expert_module_t* expert_pwfr;

	proto_encaps = proto_register_protocol( "PW Frame Relay DLCI Control Word",
						"Frame Relay DLCI PW",
						"pwfr");
	proto_register_field_array(proto_encaps, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_pwfr = expert_register_protocol(proto_encaps);
	expert_register_field_array(expert_pwfr, ei, array_length(ei));
	register_dissector("pw_fr", dissect_pw_fr, proto_encaps );
}
Exemplo n.º 11
0
void
proto_register_cwids(void)
{
	static hf_register_info hf[] = {
		{ &hf_cwids_version,
		{ "Capture Version", "cwids.version", FT_UINT16, BASE_DEC, NULL,
			0x0, "Version or format of record", HFILL }},

		{ &hf_cwids_unknown1,
		{ "Unknown1", "cwids.unknown1", FT_BYTES, BASE_NONE, NULL,
			0x0, "1st Unknown block - timestamp?", HFILL }},

		{ &hf_cwids_channel,
		{ "Channel", "cwids.channel", FT_UINT8, BASE_DEC, NULL,
			0x0, "Channel for this capture", HFILL }},

		{ &hf_cwids_unknown2,
		{ "Unknown2", "cwids.unknown2", FT_BYTES, BASE_NONE, NULL,
			0x0, "2nd Unknown block", HFILL }},

		{ &hf_cwids_reallength,
		{ "Original length", "cwids.reallen", FT_UINT16, BASE_DEC, NULL,
			0x0, "Original num bytes in frame", HFILL }},

		{ &hf_cwids_capturelen,
		{ "Capture length", "cwids.caplen", FT_UINT16, BASE_DEC, NULL,
			0x0, "Captured bytes in record", HFILL }},

		{ &hf_cwids_unknown3,
		{ "Unknown3", "cwids.unknown3", FT_BYTES, BASE_NONE, NULL,
			0x0, "3rd Unknown block", HFILL }},

	};
	static gint *ett[] = {
		&ett_cwids,
	};

	static ei_register_info ei[] = {
		{ &ie_ieee80211_subpacket, { "cwids.ieee80211_malformed", PI_MALFORMED, PI_ERROR, "Malformed or short IEEE80211 subpacket", EXPFILL }},
	};

	module_t *cwids_module;
	expert_module_t* expert_cwids;

	proto_cwids = proto_register_protocol("Cisco Wireless IDS Captures", "CWIDS", "cwids");
	proto_register_field_array(proto_cwids, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_cwids = expert_register_protocol(proto_cwids);
	expert_register_field_array(expert_cwids, ei, array_length(ei));

	cwids_module = prefs_register_protocol(proto_cwids, proto_reg_handoff_cwids);
	prefs_register_uint_preference(cwids_module, "udp.port",
		"CWIDS port",
		"Set the destination UDP port Cisco wireless IDS messages",
		10, &global_udp_port);

}
Exemplo n.º 12
0
/* Register the protocol with Wireshark */
void proto_register_igrp(void)
{

  /* Setup list of header fields */
  static hf_register_info hf[] = {

    { &hf_igrp_update,
      { "Update Release",           "igrp.update",
      FT_UINT8, BASE_DEC, NULL, 0x0 ,
      "Update Release number", HFILL }
    },
    { &hf_igrp_as,
      { "Autonomous System",           "igrp.as",
      FT_UINT16, BASE_DEC, NULL, 0x0 ,
      "Autonomous System number", HFILL }
    },

    /* Generated from convert_proto_tree_add_text.pl */
    { &hf_igrp_version, { "IGRP Version", "igrp.version", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
    { &hf_igrp_command, { "Command", "igrp.command", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
    { &hf_igrp_interior_routes, { "Interior routes", "igrp.interior_routes", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_system_routes, { "System routes", "igrp.system_routes", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_exterior_routes, { "Exterior routes", "igrp.exterior_routes", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_checksum, { "Checksum", "igrp.checksum", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_network, { "Network", "igrp.network", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_delay, { "Delay", "igrp.delay", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_bandwidth, { "Bandwidth", "igrp.bandwidth", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_mtu, { "MTU", "igrp.mtu", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_reliability, { "Reliability", "igrp.reliability", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_load, { "Load", "igrp.load", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_igrp_hop_count, { "Hop count", "igrp.hop_count", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
  };

  /* Setup protocol subtree array */
  static gint *ett[] = {
    &ett_igrp,
    &ett_igrp_vektor,
    &ett_igrp_net
  };

  static ei_register_info ei[] = {
    { &ei_igrp_version, { "igrp.version.invalid", PI_PROTOCOL, PI_WARN, "Unknown Version, The dissection may be inaccurate", EXPFILL }},
  };

  expert_module_t* expert_igrp;

  /* Register the protocol name and description */
  proto_igrp = proto_register_protocol("Cisco Interior Gateway Routing Protocol",
                                       "IGRP", "igrp");

  /* Required function calls to register the header fields and subtrees used */
  proto_register_field_array(proto_igrp, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_igrp = expert_register_protocol(proto_igrp);
  expert_register_field_array(expert_igrp, ei, array_length(ei));
}
Exemplo n.º 13
0
void proto_register_rmt_fec(void)
{
	static hf_register_info hf[] = {
		{ &hf_encoding_id,
			{ "FEC Encoding ID", "rmt-fec.encoding_id", FT_UINT8, BASE_DEC, VALS(string_fec_encoding_id), 0x0, NULL, HFILL }},
		{ &hf_instance_id,
			{ "FEC Instance ID", "rmt-fec.instance_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_sbn,
			{ "Source Block Number", "rmt-fec.sbn", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_sbn_with_mask,
			{ "Source Block Number", "rmt-fec.sbn", FT_UINT32, BASE_DEC, NULL, 0xFFF00000, NULL, HFILL }},
		{ &hf_sbl,
			{ "Source Block Length", "rmt-fec.sbl", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_esi,
			{ "Encoding Symbol ID", "rmt-fec.esi", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_esi_with_mask,
			{ "Encoding Symbol ID", "rmt-fec.esi", FT_UINT32, BASE_HEX, NULL, 0x000FFFFF, NULL, HFILL }},
		{ &hf_fti_transfer_length,
			{ "Transfer Length", "rmt-fec.fti.transfer_length", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_fti_encoding_symbol_length,
			{ "Encoding Symbol Length", "rmt-fec.fti.encoding_symbol_length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_fti_max_source_block_length,
			{ "Maximum Source Block Length", "rmt-fec.fti.max_source_block_length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_fti_max_number_encoding_symbols,
			{ "Maximum Number of Encoding Symbols", "rmt-fec.fti.max_number_encoding_symbols", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_fti_num_blocks,
			{ "Number of Source Blocks", "rmt-fec.fti.num_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_fti_num_subblocks,
			{ "Number of Sub-Blocks", "rmt-fec.fti.num_subblocks", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_fti_alignment,
			{ "Symbol Alignment", "rmt-fec.fti.alignment", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}
	};

	/* Setup protocol subtree array */
	static gint *ett[] = {
		&ett_main,
	};

	static ei_register_info ei[] = {
		{ &ei_fec_encoding_id, { "rmt-fec.encoding_id.not0", PI_PROTOCOL, PI_WARN, "FEC Encoding ID < 128, should be zero", EXPFILL }},
	};

	expert_module_t* expert_rmt_fec;

	/* Register the protocol name and description */
	proto_rmt_fec = proto_register_protocol("Forward Error Correction (FEC)", "RMT-FEC", "rmt-fec");
	new_register_dissector("rmt-fec", dissect_fec, proto_rmt_fec);

	/* Required function calls to register the header fields and subtrees used */
	proto_register_field_array(proto_rmt_fec, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_rmt_fec = expert_register_protocol(proto_rmt_fec);
	expert_register_field_array(expert_rmt_fec, ei, array_length(ei));
}
Exemplo n.º 14
0
void proto_register_inap(void) {
	module_t *inap_module;
  /* List of fields */
  static hf_register_info hf[] = {



#include "packet-inap-hfarr.c"
  };






  /* List of subtrees */
  static gint *ett[] = {
    &ett_inap,
	&ett_inapisup_parameter,
	&ett_inap_HighLayerCompatibility,
#include "packet-inap-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_inap_unknown_invokeData, { "inap.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
     { &ei_inap_unknown_returnResultData, { "inap.unknown.returnResultData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
     { &ei_inap_unknown_returnErrorData, { "inap.unknown.returnErrorData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
  };

  expert_module_t* expert_inap;

  /* Register protocol */
  proto_inap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  register_dissector("inap", dissect_inap, proto_inap);
  /* Register fields and subtrees */
  proto_register_field_array(proto_inap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_inap = expert_register_protocol(proto_inap);
  expert_register_field_array(expert_inap, ei, array_length(ei));

  /* Set default SSNs */
  range_convert_str(&global_ssn_range, "106,241", MAX_SSN);

  inap_module = prefs_register_protocol(proto_inap, proto_reg_handoff_inap);

  prefs_register_obsolete_preference(inap_module, "tcap.itu_ssn");

  prefs_register_obsolete_preference(inap_module, "tcap.itu_ssn1");

  prefs_register_range_preference(inap_module, "ssn", "TCAP SSNs",
				  "TCAP Subsystem numbers used for INAP",
				  &global_ssn_range, MAX_SSN);
}
Exemplo n.º 15
0
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg(void)
{
	/* Payload display */
	static hf_register_info hf[] =
	{
		{
			&hf_mac_mgmt_msg_type,
			{
				"MAC Management Message Type", "wmx.macmgtmsgtype",
				FT_UINT8, BASE_DEC | BASE_EXT_STRING, &mgt_msg_abbrv_vals_ext, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_mac_mgmt_msg_values,
			{
				"Values", "wmx.values",
				FT_BYTES, BASE_NONE, NULL, 0x0,
				NULL, HFILL
			}
		},
	};

	/* Setup protocol subtree array */
	static gint *ett[] =
		{
			&ett_mac_mgmt_msg_decoder,
		};

	static ei_register_info ei[] = {
		{ &ei_empty_payload, { "wmx.empty_payload", PI_PROTOCOL, PI_ERROR, "Error: Mac payload tvb is empty !", EXPFILL }},
	};

	expert_module_t* expert_mac_mgmt;

	proto_mac_mgmt_msg_decoder = proto_register_protocol (
		"WiMax MAC Management Message", /* name       */
		"MGMT MSG",                     /* short name */
		"wmx.mgmt"                   /* abbrev     */
		);

	proto_register_field_array(proto_mac_mgmt_msg_decoder, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_mac_mgmt = expert_register_protocol(proto_mac_mgmt_msg_decoder);
	expert_register_field_array(expert_mac_mgmt, ei, array_length(ei));

	subdissector_message_table = register_dissector_table("wmx.mgmtmsg",
		"WiMax MAC Management Message", FT_UINT8, BASE_DEC);

	/* Register dissector by name */
	register_dissector("wmx_mac_mgmt_msg_decoder", dissect_mac_mgmt_msg_decoder,
	                   proto_mac_mgmt_msg_decoder);
}
Exemplo n.º 16
0
/*--- proto_register_ros -------------------------------------------*/
void proto_register_ros(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
    { &hf_ros_response_in,
      { "Response In", "ros.response_in",
	FT_FRAMENUM, BASE_NONE, NULL, 0x0,
	"The response to this remote operation invocation is in this frame", HFILL }},
    { &hf_ros_response_to,
      { "Response To", "ros.response_to",
	FT_FRAMENUM, BASE_NONE, NULL, 0x0,
	"This is a response to the remote operation invocation in this frame", HFILL }},
    { &hf_ros_time,
      { "Time", "ros.time",
	FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
	"The time between the Invoke and the Response", HFILL }},

#include "packet-ros-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_ros,
    &ett_ros_unknown,
#include "packet-ros-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_ros_dissector_oid_not_implemented, { "ros.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "ROS: Dissector for OID not implemented", EXPFILL }},
     { &ei_ros_unknown_ros_pdu, { "ros.unknown_ros_pdu", PI_UNDECODED, PI_WARN, "Unknown ROS PDU", EXPFILL }},
  };

  expert_module_t* expert_ros;

  /* Register protocol */
  proto_ros = proto_register_protocol(PNAME, PSNAME, PFNAME);
  new_register_dissector("ros", dissect_ros, proto_ros);
  /* Register fields and subtrees */
  proto_register_field_array(proto_ros, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_ros = expert_register_protocol(proto_ros);
  expert_register_field_array(expert_ros, ei, array_length(ei));

  ros_oid_dissector_table = register_dissector_table("ros.oid", "ROS OID Dissectors", FT_STRING, BASE_NONE);
  oid_table=g_hash_table_new(g_str_hash, g_str_equal);
  protocol_table=g_hash_table_new(g_str_hash, g_str_equal);

  ros_handle = find_dissector("ros");

  register_init_routine(ros_reinit);
}
Exemplo n.º 17
0
void
proto_register_mtp2(void)
{

  static hf_register_info hf[] = {
    { &hf_mtp2_bsn,       { "Backward sequence number", "mtp2.bsn",      FT_UINT8,  BASE_DEC, NULL,                    BSN_MASK,            NULL, HFILL } },
    { &hf_mtp2_ext_bsn,   { "Backward sequence number", "mtp2.bsn",      FT_UINT16, BASE_DEC, NULL,                    EXTENDED_BSN_MASK,   NULL, HFILL } },
    { &hf_mtp2_ext_res,   { "Reserved",                 "mtp2.res",      FT_UINT16, BASE_DEC, NULL,                    EXTENDED_RES_MASK,   NULL, HFILL } },
    { &hf_mtp2_bib,       { "Backward indicator bit",   "mtp2.bib",      FT_UINT8,  BASE_DEC, NULL,                    BIB_MASK,            NULL, HFILL } },
    { &hf_mtp2_ext_bib,   { "Backward indicator bit",   "mtp2.bib",      FT_UINT16, BASE_DEC, NULL,                    EXTENDED_BIB_MASK,   NULL, HFILL } },
    { &hf_mtp2_fsn,       { "Forward sequence number",  "mtp2.fsn",      FT_UINT8,  BASE_DEC, NULL,                    FSN_MASK,            NULL, HFILL } },
    { &hf_mtp2_ext_fsn,   { "Forward sequence number",  "mtp2.fsn",      FT_UINT16, BASE_DEC, NULL,                    EXTENDED_FSN_MASK,   NULL, HFILL } },
    { &hf_mtp2_fib,       { "Forward indicator bit",    "mtp2.fib",      FT_UINT8,  BASE_DEC, NULL,                    FIB_MASK,            NULL, HFILL } },
    { &hf_mtp2_ext_fib,   { "Forward indicator bit",    "mtp2.fib",      FT_UINT16, BASE_DEC, NULL,                    EXTENDED_FIB_MASK,   NULL, HFILL } },
    { &hf_mtp2_li,        { "Length Indicator",         "mtp2.li",       FT_UINT8,  BASE_DEC, NULL,                    LI_MASK,             NULL, HFILL } },
    { &hf_mtp2_ext_li,    { "Length Indicator",         "mtp2.li",       FT_UINT16, BASE_DEC, NULL,                    EXTENDED_LI_MASK,    NULL, HFILL } },
    { &hf_mtp2_spare,     { "Spare",                    "mtp2.spare",    FT_UINT8,  BASE_DEC, NULL,                    SPARE_MASK,          NULL, HFILL } },
    { &hf_mtp2_ext_spare, { "Spare",                    "mtp2.spare",    FT_UINT16, BASE_DEC, NULL,                    EXTENDED_SPARE_MASK, NULL, HFILL } },
    { &hf_mtp2_sf,        { "Status field",             "mtp2.sf",       FT_UINT8,  BASE_DEC, VALS(status_field_vals), 0x0,                 NULL, HFILL } },
    { &hf_mtp2_sf_extra,  { "Status field extra octet", "mtp2.sf_extra", FT_UINT8,  BASE_HEX, NULL,                    0x0,                 NULL, HFILL } }
  };

  static gint *ett[] = {
    &ett_mtp2
  };

  static ei_register_info ei[] = {
     { &ei_mtp2_checksum_error, { "mtp2.checksum.error", PI_CHECKSUM, PI_WARN, "MTP2 Frame CheckFCS 16 Error", EXPFILL }},
  };

  module_t *mtp2_module;
  expert_module_t* expert_mtp2;

  proto_mtp2 = proto_register_protocol("Message Transfer Part Level 2", "MTP2", "mtp2");
  mtp2_handle = register_dissector("mtp2", dissect_mtp2, proto_mtp2);

  proto_register_field_array(proto_mtp2, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_mtp2 = expert_register_protocol(proto_mtp2);
  expert_register_field_array(expert_mtp2, ei, array_length(ei));

  mtp2_module = prefs_register_protocol(proto_mtp2, NULL);
  prefs_register_bool_preference(mtp2_module,
                                 "use_extended_sequence_numbers",
                                 "Use extended sequence numbers",
                                 "Whether the MTP2 dissector should use extended sequence numbers as described in Q.703, Annex A as a default.",
                                 &use_extended_sequence_numbers_default);


}
Exemplo n.º 18
0
void proto_register_isdn_sup(void) {

	/* List of fields */
  static hf_register_info hf[] = {
    { &hf_isdn_sup,
      { "isdn_sup", "isdn_sup.1",
        FT_INT32, BASE_DEC, NULL, 0,
        NULL, HFILL }
	},
    { &hf_isdn_sup_operation,
	  { "Operation", "isdn_sup.operation",
        FT_UINT8, BASE_DEC, VALS(isdn_sup_str_operation), 0x0,
        NULL, HFILL }
	},
    { &hf_isdn_sup_error,
	  { "Error", "isdn_sup.error",
        FT_UINT8, BASE_DEC, VALS(isdn_sup_str_error), 0x0,
        NULL, HFILL }
	},

#include "packet-isdn-sup-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_isdn_sup,

#include "packet-isdn-sup-ettarr.c"
  };

  static ei_register_info ei[] = {
#if 0
    { &ei_isdn_sup_unsupported_arg_type, { "isdn_sup.unsupported.arg_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ARGUMENT TYPE (ETSI sup)", EXPFILL }},
#endif
    { &ei_isdn_sup_unsupported_result_type, { "isdn_sup.unsupported.result_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED RESULT TYPE (ETSI sup)", EXPFILL }},
    { &ei_isdn_sup_unsupported_error_type, { "isdn_sup.unsupported.error_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ERROR TYPE (ETSI sup)", EXPFILL }},
  };

  expert_module_t* expert_isdn_sup;

  /* Register protocol */
  proto_isdn_sup = proto_register_protocol(PNAME, PSNAME, PFNAME);

  /* Register fields and subtrees */
  proto_register_field_array(proto_isdn_sup, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_isdn_sup = expert_register_protocol(proto_isdn_sup);
  expert_register_field_array(expert_isdn_sup, ei, array_length(ei));
}
Exemplo n.º 19
0
void
proto_register_icp(void)
{
	static hf_register_info hf[] = {
		{ &hf_icp_opcode,
		  { "Opcode", "icp.opcode", FT_UINT8, BASE_HEX, VALS(opcode_vals),
		    0x0, NULL, HFILL }},

		{ &hf_icp_version,
		  { "Version", "icp.version", FT_UINT8, BASE_DEC, NULL,
		    0x0, NULL, HFILL }},

		{ &hf_icp_length,
		  { "Length", "icp.length", FT_UINT16, BASE_DEC, NULL,
		    0x0, NULL, HFILL }},

		{ &hf_icp_request_nr,
		  { "Request Number", "icp.nr", FT_UINT32, BASE_DEC, NULL,
		    0x0, NULL, HFILL }},

      { &hf_icp_requester_host_address, { "Requester Host Address", "icp.requester_host_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
      { &hf_icp_url, { "URL", "icp.url", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
      { &hf_icp_object_length, { "Object length", "icp.object_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
      { &hf_icp_object_data, { "Object data", "icp.object_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
      { &hf_icp_option_hit_obj, { "Option: ICP_FLAG_HIT_OBJ", "icp.option.hit_obj", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
      { &hf_icp_option_src_rtt, { "Option: ICP_FLAG_SRC_RTT", "icp.option.src_rtt", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
      { &hf_icp_rtt, { "RTT", "icp.rtt", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
      { &hf_icp_sender_host_ip_address, { "Sender Host IP address", "icp.sender_host_ip_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
	};
	static gint *ett[] = {
		&ett_icp,
		&ett_icp_payload,
	};

	static ei_register_info ei[] = {
		{ &ei_icp_fragmented_packet, { "icp.fragmented_packet", PI_PROTOCOL, PI_WARN, "Packet is fragmented", EXPFILL }},
	};

	expert_module_t* expert_icp;

	proto_icp = proto_register_protocol("Internet Cache Protocol", "ICP", "icp");

	proto_register_field_array(proto_icp, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_icp = expert_register_protocol(proto_icp);
	expert_register_field_array(expert_icp, ei, array_length(ei));
}
Exemplo n.º 20
0
/*--- proto_register_dop -------------------------------------------*/
void proto_register_dop(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
#include "packet-dop-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_dop,
    &ett_dop_unknown,
#include "packet-dop-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_dop_unknown_binding_parameter, { "dop.unknown_binding_parameter", PI_UNDECODED, PI_WARN, "Unknown binding-parameter", EXPFILL }},
  };

  expert_module_t* expert_dop;
  module_t *dop_module;

  /* Register protocol */
  proto_dop = proto_register_protocol(PNAME, PSNAME, PFNAME);

  new_register_dissector("dop", dissect_dop, proto_dop);

  dop_dissector_table = register_dissector_table("dop.oid", "DOP OID Dissectors", FT_STRING, BASE_NONE);

  /* Register fields and subtrees */
  proto_register_field_array(proto_dop, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_dop = expert_register_protocol(proto_dop);
  expert_register_field_array(expert_dop, ei, array_length(ei));

  /* Register our configuration options for DOP, particularly our port */

  dop_module = prefs_register_protocol_subtree("OSI/X.500", proto_dop, prefs_register_dop);

  prefs_register_uint_preference(dop_module, "tcp.port", "DOP TCP Port",
				 "Set the port for DOP operations (if other"
				 " than the default of 102)",
				 10, &global_dop_tcp_port);


}
Exemplo n.º 21
0
/*--- proto_register_h450 -------------------------------------------*/
void proto_register_h450(void) {

  /* List of fields */
  static hf_register_info hf[] = {
    { &hf_h450_operation, { "Operation", "h450.operation",
                           FT_UINT8, BASE_DEC, VALS(h450_str_operation), 0x0,
                           NULL, HFILL }},
    { &hf_h450_error,     { "Error", "h450.error",
                           FT_UINT8, BASE_DEC, VALS(h450_str_error), 0x0,
                           NULL, HFILL }},
#include "packet-h450-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
#include "packet-h450-ettarr.c"
  };

  static ei_register_info ei[] = {
    { &ei_h450_unsupported_arg_type, { "h450.unsupported.arg_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ARGUMENT TYPE (H.450)", EXPFILL }},
    { &ei_h450_unsupported_result_type, { "h450.unsupported.result_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED RESULT TYPE (H.450)", EXPFILL }},
    { &ei_h450_unsupported_error_type, { "h450.unsupported.error_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ERROR TYPE (H.450)", EXPFILL }},
  };

  expert_module_t* expert_h450;

  /* Register protocol */
  proto_h450 = proto_register_protocol(PNAME, PSNAME, PFNAME);
  register_dissector("h4501", dissect_h450_H4501SupplementaryService_PDU, proto_h450);
  /* Register fields and subtrees */
  proto_register_field_array(proto_h450, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_h450 = expert_register_protocol(proto_h450);
  expert_register_field_array(expert_h450, ei, array_length(ei));

  rose_ctx_init(&h450_rose_ctx);

  /* Register dissector tables */
  h450_rose_ctx.arg_global_dissector_table = register_dissector_table("h450.ros.global.arg", "H.450 Operation Argument (global opcode)", proto_h450, FT_STRING, BASE_NONE, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
  h450_rose_ctx.res_global_dissector_table = register_dissector_table("h450.ros.global.res", "H.450 Operation Result (global opcode)", proto_h450, FT_STRING, BASE_NONE, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
  h450_rose_ctx.arg_local_dissector_table = register_dissector_table("h450.ros.local.arg", "H.450 Operation Argument (local opcode)", proto_h450, FT_UINT32, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
  h450_rose_ctx.res_local_dissector_table = register_dissector_table("h450.ros.local.res", "H.450 Operation Result (local opcode)", proto_h450, FT_UINT32, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
  h450_rose_ctx.err_global_dissector_table = register_dissector_table("h450.ros.global.err", "H.450 Error (global opcode)", proto_h450, FT_STRING, BASE_NONE, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
  h450_rose_ctx.err_local_dissector_table = register_dissector_table("h450.ros.local.err", "H.450 Error (local opcode)", proto_h450, FT_UINT32, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);

}
Exemplo n.º 22
0
/*--- proto_register_dsp -------------------------------------------*/
void proto_register_dsp(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
#include "packet-dsp-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_dsp,
#include "packet-dsp-ettarr.c"
  };
  static ei_register_info ei[] = {
    { &ei_dsp_unsupported_opcode, { "dsp.unsupported_opcode", PI_UNDECODED, PI_WARN, "Unsupported DSP opcode", EXPFILL }},
    { &ei_dsp_unsupported_errcode, { "dsp.unsupported_errcode", PI_UNDECODED, PI_WARN, "Unsupported DSP errcode", EXPFILL }},
    { &ei_dsp_unsupported_pdu, { "dsp.unsupported_pdu", PI_UNDECODED, PI_WARN, "Unsupported DSP PDU", EXPFILL }},
    { &ei_dsp_zero_pdu, { "dsp.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte DSP PDU", EXPFILL }},
  };

  module_t *dsp_module;
  expert_module_t* expert_dsp;

  /* Register protocol */
  proto_dsp = proto_register_protocol(PNAME, PSNAME, PFNAME);

  new_register_dissector("dsp", dissect_dsp, proto_dsp);

  /* Register fields and subtrees */
  proto_register_field_array(proto_dsp, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_dsp = expert_register_protocol(proto_dsp);
  expert_register_field_array(expert_dsp, ei, array_length(ei));

  /* Register our configuration options for DSP, particularly our port */

  dsp_module = prefs_register_protocol_subtree("OSI/X.500", proto_dsp, prefs_register_dsp);

  prefs_register_uint_preference(dsp_module, "tcp.port", "DSP TCP Port",
				 "Set the port for DSP operations (if other"
				 " than the default of 102)",
				 10, &global_dsp_tcp_port);


}
Exemplo n.º 23
0
/*--- proto_register_dap -------------------------------------------*/
void proto_register_dap(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
#include "packet-dap-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_dap,
#include "packet-dap-ettarr.c"
  };

  static ei_register_info ei[] = {
    { &ei_dap_anonymous, { "dap.anonymous", PI_PROTOCOL, PI_NOTE, "Anonymous", EXPFILL }},
  };

  module_t *dap_module;
  expert_module_t* expert_dap;

  /* Register protocol */
  proto_dap = proto_register_protocol(PNAME, PSNAME, PFNAME);

  /* Register fields and subtrees */
  proto_register_field_array(proto_dap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_dap = expert_register_protocol(proto_dap);
  expert_register_field_array(expert_dap, ei, array_length(ei));

  /* Register our configuration options for DAP, particularly our port */

  dap_module = prefs_register_protocol_subtree("OSI/X.500", proto_dap, NULL);

  prefs_register_obsolete_preference(dap_module, "tcp.port");

  prefs_register_static_text_preference(dap_module, "tcp_port_info",
            "The TCP ports used by the DAP protocol should be added to the TPKT preference \"TPKT TCP ports\", or the IDMP preference \"IDMP TCP Port\", or by selecting \"TPKT\" as the \"Transport\" protocol in the \"Decode As\" dialog.",
            "DAP TCP Port preference moved information");
}
Exemplo n.º 24
0
void
proto_register_redback(void)
{
#ifndef HAVE_HFI_SECTION_INIT
	static header_field_info *hfi[] = {
		&hfi_redback_context,
		&hfi_redback_flags,
		&hfi_redback_circuit,
		&hfi_redback_length,
		&hfi_redback_protocol,
		&hfi_redback_l3offset,
		&hfi_redback_dataoffset,
		&hfi_redback_padding,
		&hfi_redback_unknown,
	};
#endif

	static gint *ett[] = {
		&ett_redback
	};

	static ei_register_info ei[] = {
		{ &ei_redback_protocol, { "redback.protocol.unknown", PI_PROTOCOL, PI_WARN, "Unknown Protocol Data", EXPFILL }},
	};

	expert_module_t* expert_redback;
	int proto_redback;

	proto_redback = proto_register_protocol("Redback", "Redback", "redback");
	hfi_redback   = proto_registrar_get_nth(proto_redback);

	proto_register_fields(proto_redback, hfi, array_length(hfi));
	proto_register_subtree_array(ett, array_length(ett));
	expert_redback = expert_register_protocol(proto_redback);
	expert_register_field_array(expert_redback, ei, array_length(ei));

	redback_handle = create_dissector_handle(dissect_redback, proto_redback);
}
Exemplo n.º 25
0
/* registers this protocol with Wireshark */
void proto_register_mpa(void)
{
	/* setup list of header fields */
	static hf_register_info hf[] = {
			{ &hf_mpa_req, {
					"Request frame header", "iwarp_mpa.req",
					FT_NONE, BASE_NONE, NULL, 0x0,
					NULL, HFILL	} },
			{ &hf_mpa_rep, {
					"Reply frame header", "iwarp_mpa.rep",
					FT_NONE, BASE_NONE, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_fpdu, {
					"FPDU", "iwarp_mpa.fpdu",
					FT_NONE, BASE_NONE, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_marker, {
					"Markers", "iwarp_mpa.markers",
					FT_NONE, BASE_NONE, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_key_req, {
					"ID Req frame", "iwarp_mpa.key.req",
					FT_BYTES, BASE_NONE, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_key_rep, {
					"ID Rep frame", "iwarp_mpa.key.rep",
					FT_BYTES, BASE_NONE, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_flag_m, {
					"Marker flag", "iwarp_mpa.marker_flag",
					FT_BOOLEAN, 8, NULL, MPA_MARKER_FLAG,
					NULL, HFILL } },
			{ &hf_mpa_flag_c, {
					"CRC flag", "iwarp_mpa.crc_flag",
					FT_BOOLEAN, 8, NULL, MPA_CRC_FLAG,
					NULL, HFILL } },
			{ &hf_mpa_flag_r, {
					"Connection rejected flag",
					"iwarp_mpa.rej_flag", FT_BOOLEAN, 8, NULL, MPA_REJECT_FLAG,
					NULL, HFILL } },
			{ &hf_mpa_flag_res, {
					"Reserved", "iwarp_mpa.res",
					FT_UINT8, BASE_HEX, NULL, MPA_RESERVED_FLAG,
					NULL, HFILL } },
			{ &hf_mpa_rev, {
					"Revision", "iwarp_mpa.rev",
					FT_UINT8, BASE_DEC, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_pd_length, {
					"Private data length", "iwarp_mpa.pdlength",
					FT_UINT16, BASE_DEC, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_private_data, {
					"Private data", "iwarp_mpa.privatedata",
					FT_BYTES, BASE_NONE, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_ulpdu_length, {
					"ULPDU length", "iwarp_mpa.ulpdulength",
					FT_UINT16, BASE_DEC, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_pad, {
					"Padding", "iwarp_mpa.pad",
					FT_BYTES, BASE_NONE, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_crc, {
					"CRC", "iwarp_mpa.crc",
					FT_UINT32, BASE_HEX, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_crc_check, {
					"CRC check", "iwarp_mpa.crc_check",
					FT_UINT32, BASE_HEX, NULL, 0x0,
					NULL, HFILL } },
			{ &hf_mpa_marker_res, {
					"Reserved", "iwarp_mpa.marker_res",
					FT_UINT16, BASE_HEX, NULL, 0x0,
					"Marker: Reserved", HFILL } },
			{ &hf_mpa_marker_fpduptr, {
					"FPDU back pointer", "iwarp_mpa.marker_fpduptr",
					FT_UINT16, BASE_DEC, NULL, 0x0,
					"Marker: FPDU Pointer", HFILL } }
	};

	/* setup protocol subtree array */
	static gint *ett[] = {
			&ett_mpa,
			&ett_mpa_req,
			&ett_mpa_rep,
			&ett_mpa_fpdu,
			&ett_mpa_marker
	};

	static ei_register_info ei[] = {
		{ &ei_mpa_res_field_not_set0, { "iwarp_mpa.res.not_set0", PI_REQUEST_CODE, PI_WARN, "Res field is NOT set to zero as required by RFC 5044", EXPFILL }},
		{ &ei_mpa_rev_field_not_set1, { "iwarp_mpa.rev.not_set1", PI_REQUEST_CODE, PI_WARN, "Rev field is NOT set to one as required by RFC 5044", EXPFILL }},
		{ &ei_mpa_reject_bit_responder, { "iwarp_mpa.reject_bit_responder", PI_RESPONSE_CODE, PI_NOTE, "Reject bit set by Responder", EXPFILL }},
		{ &ei_mpa_bad_length, { "iwarp_mpa.bad_length", PI_MALFORMED, PI_ERROR, "Bad length", EXPFILL }},
	};

	expert_module_t* expert_iwarp_mpa;

	/* register the protocol name and description */
	proto_iwarp_mpa = proto_register_protocol(
		"iWARP Marker Protocol data unit Aligned framing",
		"IWARP_MPA", "iwarp_mpa");

	/* required function calls to register the header fields and subtrees */
	proto_register_field_array(proto_iwarp_mpa, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_iwarp_mpa = expert_register_protocol(proto_iwarp_mpa);
	expert_register_field_array(expert_iwarp_mpa, ei, array_length(ei));
}
Exemplo n.º 26
0
void
proto_register_wifi_display(void)
{
  static hf_register_info hf[] = {
    { &hf_wfd_subelem_id,
      { "Subelement ID", "wifi_display.subelem.id",
        FT_UINT8, BASE_DEC, VALS(wfd_subelem_ids), 0, NULL, HFILL }},
    { &hf_wfd_subelem_len,
      { "Length", "wifi_display.subelem.length",
        FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_type,
      { "Device type", "wifi_display.subelem.dev_info.type",
        FT_UINT16, BASE_DEC, VALS(wfd_dev_info_types), 0x0003, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_coupled_sink_source,
      { "Coupled sink operation supported by WFD source",
        "wifi_display.subelem.dev_info.coupled_sink_by_source",
        FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_coupled_sink_sink,
      { "Coupled sink operation supported by WFD sink",
        "wifi_display.subelem.dev_info.coupled_sink_by_sink",
        FT_BOOLEAN, 16, NULL, 0x0008, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_available,
      { "Available for WFD Session", "wifi_display.subelem.dev_info.available",
        FT_UINT16, BASE_DEC, VALS(wfd_dev_info_avail), 0x0030, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_wsd,
      { "WFD Service Discovery", "wifi_display.subelem.dev_info.wsd",
        FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_pc,
      { "Preferred Connectivity", "wifi_display.subelem.dev_info.pc",
        FT_UINT16, BASE_DEC, VALS(wfd_dev_info_pc), 0x0080, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_content_protection,
      { "Content Protection using HDCP2.0",
        "wifi_display.subelem.dev_info.content_protection",
        FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_time_sync,
      { "Time Synchronization using 802.1AS",
        "wifi_display.subelem.dev_info.time_sync",
        FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_audio_unsupp_pri_sink,
      { "Audio un-supported at Primary sink",
        "wifi_display.subelem.session.audio_unsupp_pri_sink",
        FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_audio_only_supp_source,
      { "Audio only support af WFD source",
        "wifi_display.subelem.session.audio_only_supp_source",
        FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_tdls_persistent_group,
      { "TDLS Persistent Group",
        "wifi_display.subelem.session.tdls_persistent_group",
        FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_tdls_persistent_group_reinvoke,
      { "TDLS Persistent Group Re-invoke",
        "wifi_display.subelem.session.tdls_persistent_group_reinvoke",
        FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_reserved,
      { "Reserved", "wifi_display.subelem.session.reserved",
        FT_UINT16, BASE_DEC, NULL, 0xc000, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_control_port,
      { "Session Management Control Port",
        "wifi_display.subelem.dev_info.control_port",
        FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_dev_info_max_throughput,
      { "WFD Device Maximum Throughput (Mbps)",
        "wifi_display.subelem.dev_info.max_throughput",
        FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_assoc_bssid,
      { "Associated BSSID", "wifi_display.subelem.assoc_bssid.bssid",
        FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_coupled_sink_status_bitmap,
      { "Coupled Sink Status bitmap",
        "wifi_display.subelem.coupled_sink.status",
        FT_UINT8, BASE_DEC, VALS(wfd_coupled_sink_status_bitmap), 0x03,
        NULL, HFILL }},
    { &hf_wfd_subelem_coupled_sink_reserved,
      { "Reserved", "wifi_display.subelem.coupled_sink.reserved",
        FT_UINT8, BASE_DEC, NULL, 0xfc, NULL, HFILL }},
    { &hf_wfd_subelem_coupled_sink_mac_addr,
      { "Coupled Sink MAC Address",
        "wifi_display.subelem.coupled_sink.mac_addr",
        FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_session_descr_len,
      { "Descriptor length",
        "wifi_display.subelem.session.descr_len",
        FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_addr,
      { "Device address",
        "wifi_display.subelem.session.device_address",
        FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_session_assoc_bssid,
      { "Associated BSSID",
        "wifi_display.subelem.session.associated_bssid",
        FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_type,
      { "Device type", "wifi_display.subelem.session.type",
        FT_UINT16, BASE_DEC, VALS(wfd_dev_info_types), 0x0003, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_coupled_sink_source,
      { "Coupled sink operation supported by WFD source",
        "wifi_display.subelem.session.coupled_sink_by_source",
        FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_coupled_sink_sink,
      { "Coupled sink operation supported by WFD sink",
        "wifi_display.subelem.session.coupled_sink_by_sink",
        FT_BOOLEAN, 16, NULL, 0x0008, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_available,
      { "Available for WFD Session", "wifi_display.subelem.session.available",
        FT_UINT16, BASE_DEC, VALS(wfd_dev_info_avail), 0x0030, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_wsd,
      { "WFD Service Discovery", "wifi_display.subelem.session.wsd",
        FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_pc,
      { "Preferred Connectivity", "wifi_display.subelem.session.pc",
        FT_UINT16, BASE_DEC, VALS(wfd_dev_info_pc), 0x0080, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_content_protection,
      { "Content Protection using HDCP2.0",
        "wifi_display.subelem.session.content_protection",
        FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_time_sync,
      { "Time Synchronization using 802.1AS",
        "wifi_display.subelem.session.time_sync",
        FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_audio_unsupp_pri_sink,
      { "Audio un-supported at Primary sink",
        "wifi_display.subelem.session.audio_unsupp_pri_sink",
        FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_audio_only_supp_source,
      { "Audio only support af WFD source",
        "wifi_display.subelem.session.audio_only_supp_source",
        FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_tdls_persistent_group,
      { "TDLS Persistent Group",
        "wifi_display.subelem.session.tdls_persistent_group",
        FT_BOOLEAN, 16, NULL, 0x1000, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_tdls_persistent_group_reinvoke,
      { "TDLS Persistent Group Re-invoke",
        "wifi_display.subelem.session.tdls_persistent_group_reinvoke",
        FT_BOOLEAN, 16, NULL, 0x2000, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_reserved,
      { "Reserved", "wifi_display.subelem.session.reserved",
        FT_UINT16, BASE_DEC, NULL, 0xc000, NULL, HFILL }},
    { &hf_wfd_subelem_session_dev_info_max_throughput,
      { "WFD Device Maximum Throughput (Mbps)",
        "wifi_display.subelem.session.max_throughput",
        FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
    { &hf_wfd_subelem_session_coupled_sink_status_bitmap,
      { "Coupled Sink Status bitmap",
        "wifi_display.subelem.session.coupled_sink_status",
        FT_UINT8, BASE_DEC, VALS(wfd_coupled_sink_status_bitmap), 0x03,
        NULL, HFILL }},
    { &hf_wfd_subelem_session_coupled_sink_reserved,
      { "Reserved", "wifi_display.subelem.session.coupled_sink.reserved",
        FT_UINT8, BASE_DEC, NULL, 0xfc, NULL, HFILL }},
    { &hf_wfd_subelem_session_coupled_sink_addr,
      { "Coupled peer sink address",
        "wifi_display.subelem.session.coupled_peer_sink_addr",
        FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }}
  };
  static gint *ett[] = {
    &ett_wfd_subelem,
    &ett_wfd_dev_info_descr
  };

  static ei_register_info ei[] = {
      { &ei_wfd_subelem_len_invalid, { "wifi_display.subelem.length.invalid", PI_MALFORMED, PI_ERROR, "Subelement length invalid", EXPFILL }},
      { &ei_wfd_subelem_session_descr_invalid, { "wifi_display.subelem.session.descr_invalid", PI_MALFORMED, PI_ERROR, "Invalid WFD Device Info Descriptor", EXPFILL }},
  };

  expert_module_t* expert_wifi_display;

  proto_wifi_display = proto_register_protocol("Wi-Fi Display", "WFD", "wifi_display");
  proto_register_field_array(proto_wifi_display, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  expert_wifi_display = expert_register_protocol(proto_wifi_display);
  expert_register_field_array(expert_wifi_display, ei, array_length(ei));
}
Exemplo n.º 27
0
/*--- proto_register_p1 -------------------------------------------*/
void proto_register_p1(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
      /* "Created by defining PDU in .cnf */
    { &hf_p1_MTABindArgument_PDU,
      { "MTABindArgument", "p1.MTABindArgument",
        FT_UINT32, BASE_DEC, VALS(p1_MTABindArgument_vals), 0,
        "p1.MTABindArgument", HFILL }},
    { &hf_p1_MTABindResult_PDU,
      { "MTABindResult", "p1.MTABindResult",
        FT_UINT32, BASE_DEC, VALS(p1_MTABindResult_vals), 0,
        "p1.MTABindResult", HFILL }},
    { &hf_p1_MTABindError_PDU,
      { "MTABindError", "p1.MTABindError",
        FT_UINT32, BASE_DEC, VALS(p1_MTABindError_vals), 0,
        "p1.MTABindError", HFILL }},
    { &hf_p1_MTS_APDU_PDU,
      { "MTS-APDU", "p1.MTS_APDU",
        FT_UINT32, BASE_DEC, VALS(p1_MTS_APDU_vals), 0,
        "p1.MTS_APDU", HFILL }},

#include "packet-p1-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_p1,
    &ett_p3,
    &ett_p1_content_unknown,
    &ett_p1_bilateral_information,
    &ett_p1_additional_information,
    &ett_p1_unknown_standard_extension,
    &ett_p1_unknown_extension_attribute_type,
    &ett_p1_unknown_tokendata_type,
#include "packet-p1-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_p1_unknown_extension_attribute_type, { "p1.unknown.extension_attribute_type", PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type", EXPFILL }},
     { &ei_p1_unknown_standard_extension, { "p1.unknown.standard_extension", PI_UNDECODED, PI_WARN, "Unknown standard-extension", EXPFILL }},
     { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "P1 Unknown Content (unknown built-in content-type)", EXPFILL }},
     { &ei_p1_unknown_tokendata_type, { "p1.unknown.tokendata_type", PI_UNDECODED, PI_WARN, "Unknown tokendata-type", EXPFILL }},
     { &ei_p1_unsupported_pdu, { "p1.unsupported_pdu", PI_UNDECODED, PI_WARN, "Unsupported P1 PDU", EXPFILL }},
     { &ei_p1_zero_pdu, { "p1.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte P1 PDU", EXPFILL }},
  };

  expert_module_t* expert_p1;
  module_t *p1_module;

  /* Register protocol */
  proto_p1 = proto_register_protocol(PNAME, PSNAME, PFNAME);
  new_register_dissector("p1", dissect_p1, proto_p1);

  proto_p3 = proto_register_protocol("X.411 Message Access Service", "P3", "p3");

  /* Register fields and subtrees */
  proto_register_field_array(proto_p1, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_p1 = expert_register_protocol(proto_p1);
  expert_register_field_array(expert_p1, ei, array_length(ei));

  p1_extension_dissector_table = register_dissector_table("p1.extension", "P1-EXTENSION", FT_UINT32, BASE_DEC);
  p1_extension_attribute_dissector_table = register_dissector_table("p1.extension-attribute", "P1-EXTENSION-ATTRIBUTE", FT_UINT32, BASE_DEC);
  p1_tokendata_dissector_table = register_dissector_table("p1.tokendata", "P1-TOKENDATA", FT_UINT32, BASE_DEC);

  /* Register our configuration options for P1, particularly our port */

  p1_module = prefs_register_protocol_subtree("OSI/X.400", proto_p1, prefs_register_p1);

  prefs_register_uint_preference(p1_module, "tcp.port", "P1 TCP Port",
                 "Set the port for P1 operations (if other"
                 " than the default of 102)",
                 10, &global_p1_tcp_port);

  register_ber_syntax_dissector("P1 Message", proto_p1, dissect_p1_mts_apdu);
#include "packet-p1-syn-reg.c"
}
Exemplo n.º 28
0
void
proto_register_fip(void)
{
    /* Setup list of header fields  See Section 1.6.1 for details*/
    static hf_register_info hf[] = {
        /*
         * FIP header fields.
         */
        { &hf_fip_ver,
          { "Version", "fip.ver",
            FT_UINT8, BASE_DEC, NULL, 0xf0,
            NULL, HFILL}},

        { &hf_fip_reserved12,
          { "Reserved", "fip.reserved",
            FT_UINT16, BASE_HEX, NULL, 0x0fff,
            NULL, HFILL}},

        { &hf_fip_op,
          { "Opcode", "fip.opcode",
            FT_UINT16, BASE_HEX, VALS(fip_opcodes), 0,
            NULL, HFILL}},

        { &hf_fip_reserved8,
          { "Reserved", "fip.reserved",
            FT_UINT8, BASE_HEX, NULL, 0x0,
            NULL, HFILL}},

        { &hf_fip_disc_subcode,
          { "Discovery Subcode", "fip.disc_subcode",
            FT_UINT8, BASE_HEX, VALS(fip_disc_subcodes), 0,
            NULL, HFILL}},

        { &hf_fip_ls_subcode,
          { "Link Service Subcode", "fip.ls.subcode",
            FT_UINT8, BASE_HEX, VALS(fip_ls_subcodes), 0,
            NULL, HFILL}},

        { &hf_fip_ctrl_subcode,
          { "Control Subcode", "fip.ctrl_subcode",
            FT_UINT8, BASE_HEX, VALS(fip_ctrl_subcodes), 0,
            NULL, HFILL}},

        { &hf_fip_vlan_subcode,
          { "VLAN Subcode", "fip.vlan_subcode",
            FT_UINT8, BASE_HEX, VALS(fip_vlan_subcodes), 0,
            NULL, HFILL}},

        { &hf_fip_vn2vn_subcode,
          { "VN2VN Subcode", "fip.vn2vn_subcode",
            FT_UINT8, BASE_HEX, VALS(fip_vn2vn_subcodes), 0,
            NULL, HFILL}},

        { &hf_fip_hex_subcode,
          { "Unknown Subcode", "fip.subcode",
            FT_UINT8, BASE_HEX, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_dlen,
          { "Length of Descriptors (words)", "fip.dl_len",
            FT_UINT16, BASE_DEC, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_flags,
          { "Flags", "fip.flags",
            FT_UINT16, BASE_HEX, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_flag_fpma,
          { "Fabric Provided MAC addr", "fip.flags.fpma",
            FT_BOOLEAN, 16, NULL, FIP_FL_FPMA,
            NULL, HFILL}},

        { &hf_fip_flag_spma,
          { "Server Provided MAC addr", "fip.flags.spma",
            FT_BOOLEAN, 16, NULL, FIP_FL_SPMA,
            NULL, HFILL}},

        { &hf_fip_flag_rec_p2p,
          { "REC/P2P", "fip.flags.rec_p2p",
            FT_BOOLEAN, 16, NULL, FIP_FL_REC_P2P,
            NULL, HFILL}},

        { &hf_fip_flag_avail,
          { "Available", "fip.flags.available",
            FT_BOOLEAN, 16, NULL, FIP_FL_AVAIL,
            NULL, HFILL}},

        { &hf_fip_flag_sol,
          { "Solicited", "fip.flags.sol",
            FT_BOOLEAN, 16, NULL, FIP_FL_SOL,
            NULL, HFILL}},

        { &hf_fip_flag_fport,
          { "F_Port", "fip.flags.fport",
            FT_BOOLEAN, 16, NULL, FIP_FL_FPORT,
            NULL, HFILL}},

        { &hf_fip_desc_type,
          { "Descriptor Type", "fip.desc_type",
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &fip_desc_types_ext, 0,
            NULL, HFILL}},

        { &hf_fip_desc_len,
          { "Descriptor Length (words)", "fip.desc_len",
            FT_UINT8, BASE_DEC, NULL, 0,
            NULL, HFILL}},

        /*
         * Various descriptor fields.
         */
        { &hf_fip_desc_pri,
          { "Priority", "fip.pri",
            FT_UINT8, BASE_DEC, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_mac,
          { "MAC Address", "fip.mac",
            FT_ETHER, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_map,
          { "FC-MAP-OUI", "fip.map",
            FT_BYTES, SEP_DOT, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_name,
          { "Switch or Node Name", "fip.name",
            FT_FCWWN, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_fab_vfid,
          { "VFID", "fip.fab.vfid",
            FT_UINT16, BASE_DEC, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_fab_map,
          { "FC-MAP", "fip.fab.map",
            FT_BYTES, SEP_DOT, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_fab_name,
          { "Fabric Name", "fip.fab.name",
            FT_FCWWN, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_fcoe_size,
          { "Max FCoE frame size", "fip.fcoe_size",
            FT_UINT16, BASE_DEC, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_vn_mac,
          { "VN_Port MAC Address", "fip.vn.mac",
            FT_ETHER, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_vn_fid,
          { "VN_Port FC_ID", "fip.vn.fc_id",
            FT_UINT32, BASE_HEX, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_vn_wwpn,
          { "Port Name", "fip.vn.pwwn",
            FT_FCWWN, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_fka,
          { "FKA_ADV_Period", "fip.fka",
            FT_UINT32, BASE_DEC, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_vend,
          { "Vendor-ID", "fip.vendor",
            FT_BYTES, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_vend_data,
          { "Vendor-specific data", "fip.vendor.data",
            FT_BYTES, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_vlan,
          { "VLAN", "fip.vlan",
            FT_UINT16, BASE_DEC, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_fc4f_types,
          { "FC4 Types", "fip.fc4f.types",
            FT_UINT32, BASE_HEX, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_desc_fcp_feat,
          { "FCP Features", "fip.fc4f.feat.fcp",
            FT_UINT32, BASE_HEX, NULL, 0xf,
            NULL, HFILL}},

        { &hf_fip_type_ip,
          { "IP", "fip.fc4f.ip",
            FT_BOOLEAN, 32, NULL, 1 << 5,
            NULL, HFILL}},

        { &hf_fip_type_fcp,
          { "FCP", "fip.fc4f.fcp",
            FT_BOOLEAN, 32, NULL, 1 << 8,
            NULL, HFILL}},

        { &hf_fip_type_gs3,
          { "GS3", "fip.fc4f.gs3",
            FT_BOOLEAN, 32, NULL, 1 << 0,
            NULL, HFILL}},

        { &hf_fip_fcp_feat_t,
          { "FCP Target", "fip.fc4f.feat.fcp.target",
            FT_BOOLEAN, 32, NULL, 1,
            NULL, HFILL}},

        { &hf_fip_fcp_feat_i,
          { "FCP Initiator", "fip.fc4f.feat.fcp.initiator",
            FT_BOOLEAN, 32, NULL, 2,
            NULL, HFILL}},

        { &hf_fip_desc_unk,
          { "Unknown Descriptor", "fip.desc_unk",
            FT_BYTES, BASE_NONE, NULL, 0,
            NULL, HFILL}},

        { &hf_fip_descriptors,
          { "Descriptors", "fip.descriptors",
            FT_BYTES, BASE_NONE, NULL, 0,
            NULL, HFILL}},

    };
    static gint *ett[] = {
        &ett_fip,
        &ett_fip_flags,
        &ett_fip_dt_pri,
        &ett_fip_dt_mac,
        &ett_fip_dt_map,
        &ett_fip_dt_name,
        &ett_fip_dt_fab,
        &ett_fip_dt_mdl,
        &ett_fip_dt_caps,
        &ett_fip_dt_vn,
        &ett_fip_dt_fka,
        &ett_fip_dt_vend,
        &ett_fip_dt_vlan,
        &ett_fip_dt_fc4f,
        &ett_fip_dt_fc4f_types,
        &ett_fip_dt_fcp_feat,
        &ett_fip_dt_unk
    };

    static ei_register_info ei[] = {
        { &ei_fip_descriptors, { "fip.descriptors.length_error", PI_MALFORMED, PI_ERROR, "Descriptor [length error]", EXPFILL }},
    };

    expert_module_t* expert_fip;

    /* Register the protocol name and description */
    proto_fip = proto_register_protocol("FCoE Initialization Protocol",
        "FIP", "fip");

    /* Required function calls to register the header fields and
     * subtrees used */
    proto_register_field_array(proto_fip, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    expert_fip = expert_register_protocol(proto_fip);
    expert_register_field_array(expert_fip, ei, array_length(ei));
}
Exemplo n.º 29
0
/* Register Wimax Mac to Mac Protocol */
void proto_register_m2m(void)
{
	/* M2M TLV display */
	static hf_register_info hf[] =
	{
		{
			&hf_m2m_sequence_number,
			{
				"Packet Sequence Number", "m2m.seq_number",
				FT_UINT16, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_frame_number,
			{
				"Value", "m2m.frame_number",
				FT_UINT24, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_tlv_count,
			{
				"Number of TLVs in the packet", "m2m.tlv_count",
				FT_UINT16, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		}
	};

	/* WiMax TLV display */
	static hf_register_info hf_tlv[] =
	{
		{
			&hf_m2m_type,
			{
				"Type", "m2m.tlv_type",
				FT_UINT8, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_len,
			{
				"Length", "m2m.tlv_len",
				FT_UINT8, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_len_size,
			{
				"Length Size", "m2m.tlv_len_size",
				FT_UINT8, BASE_HEX, NULL, 0x0,
				NULL, HFILL
			}
		},
#if 0
		{
			&hf_m2m_value_bytes,
			{
				"Value (hex)", "m2m.multibyte_tlv_value",
				FT_BYTES, BASE_NONE, NULL, 0x0,
				NULL, HFILL
			}
		},
#endif
		{
			&hf_m2m_value_protocol_vers_uint8,
			{
				"Value", "m2m.protocol_vers_tlv_value",
				FT_UINT8, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_burst_num_uint8,
			{
				"Value", "m2m.burst_num_tlv_value",
				FT_UINT8, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_frag_type_uint8,
			{
				"Value", "m2m.frag_type_tlv_value",
				FT_UINT8, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_frag_num_uint8,
			{
				"Value", "m2m.frag_num_tlv_value",
				FT_UINT8, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_pdu_burst,
			{
				"Value (hex)", "m2m.pdu_burst_tlv_value",
				FT_BYTES, BASE_NONE, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_fast_fb,
			{
				"Value (hex)", "m2m.fast_fb_tlv_value",
				FT_BYTES, BASE_NONE, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_fch_burst_uint24,
			{
				"Value", "m2m.fch_burst_tlv_value",
				FT_UINT24, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_cdma_code_uint24,
			{
				"Value", "m2m.cdma_code_tlv_value",
				FT_UINT24, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_crc16_status_uint8,
			{
				"Value", "m2m.crc16_status_tlv_value",
				FT_UINT8, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_burst_power_uint16,
			{
				"Value", "m2m.burst_power_tlv_value",
				FT_UINT16, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_burst_cinr_uint16,
			{
				"Value", "m2m.burst_cinr_tlv_value",
				FT_UINT16, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_preamble_uint16,
			{
				"Value", "m2m.preamble_tlv_value",
				FT_UINT16, BASE_DEC, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_value_harq_ack_burst_bytes,
			{
				"Value (hex)", "m2m.harq_ack_burst_tlv_value",
				FT_BYTES, BASE_NONE, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_m2m_phy_attributes,
			{
				"Value (hex)", "m2m.phy_attributes",
				FT_BYTES, BASE_NONE, NULL, 0x0,
				NULL, HFILL
			}
		},
		{
			&hf_wimax_invalid_tlv,
			{
				"Invalid TLV (hex)", "m2m.invalid_tlv",
				FT_BYTES, BASE_NONE, NULL, 0x0,
				NULL, HFILL
			}
		}
	};

	static gint *ett[] =
		{
			&ett_m2m,
			&ett_m2m_tlv,
			&ett_m2m_fch,
			&ett_m2m_cdma,
			&ett_m2m_ffb,
		};

	static ei_register_info ei[] = {
		{ &ei_m2m_unexpected_length, { "m2m.unexpected_length", PI_MALFORMED, PI_ERROR, "Unexpected length", EXPFILL }},
	};

	expert_module_t* expert_m2m;

	proto_m2m = proto_register_protocol (
		"WiMax Mac to Mac Packet", /* name       */
		"M2M  (m2m)",              /* short name */
		"m2m"                      /* abbrev     */
		);

	proto_register_field_array(proto_m2m, hf, array_length(hf));
	proto_register_field_array(proto_m2m, hf_tlv, array_length(hf_tlv));
	proto_register_subtree_array(ett, array_length(ett));
	expert_m2m = expert_register_protocol(proto_m2m);
	expert_register_field_array(expert_m2m, ei, array_length(ei));

	/* Register the PDU fragment table init routine */
	register_init_routine(m2m_defragment_init);
}
Exemplo n.º 30
0
void proto_register_roofnet(void)
{
    static hf_register_info hf[] = {
        /* Roofnet Header */
        {   &hf_roofnet_version,
            {   "Version", "roofnet.version",
                FT_UINT8, BASE_DEC, NULL, 0x0, "Roofnet Version", HFILL
            }
        },

        {   &hf_roofnet_type,
            {   "Type", "roofnet.type",
                FT_UINT8, BASE_DEC, VALS(roofnet_pt_vals), 0x0, "Roofnet Message Type", HFILL
            }
        },

        {   &hf_roofnet_nlinks,
            {   "Number of Links", "roofnet.nlinks",
                FT_UINT8, BASE_DEC, NULL, 0x0, "Roofnet Number of Links", HFILL
            }
        },

        {   &hf_roofnet_next,
            {   "Next Link", "roofnet.next",
                FT_UINT8, BASE_DEC, NULL, 0x0, "Roofnet Next Link to Use", HFILL
            }
        },

        {   &hf_roofnet_ttl,
            {   "Time To Live", "roofnet.ttl",
                FT_UINT16, BASE_DEC, NULL, 0x0, "Roofnet Time to Live", HFILL
            }
        },

        {   &hf_roofnet_cksum,
            {   "Checksum", "roofnet.cksum",
                FT_UINT16, BASE_DEC, NULL, 0x0, "Roofnet Header Checksum", HFILL
            }
        },

        {   &hf_roofnet_flags,
            {   "Flags", "roofnet.flags",
                FT_UINT16, BASE_DEC, VALS(roofnet_flags_vals), 0x0, "Roofnet Flags", HFILL
            }
        },

        {   &hf_roofnet_data_length,
            {   "Data Length", "roofnet.datalength",
                FT_UINT16, BASE_DEC, NULL, 0x0, "Data Payload Length", HFILL
            }
        },

        {   &hf_roofnet_query_dst,
            {   "Query Dst", "roofnet.querydst",
                FT_IPv4, BASE_NONE, NULL, 0x0, "Roofnet Query Destination", HFILL
            }
        },

        {   &hf_roofnet_seq,
            {   "Seq", "roofnet.seq",
                FT_UINT32, BASE_DEC, NULL, 0x0, "Roofnet Sequential Number", HFILL
            }
        },

#if 0
        {   &hf_roofnet_links,
            {   "Links", "roofnet.links",
                FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL
            }
        },
#endif

        {   &hf_roofnet_link_src,
            {   "Source IP", "roofnet.link.src",
                FT_IPv4, BASE_NONE, NULL, 0x0, "Roofnet Message Source", HFILL
            }
        },

        {   &hf_roofnet_link_forward,
            {   "Forward", "roofnet.link.forward",
                FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL
            }
        },

        {   &hf_roofnet_link_rev,
            {   "Rev", "roofnet.link.rev",
                FT_UINT32, BASE_DEC, NULL, 0x0, "Revision Number", HFILL
            }
        },

        {   &hf_roofnet_link_seq,
            {   "Seq", "roofnet.link.seq",
                FT_UINT32, BASE_DEC, NULL, 0x0, "Link Sequential Number", HFILL
            }
        },

        {   &hf_roofnet_link_age,
            {   "Age", "roofnet.link.age",
                FT_UINT32, BASE_DEC, NULL, 0x0, "Information Age", HFILL
            }
        },

        {   &hf_roofnet_link_dst,
            {   "Dst IP", "roofnet.link.dst",
                FT_IPv4, BASE_NONE, NULL, 0x0, "Roofnet Message Destination", HFILL
            }
        }
    };

    /* setup protocol subtree array */
    static gint *ett[] = {
        &ett_roofnet,
        &ett_roofnet_link
    };

    static ei_register_info ei[] = {
        { &ei_roofnet_too_many_links, { "roofnet.too_many_links", PI_MALFORMED, PI_ERROR, "Too many links", EXPFILL }},
    };

    expert_module_t* expert_roofnet;

    proto_roofnet = proto_register_protocol(
                        "Roofnet Protocol", /* Name */
                        "Roofnet",	    /* Short Name */
                        "roofnet"	    /* Abbrev */
                    );

    proto_register_field_array(proto_roofnet, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    expert_roofnet = expert_register_protocol(proto_roofnet);
    expert_register_field_array(expert_roofnet, ei, array_length(ei));
}