/*--- proto_register_sbc_ap -------------------------------------------*/
void proto_register_sbc_ap(void) {

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

#include "packet-sbc-ap-hfarr.c"
  };

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


  /* Register protocol */
  proto_sbc_ap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_sbc_ap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

 
  /* Register dissector tables */
  sbc_ap_ies_dissector_table = register_dissector_table("sbc_ap.ies", "SBC-AP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  sbc_ap_extension_dissector_table = register_dissector_table("sbc_ap.extension", "SBC-AP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  sbc_ap_proc_imsg_dissector_table = register_dissector_table("sbc_ap.proc.imsg", "SBC-AP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  sbc_ap_proc_sout_dissector_table = register_dissector_table("sbc_ap.proc.sout", "SBC-AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  sbc_ap_proc_uout_dissector_table = register_dissector_table("sbc_ap.proc.uout", "SBC-AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);


}
Example #2
0
/*--- proto_register_lppa -------------------------------------------*/
void proto_register_lppa(void) {

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

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

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

  /* Register protocol */
  proto_lppa = proto_register_protocol(PNAME, PSNAME, PFNAME);
  register_dissector("lppa", dissect_LPPA_PDU_PDU, proto_lppa);

  /* Register fields and subtrees */
  proto_register_field_array(proto_lppa, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

   /* Register dissector tables */
  lppa_ies_dissector_table = register_dissector_table("lppa.ies", "LPPA-PROTOCOL-IES", proto_lppa, FT_UINT32, BASE_DEC);
  lppa_proc_imsg_dissector_table = register_dissector_table("lppa.proc.imsg", "LPPA-ELEMENTARY-PROCEDURE InitiatingMessage", proto_lppa, FT_UINT32, BASE_DEC);
  lppa_proc_sout_dissector_table = register_dissector_table("lppa.proc.sout", "LPPA-ELEMENTARY-PROCEDURE SuccessfulOutcome", proto_lppa, FT_UINT32, BASE_DEC);
  lppa_proc_uout_dissector_table = register_dissector_table("lppa.proc.uout", "LPPA-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", proto_lppa, FT_UINT32, BASE_DEC);
}
Example #3
0
void
proto_register_osi(void)
{
  module_t *osi_module;

  /* There's no "OSI" protocol *per se*, but we do register a
     dissector table so various protocols running at the
     network layer can register themselves.
     all protocols that require inclusion of the NLPID
     should register here
  */
  osinl_incl_subdissector_table = register_dissector_table("osinl.incl",
                                                           "OSI incl NLPID", FT_UINT8, BASE_HEX);

  /* This dissector table is for those protocols whose PDUs
   * aren't* defined to begin with an NLPID.
   * (typically non OSI protocols like IP,IPv6,PPP */
  osinl_excl_subdissector_table = register_dissector_table("osinl.excl",
                                                           "OSI excl NLPID", FT_UINT8, BASE_HEX);

  proto_osi = proto_register_protocol("OSI", "OSI", "osi");
  /* Preferences how OSI protocols should be dissected */
  osi_module = prefs_register_protocol(proto_osi, proto_reg_handoff_osi);

  prefs_register_uint_preference(osi_module, "tpkt_port",
                                 "TCP port for OSI over TPKT",
                                 "TCP port for OSI over TPKT",
                                 10, &global_tcp_port_osi_over_tpkt);
  prefs_register_bool_preference(osi_module, "tpkt_reassemble",
                                 "Reassemble segmented TPKT datagrams",
                                 "Whether segmented TPKT datagrams should be reassembled",
                                 &tpkt_desegment);


}
/*--- proto_register_x2ap -------------------------------------------*/
void proto_register_x2ap(void) {

  /* List of fields */

  static hf_register_info hf[] = {
    { &hf_x2ap_transportLayerAddressIPv4,
      { "transportLayerAddress(IPv4)", "x2ap.transportLayerAddressIPv4",
        FT_IPv4, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_x2ap_transportLayerAddressIPv6,
      { "transportLayerAddress(IPv6)", "x2ap.transportLayerAddressIPv6",
        FT_IPv6, BASE_NONE, NULL, 0,
        NULL, HFILL }},

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

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

  module_t *x2ap_module;

  /* Register protocol */
  proto_x2ap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_x2ap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register dissector */
  register_dissector("x2ap", dissect_x2ap, proto_x2ap);

  /* Register dissector tables */
  x2ap_ies_dissector_table = register_dissector_table("x2ap.ies", "X2AP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  x2ap_extension_dissector_table = register_dissector_table("x2ap.extension", "X2AP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  x2ap_proc_imsg_dissector_table = register_dissector_table("x2ap.proc.imsg", "X2AP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  x2ap_proc_sout_dissector_table = register_dissector_table("x2ap.proc.sout", "X2AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  x2ap_proc_uout_dissector_table = register_dissector_table("x2ap.proc.uout", "X2AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);

  /* Register configuration options for ports */
  x2ap_module = prefs_register_protocol(proto_x2ap, proto_reg_handoff_x2ap);

  prefs_register_uint_preference(x2ap_module, "sctp.port",
                                 "X2AP SCTP Port",
                                 "Set the SCTP port for X2AP messages",
                                 10,
                                 &gbl_x2apSctpPort);

}
Example #5
0
/* Register the protocol with Wireshark */
void
proto_register_slow_protocols(void)
{
/* Setup list of header fields */

    static hf_register_info hf[] = {
        { &hf_slow_subtype,
          { "Slow Protocols subtype",    "slow.subtype",
            FT_UINT8,    BASE_HEX,    VALS(subtype_vals),    0x0,
            NULL, HFILL }},
    };

    /* Setup protocol subtree array */

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


    /* Register the protocol name and description */

    proto_slow = proto_register_protocol("Slow Protocols", "802.3 Slow protocols", "slow");

    /* Required function calls to register the header fields and subtrees used */

    proto_register_field_array(proto_slow, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    /* subdissector code */
    slow_protocols_dissector_table = register_dissector_table("slow.subtype",
                                                              "Slow protocol subtype",
                                                               FT_UINT8, BASE_DEC);
}
Example #6
0
void
proto_register_hci_h4(void)
{
	static hf_register_info hf[] = {
	{ &hf_hci_h4_type,
		{ "HCI Packet Type",           "hci_h4.type",
		FT_UINT8, BASE_HEX, VALS(hci_h4_type_vals), 0x0,
		NULL, HFILL }},

	{ &hf_hci_h4_direction,
		{ "Direction",           "hci_h4.direction",
		FT_UINT8, BASE_HEX, VALS(hci_h4_direction_vals), 0x0,
		"HCI Packet Direction Sent/Rcvd", HFILL }},

	};

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

	proto_hci_h4 = proto_register_protocol("Bluetooth HCI H4",
	    "HCI_H4", "hci_h4");

	register_dissector("hci_h4", dissect_hci_h4, proto_hci_h4);

	proto_register_field_array(proto_hci_h4, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	hci_h4_table = register_dissector_table("hci_h4.type",
		"HCI H4 pdu type", FT_UINT8, BASE_HEX);
}
Example #7
0
void proto_reg_handoff_uaudp(void)
{
    static gboolean           prefs_initialized = FALSE;
    static dissector_handle_t uaudp_handle;
    int i;

    if (!prefs_initialized)
    {
        uaudp_handle          = find_dissector("uaudp");
        ua_sys_to_term_handle = find_dissector("ua_sys_to_term");
        ua_term_to_sys_handle = find_dissector("ua_term_to_sys");
#if 0
        uaudp_opcode_dissector_table =
            register_dissector_table("uaudp.opcode",
                                     "UAUDP opcode",
                                     FT_UINT8,
                                     BASE_DEC);
#endif
        prefs_initialized     = TRUE;
    }
    else
    {
        for (i=0; i<MAX_TERMINAL_PORTS; i++)
        {
            if (ports[i].last_port)
                dissector_delete_uint("udp.port", ports[i].last_port, uaudp_handle);
        }
        if (str_to_addr_ip(pref_sys_ip_s, sys_ip))
        {
            use_sys_ip = TRUE;
        }
        else
        {
            use_sys_ip = FALSE;
            pref_sys_ip_s = "";
        }
    }

    if (decode_ua)
    {
        int no_ports_registered = TRUE;

        for (i=0; i < MAX_TERMINAL_PORTS; i++)
        {
            if (ports[i].port)
            {
                dissector_add_uint("udp.port", ports[i].port, uaudp_handle);
                no_ports_registered = FALSE;
            }
            ports[i].last_port = ports[i].port;
        }

        if (no_ports_registered)
        {
            /* If all ports are set to 0, then just register the handle so
             * at least "Decode As..." will work. */
            dissector_add_handle("udp.port", uaudp_handle);
        }
    }
}
Example #8
0
void
proto_register_ethertype(void)
{
	/* subdissector code */
	ethertype_dissector_table = register_dissector_table("ethertype",
							     "Ethertype", FT_UINT16, BASE_HEX);
}
Example #9
0
void
proto_register_hpext(void)
{
#ifndef HAVE_HFI_SECTION_INIT
	static header_field_info *hfi[] = {
		&hfi_hpext_dxsap,
		&hfi_hpext_sxsap,
	};
#endif

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

	int proto_hpext;

	proto_hpext = proto_register_protocol(
	    "HP Extended Local-Link Control", "HPEXT", "hpext");
	hfi_hpext = proto_registrar_get_nth(proto_hpext);

	proto_register_fields(proto_hpext, hfi, array_length(hfi));
	proto_register_subtree_array(ett, array_length(ett));

/* subdissector code */
	subdissector_table = register_dissector_table("hpext.dxsap",
	  "HPEXT XSAP", FT_UINT16, BASE_HEX);

	hpext_handle = register_dissector("hpext", dissect_hpext, proto_hpext);
}
Example #10
0
void proto_reg_handoff_ua_msg(void)
{
#if 0  /* Future */
    dissector_handle_t handle_ua_msg;

    /* hooking of UA on UAUDP */
    /* XXX: The following is NG since the same 'pattern' is added twice */
    handle_ua_msg = find_dissector("ua_sys_to_term");
    dissector_add_uint("uaudp.opcode", UAUDP_DATA, handle_ua_msg);

    handle_ua_msg = find_dissector("ua_term_to_sys");
    dissector_add_uint("uaudp.opcode", UAUDP_DATA, handle_ua_msg);

    /* For hooking dissectors to UA */
    ua_opcode_dissector_table =
        register_dissector_table("ua.opcode",
                                 "ua.opcode",
                                 FT_UINT8,
                                 BASE_HEX);


#endif
    noe_handle  = find_dissector("noe");
    ua3g_handle = find_dissector("ua3g");

}
void
proto_register_arcnet (void)
{

/* Setup list of header fields  See Section 1.6.1 for details*/
  static hf_register_info hf[] = {
    {&hf_arcnet_src,
     {"Source", "arcnet.src",
      FT_UINT8, BASE_HEX, NULL, 0,
      "Source ID", HFILL}
     },
    {&hf_arcnet_dst,
     {"Dest", "arcnet.dst",
      FT_UINT8, BASE_HEX, NULL, 0,
      "Dest ID", HFILL}
     },
    {&hf_arcnet_offset,
     {"Offset", "arcnet.offset",
      FT_BYTES, BASE_NONE, NULL, 0,
      NULL, HFILL}
     },
    {&hf_arcnet_protID,
     {"Protocol ID", "arcnet.protID",
      FT_UINT8, BASE_HEX, VALS(arcnet_prot_id_vals), 0,
      "Proto type", HFILL}
     },
    {&hf_arcnet_split_flag,
     {"Split Flag", "arcnet.split_flag",
      FT_UINT8, BASE_DEC, NULL, 0,
      NULL, HFILL}
     },
    {&hf_arcnet_exception_flag,
     {"Exception Flag", "arcnet.exception_flag",
      FT_UINT8, BASE_HEX, NULL, 0,
      NULL, HFILL}
     },
    {&hf_arcnet_sequence,
     {"Sequence", "arcnet.sequence",
      FT_UINT16, BASE_DEC, NULL, 0,
      "Sequence number", HFILL}
     },
  };

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

  arcnet_dissector_table = register_dissector_table ("arcnet.protocol_id",
                                                     "ARCNET Protocol ID",
                                                     FT_UINT8, BASE_HEX);

/* Register the protocol name and description */
  proto_arcnet = proto_register_protocol ("ARCNET", "ARCNET", "arcnet");

/* Required function calls to register the header fields and subtrees used */
  proto_register_field_array (proto_arcnet, hf, array_length (hf));
  proto_register_subtree_array (ett, array_length (ett));
}
Example #12
0
/*--- proto_register_cmip ----------------------------------------------*/
void proto_register_cmip(void) {

  /* List of fields */
  static hf_register_info hf[] = {
    { &hf_cmip_actionType_OID,
      { "actionType", "cmip.actionType_OID",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_cmip_eventType_OID,
      { "eventType", "cmip.eventType_OID",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_cmip_attributeId_OID,
      { "attributeId", "cmip.attributeId_OID",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_cmip_errorId_OID,
      { "errorId", "cmip.errorId_OID",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
   { &hf_DiscriminatorConstruct,
      { "DiscriminatorConstruct", "cmip.DiscriminatorConstruct",
        FT_UINT32, BASE_DEC, NULL, 0,
        NULL, HFILL }},
    { &hf_Destination,
      { "Destination", "cmip.Destination",
        FT_UINT32, BASE_DEC, NULL, 0,
        NULL, HFILL }},
    { &hf_NameBinding,
      { "NameBinding", "cmip.NameBinding",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_ObjectClass,
      { "ObjectClass", "cmip.ObjectClass",
        FT_UINT32, BASE_DEC, VALS(cmip_ObjectClass_vals), 0,
        NULL, HFILL }},

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

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

  /* Register protocol */
  proto_cmip = proto_register_protocol(PNAME, PSNAME, PFNAME);
  new_register_dissector("cmip", dissect_cmip, proto_cmip);

  /* Register fields and subtrees */
  proto_register_field_array(proto_cmip, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
#include "packet-cmip-dis-tab.c"
    oid_add_from_string("discriminatorId(1)","2.9.3.2.7.1");

  attribute_id_dissector_table = register_dissector_table("cmip.attribute_id", "CMIP Attribute Id", FT_UINT32, BASE_DEC);

}
/*--- proto_register_s1ap -------------------------------------------*/
void proto_register_s1ap(void) {

  /* List of fields */

  static hf_register_info hf[] = {
    { &hf_s1ap_transportLayerAddressIPv4,
      { "transportLayerAddress(IPv4)", "s1ap.transportLayerAddressIPv4",
        FT_IPv4, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_s1ap_transportLayerAddressIPv6,
      { "transportLayerAddress(IPv6)", "s1ap.transportLayerAddressIPv6",
        FT_IPv6, BASE_NONE, NULL, 0,
        NULL, HFILL }},

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

  /* List of subtrees */
  static gint *ett[] = {
		  &ett_s1ap,
		  &ett_s1ap_TransportLayerAddress,
		  &ett_s1ap_ToTargetTransparentContainer,
		  &ett_s1ap_ToSourceTransparentContainer,
		  &ett_s1ap_RRCContainer,
		  &ett_s1ap_UERadioCapability,
		  &ett_s1ap_RIMInformation,
#include "packet-s1ap-ettarr.c"
  };

  module_t *s1ap_module;

  /* Register protocol */
  proto_s1ap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_s1ap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register dissector */
  register_dissector("s1ap", dissect_s1ap, proto_s1ap);

  /* Register dissector tables */
  s1ap_ies_dissector_table = register_dissector_table("s1ap.ies", "S1AP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  s1ap_ies_p1_dissector_table = register_dissector_table("s1ap.ies.pair.first", "S1AP-PROTOCOL-IES-PAIR FirstValue", FT_UINT32, BASE_DEC);
  s1ap_ies_p2_dissector_table = register_dissector_table("s1ap.ies.pair.second", "S1AP-PROTOCOL-IES-PAIR SecondValue", FT_UINT32, BASE_DEC);
  s1ap_extension_dissector_table = register_dissector_table("s1ap.extension", "S1AP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  s1ap_proc_imsg_dissector_table = register_dissector_table("s1ap.proc.imsg", "S1AP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  s1ap_proc_sout_dissector_table = register_dissector_table("s1ap.proc.sout", "S1AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  s1ap_proc_uout_dissector_table = register_dissector_table("s1ap.proc.uout", "S1AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);

  /* Register configuration options for ports */
  s1ap_module = prefs_register_protocol(proto_s1ap, proto_reg_handoff_s1ap);

  prefs_register_uint_preference(s1ap_module, "sctp.port",
                                 "S1AP SCTP Port",
                                 "Set the SCTP port for S1AP messages",
                                 10,
                                 &gbl_s1apSctpPort);
  prefs_register_bool_preference(s1ap_module, "dissect_container", "Dissect TransparentContainer", "Dissect TransparentContainers that are opaque to S1AP", &g_s1ap_dissect_container);

}
/*--- proto_register_nbap -------------------------------------------*/
void proto_register_nbap(void) {

  /* List of fields */

  static hf_register_info hf[] = {
    { &hf_nbap_transportLayerAddress_ipv4,
      { "transportLayerAddress IPv4", "nbap.transportLayerAddress_ipv4",
        FT_IPv4, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_nbap_transportLayerAddress_ipv6,
      { "transportLayerAddress IPv6", "nbap.transportLayerAddress_ipv6",
        FT_IPv6, BASE_NONE, NULL, 0,
        NULL, HFILL }},

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

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


  /* Register protocol */
  proto_nbap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_nbap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
 
  /* Register dissector */
  register_dissector("nbap", dissect_nbap, proto_nbap);

  /* Register dissector tables */
  nbap_ies_dissector_table = register_dissector_table("nbap.ies", "NBAP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  nbap_extension_dissector_table = register_dissector_table("nbap.extension", "NBAP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  nbap_proc_imsg_dissector_table = register_dissector_table("nbap.proc.imsg", "NBAP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_STRING, BASE_NONE);
  nbap_proc_sout_dissector_table = register_dissector_table("nbap.proc.sout", "NBAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_STRING, BASE_NONE);
  nbap_proc_uout_dissector_table = register_dissector_table("nbap.proc.uout", "NBAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_STRING, BASE_NONE);

}
Example #15
0
void
proto_register_interlink(void)
{
	static hf_register_info hf[] = {
		{ &hf_interlink_id, {
			"Magic ID", "interlink.id", FT_STRING,
			BASE_NONE, NULL, 0, NULL, HFILL }},
		{ &hf_interlink_version, {
			"Version", "interlink.version", FT_UINT16,
			BASE_DEC, NULL, 0, NULL, HFILL }},
		{ &hf_interlink_cmd, {
			"Command", "interlink.cmd", FT_UINT16,
			BASE_DEC, VALS(names_cmd), 0, NULL, HFILL }},
		{ &hf_interlink_seq, {
			"Sequence", "interlink.seq", FT_UINT16,
			BASE_DEC, NULL, 0, NULL, HFILL }},
		{ &hf_interlink_flags, {
			"Flags", "interlink.flags", FT_UINT16,
			BASE_HEX, NULL, 0, NULL, HFILL }},
		{ &hf_interlink_flags_req_ack, {
			"REQ_ACK", "interlink.flags.req_ack", FT_BOOLEAN,
			16, TFS(&flags_set_notset), 0x01, NULL, HFILL }},
		{ &hf_interlink_flags_inc_ack_port, {
			"INC_ACK_PORT", "interlink.flags.inc_ack_port", FT_BOOLEAN,
			16, TFS(&flags_set_notset), 0x02, NULL, HFILL }},
		{ &hf_interlink_block_type, {
			"Type", "interlink.type", FT_UINT8,
			BASE_DEC, NULL, 0, NULL, HFILL }},
		{ &hf_interlink_block_version, {
			"Version", "interlink.block_version", FT_UINT8,
			BASE_DEC, NULL, 0, NULL, HFILL }},
		{ &hf_interlink_block_length, {
			"Length", "interlink.length", FT_UINT16,
			BASE_DEC, NULL, 0, NULL, HFILL }},
	};

	static gint *ett[] = {
		&ett_interlink,
		&ett_interlink_header,
		&ett_interlink_flags,
		&ett_interlink_block,
	};

	proto_interlink = proto_register_protocol("Interlink Protocol",
							"Interlink",
							"interlink");
	proto_register_field_array(proto_interlink, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	register_dissector("interlink", dissect_interlink, proto_interlink);

	/* Probably someone will write sub-dissectors. You can never know. */
	subdissector_table = register_dissector_table("interlink.type_version",
		"Interlink type_version", FT_UINT16, BASE_HEX);
}
Example #16
0
void
proto_register_mpeg_sect(void)
{
    static hf_register_info hf[] = {
        { &hf_mpeg_sect_table_id, {
            "Table ID", "mpeg_sect.tid",
            FT_UINT8, BASE_HEX, VALS(mpeg_sect_table_id_vals), 0, NULL, HFILL
        } },

        { &hf_mpeg_sect_syntax_indicator, {
            "Syntax indicator", "mpeg_sect.syntax_indicator",
            FT_UINT16, BASE_DEC, NULL, MPEG_SECT_SYNTAX_INDICATOR_MASK, NULL, HFILL
        } },

        { &hf_mpeg_sect_reserved, {
            "Reserved", "mpeg_sect.reserved",
            FT_UINT16, BASE_HEX, NULL, MPEG_SECT_RESERVED_MASK, NULL, HFILL
        } },

        { &hf_mpeg_sect_length, {
            "Length", "mpeg_sect.len",
            FT_UINT16, BASE_DEC, NULL, MPEG_SECT_LENGTH_MASK, NULL, HFILL
        } },

        { &hf_mpeg_sect_crc, {
            "CRC 32", "mpeg_sect.crc",
            FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
        } }
    };

    static gint *ett[] = {
        &ett_mpeg_sect
    };
    module_t *mpeg_sect_module;

    proto_mpeg_sect = proto_register_protocol("MPEG2 Section", "MPEG SECT", "mpeg_sect");
    register_dissector("mpeg_sect", dissect_mpeg_sect, proto_mpeg_sect);

    proto_register_field_array(proto_mpeg_sect, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    mpeg_sect_module = prefs_register_protocol(proto_mpeg_sect, NULL);

    prefs_register_bool_preference(mpeg_sect_module,
        "verify_crc",
        "Verify the section CRC",
        "Whether the section dissector should verify the CRC",
        &mpeg_sect_check_crc);

    mpeg_sect_tid_dissector_table = register_dissector_table("mpeg_sect.tid",
                                 "MPEG SECT Table ID",
                                 FT_UINT8, BASE_HEX);

}
Example #17
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);
}
Example #18
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);
}
void proto_register_op_uavtalk(void)
{
    module_t *op_uavtalk_module;

    static hf_register_info hf[] = {
        { &hf_op_uavtalk_sync,
            { "Sync Byte",           "uavtalk.sync",   FT_UINT8,
            BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
        { &hf_op_uavtalk_version,
            { "Version",             "uavtalk.ver",    FT_UINT8,
            BASE_DEC, NULL, 0xf8, NULL, HFILL }
        },
        { &hf_op_uavtalk_type,
            { "Type",                "uavtalk.type",   FT_UINT8,
            BASE_HEX, VALS(uavtalk_packet_types), 0x07, NULL, HFILL }
        },
        { &hf_op_uavtalk_len,
            { "Length",              "uavtalk.len",    FT_UINT16,
            BASE_DEC, NULL, 0x0, NULL, HFILL }
        },
        { &hf_op_uavtalk_objid,
            { "ObjID",               "uavtalk.objid",  FT_UINT32,
            BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
        { &hf_op_uavtalk_crc8,
            { "Crc8",                "uavtalk.crc8",   FT_UINT8,
            BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
    };

/* Setup protocol subtree array */

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

    proto_op_uavtalk = proto_register_protocol("OpenPilot UAVTalk Protocol",
                                               "UAVTALK",
                                               "uavtalk");

    /* Allow subdissectors for each objid to bind for decoding */
    uavtalk_subdissector_table = register_dissector_table("uavtalk.objid", "UAVObject ID", FT_UINT32, BASE_HEX);

    proto_register_subtree_array(ett, array_length(ett));
    proto_register_field_array(proto_op_uavtalk, hf, array_length(hf));

    op_uavtalk_module = prefs_register_protocol(proto_op_uavtalk, proto_reg_handoff_op_uavtalk);

    prefs_register_uint_preference(op_uavtalk_module, "udp.port", "UAVTALK UDP port",
                                   "UAVTALK port (default 9000)", 10, &global_op_uavtalk_port);
}
/*--- proto_register_m3ap -------------------------------------------*/
void proto_register_m3ap(void) {

  /* List of fields */
  static hf_register_info hf[] = {
    { &hf_m3ap_Absolute_Time_ofMBMS_Data_value,
      { "Absolute-Time-ofMBMS-Data-value", "m3ap.Absolute_Time_ofMBMS_Data_value",
         FT_STRING, BASE_NONE, NULL, 0,
         NULL, HFILL }
    },
    { &hf_m3ap_IPAddress,
      { "IPAddress", "m3ap.IPAddress",
         FT_IPv6, BASE_NONE, NULL, 0,
         NULL, HFILL }
    },

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

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


  /* Register protocol */
  proto_m3ap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_m3ap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register dissector tables */
  m3ap_ies_dissector_table = register_dissector_table("m3ap.ies", "M3AP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  m3ap_extension_dissector_table = register_dissector_table("m3ap.extension", "M3AP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  m3ap_proc_imsg_dissector_table = register_dissector_table("m3ap.proc.imsg", "M3AP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  m3ap_proc_sout_dissector_table = register_dissector_table("m3ap.proc.sout", "M3AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  m3ap_proc_uout_dissector_table = register_dissector_table("m3ap.proc.uout", "M3AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);
}
Example #21
0
void
proto_register_sita(void)
{
	static hf_register_info hf[] = {
		{ &hf_proto,		{ "Protocol",		"sita.errors.protocol",		FT_UINT8,   BASE_HEX, VALS(tfs_sita_proto),	0,					"Protocol value",						HFILL }},

		{ &hf_dir,			{ "Direction",		"sita.flags.flags",			FT_BOOLEAN, 8, TFS(&tfs_sita_flags),	SITA_FRAME_DIR,			"TRUE 'from Remote', FALSE 'from Local'",	HFILL }},
		{ &hf_droppedframe,	{ "No Buffers",		"sita.flags.droppedframe",	FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_NO_BUFFER,			"TRUE if Buffer Failure",		HFILL }},

		{ &hf_framing,		{ "Framing",		"sita.errors.framing",		FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_FRAMING,			"TRUE if Framing Error",		HFILL }},
		{ &hf_parity,		{ "Parity",			"sita.errors.parity",		FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_PARITY,			"TRUE if Parity Error",			HFILL }},
		{ &hf_collision,	{ "Collision",		"sita.errors.collision",	FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_COLLISION,		"TRUE if Collision",			HFILL }},
		{ &hf_longframe,	{ "Long Frame",		"sita.errors.longframe",		FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_FRAME_LONG,		"TRUE if Long Frame Received",	HFILL }},
		{ &hf_shortframe,	{ "Short Frame",	"sita.errors.shortframe",	FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_FRAME_SHORT,		"TRUE if Short Frame",			HFILL }},
		{ &hf_nonaligned,	{ "NonAligned",		"sita.errors.nonaligned",	FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_NONOCTET_ALIGNED,	"TRUE if NonAligned Frame",		HFILL }},
		{ &hf_abort,		{ "Abort",			"sita.errors.abort",		FT_BOOLEAN, 8, TFS(&tfs_sita_received),	SITA_ERROR_RX_ABORT,			"TRUE if Abort Received",		HFILL }},
		{ &hf_lostcd,		{ "Carrier",		"sita.errors.lostcd",		FT_BOOLEAN, 8, TFS(&tfs_sita_lost),		SITA_ERROR_RX_CD_LOST,			"TRUE if Carrier Lost",			HFILL }},
		{ &hf_rxdpll,		{ "DPLL",			"sita.errors.rxdpll",		FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_DPLL,				"TRUE if DPLL Error",			HFILL }},
		{ &hf_overrun,		{ "Overrun",		"sita.errors.overrun",		FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_OVERRUN,			"TRUE if Overrun Error",		HFILL }},
		{ &hf_length,		{ "Length",			"sita.errors.length",		FT_BOOLEAN, 8, TFS(&tfs_sita_violation),SITA_ERROR_RX_FRAME_LEN_VIOL,	"TRUE if Length Violation",		HFILL }},
		{ &hf_crc,			{ "CRC",			"sita.errors.crc",			FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_RX_CRC,				"TRUE if CRC Error",			HFILL }},
		{ &hf_break,		{ "Break",			"sita.errors.break",		FT_BOOLEAN, 8, TFS(&tfs_sita_received),	SITA_ERROR_RX_BREAK,			"TRUE if Break Received",		HFILL }},

		{ &hf_underrun,		{ "Underrun",		"sita.errors.underrun",		FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_TX_UNDERRUN,			"TRUE if Tx Underrun",			HFILL }},
		{ &hf_lostcts,		{ "Clear To Send",	"sita.errors.lostcts",		FT_BOOLEAN, 8, TFS(&tfs_sita_lost),		SITA_ERROR_TX_CTS_LOST,			"TRUE if Clear To Send Lost",	HFILL }},
		{ &hf_uarterror,	{ "UART",			"sita.errors.uarterror",	FT_BOOLEAN, 8, TFS(&tfs_sita_error),	SITA_ERROR_TX_UART_ERROR,		"TRUE if UART Error",			HFILL }},
		{ &hf_rtxlimit,		{ "Retx Limit",		"sita.errors.rtxlimit",		FT_BOOLEAN, 8, TFS(&tfs_sita_exceeded),	SITA_ERROR_TX_RETX_LIMIT,	"TRUE if Retransmit Limit reached",	HFILL }},

		{ &hf_dsr,			{ "DSR",			"sita.signals.dsr",			FT_BOOLEAN, 8, TFS(&tfs_sita_on_off),	SITA_SIG_DSR,					"TRUE if Data Set Ready",		HFILL }},
		{ &hf_dtr,			{ "DTR",			"sita.signals.dtr",			FT_BOOLEAN, 8, TFS(&tfs_sita_on_off),	SITA_SIG_DTR,					"TRUE if Data Terminal Ready",	HFILL }},
		{ &hf_cts,			{ "CTS",			"sita.signals.cts",			FT_BOOLEAN, 8, TFS(&tfs_sita_on_off),	SITA_SIG_CTS,					"TRUE if Clear To Send",		HFILL }},
		{ &hf_rts,			{ "RTS",			"sita.signals.rts",			FT_BOOLEAN, 8, TFS(&tfs_sita_on_off),	SITA_SIG_RTS,					"TRUE if Request To Send",		HFILL }},
		{ &hf_dcd,			{ "DCD",			"sita.signals.dcd",			FT_BOOLEAN, 8, TFS(&tfs_sita_on_off),	SITA_SIG_DCD,					"TRUE if Data Carrier Detect",	HFILL }},

	};

	static gint *ett[] = {
		&ett_sita,
		&ett_sita_flags,
		&ett_sita_signals,
		&ett_sita_errors1,
		&ett_sita_errors2,
	};

	proto_sita = proto_register_protocol("Societe Internationale de Telecommunications Aeronautiques", "SITA", "sita");	/* name, short name,abbreviation */
	sita_dissector_table = register_dissector_table("sita.proto", "SITA protocol number", FT_UINT8, BASE_HEX);
	proto_register_field_array(proto_sita, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	register_dissector("sita", dissect_sita, proto_sita);
}
Example #22
0
/*--- proto_register_pcap -------------------------------------------*/
void proto_register_pcap(void) {

  /* List of fields */

  static hf_register_info hf[] = {

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

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

  module_t *pcap_module;

  /* Register protocol */
  proto_pcap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_pcap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  pcap_module = prefs_register_protocol(proto_pcap, proto_reg_handoff_pcap);

  /* Register dissector */
  register_dissector("pcap", dissect_pcap, proto_pcap);

  /* Register dissector tables */
  pcap_ies_dissector_table = register_dissector_table("pcap.ies", "PCAP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  pcap_ies_p1_dissector_table = register_dissector_table("pcap.ies.pair.first", "PCAP-PROTOCOL-IES-PAIR FirstValue", FT_UINT32, BASE_DEC);
  pcap_ies_p2_dissector_table = register_dissector_table("pcap.ies.pair.second", "PCAP-PROTOCOL-IES-PAIR SecondValue", FT_UINT32, BASE_DEC);
  pcap_extension_dissector_table = register_dissector_table("pcap.extension", "PCAP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  pcap_proc_imsg_dissector_table = register_dissector_table("pcap.proc.imsg", "PCAP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  pcap_proc_sout_dissector_table = register_dissector_table("pcap.proc.sout", "PCAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  pcap_proc_uout_dissector_table = register_dissector_table("pcap.proc.uout", "PCAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);
  pcap_proc_out_dissector_table = register_dissector_table("pcap.proc.out", "PCAP-ELEMENTARY-PROCEDURE Outcome", FT_UINT32, BASE_DEC);


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

  prefs_register_range_preference(pcap_module, "ssn", "SCCP SSNs",
                                  "SCCP (and SUA) SSNs to decode as PCAP",
                                  &global_ssn_range, MAX_SSN);
}
Example #23
0
/*--- proto_register_rua -------------------------------------------*/
void proto_register_rua(void) {
module_t *rua_module;

  /* List of fields */

  static hf_register_info hf[] = {

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

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


  /* Register protocol */
  proto_rua = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_rua, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register dissector */
  register_dissector("rua", dissect_rua, proto_rua);

  /* Register dissector tables */
  rua_ies_dissector_table = register_dissector_table("rua.ies", "RUA-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  rua_extension_dissector_table = register_dissector_table("rua.extension", "RUA-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  rua_proc_imsg_dissector_table = register_dissector_table("rua.proc.imsg", "RUA-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  rua_proc_sout_dissector_table = register_dissector_table("rua.proc.sout", "RUA-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  rua_proc_uout_dissector_table = register_dissector_table("rua.proc.uout", "RUA-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);

  rua_module = prefs_register_protocol(proto_rua, proto_reg_handoff_rua);
  prefs_register_uint_preference(rua_module, "port", "RUA SCTP Port", "Set the port for RUA messages (Default of 29169)", 10, &global_sctp_port);

}
Example #24
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);


}
Example #25
0
void
proto_register_frame(void)
{
	
    wtap_encap_dissector_table = register_dissector_table("wtap_encap",
	    "Wiretap encapsulation type", FT_UINT32, BASE_DEC);

	proto_frame = proto_register_protocol("Frame", "Frame", "frame");
	proto_pkt_comment = proto_register_protocol("Packet comments", "Pkt_Comment", "pkt_comment");
	register_dissector("frame",dissect_frame,proto_frame);

	/* You can't disable dissection of "Frame", as that would be
	   tantamount to not doing any dissection whatsoever. */
	proto_set_cant_toggle(proto_frame);


	frame_tap=register_tap("frame");
}
void
proto_register_ethertype(void)
{
	/* Decode As handling */
	static build_valid_func eth_da_build_value[1] = {eth_value};
	static decode_as_value_t eth_da_values = {eth_prompt, 1, eth_da_build_value};
	static decode_as_t ethertype_da = {"ethertype", "Link", "ethertype", 1, 0, &eth_da_values, NULL, NULL,
										decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL};


	proto_ethertype = proto_register_protocol("Ethertype", "Ethertype", "ethertype");

	new_register_dissector("ethertype", dissect_ethertype, proto_ethertype);

	/* subdissector code */
	ethertype_dissector_table = register_dissector_table("ethertype",
								"Ethertype", FT_UINT16, BASE_HEX);

	register_decode_as(&ethertype_da);
}
Example #27
0
/*
 * Add an entry for a new OUI.
 */
void
llc_add_oui(guint32 oui, const char *table_name, const char *table_ui_name,
	    hf_register_info *hf_item, const int proto)
{
	oui_info_t *new_info;

	new_info = wmem_new(wmem_epan_scope(), oui_info_t);
	new_info->table = register_dissector_table(table_name,
	    table_ui_name, proto, FT_UINT16, BASE_HEX);
	new_info->field_info = hf_item;

	/*
	 * Create the hash table for OUI information, if it doesn't
	 * already exist.
	 */
	if (oui_info_table == NULL) {
		oui_info_table = wmem_map_new(wmem_epan_scope(), g_direct_hash,
		    g_direct_equal);
	}
	wmem_map_insert(oui_info_table, GUINT_TO_POINTER(oui), new_info);
}
Example #28
0
void
proto_register_bctp (void)
{
	static hf_register_info hf[] = {
		{&hf_bctp_bvei, {"BVEI", "bctp.bvei", FT_UINT16, BASE_HEX, VALS(bvei_vals), 0x4000, "BCTP Version Error Indicator", HFILL }},
		{&hf_bctp_bvi, {"BVI", "bctp.bvi", FT_UINT16, BASE_HEX, NULL, 0x1F00, "BCTP Version Indicator", HFILL }},
		{&hf_bctp_tpei, {"TPEI", "bctp.tpei", FT_UINT16, BASE_HEX, NULL, 0x0040, "Tunneled Protocol Error Indicator", HFILL }},
		{&hf_bctp_tpi, {"TPI", "bctp.tpi", FT_UINT16, BASE_HEX, NULL, 0x003F, "Tunneled Protocol Indicator", HFILL }},
	};
	static gint *ett[] = {
		&ett_bctp
	};

	proto_bctp = proto_register_protocol(PNAME, PSNAME, PFNAME);
	proto_register_field_array(proto_bctp, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	register_dissector("bctp", dissect_bctp, proto_bctp);

	bctp_dissector_table = register_dissector_table("bctp.tpi", "BCTP Tunneled Protocol Indicator", FT_UINT32, BASE_DEC);
}
Example #29
0
/*
 * Add an entry for a new OUI.
 */
void
ieee802a_add_oui(guint32 oui, const char *table_name, const char *table_ui_name,
		 hf_register_info *hf_item, const int proto)
{
	oui_info_t *new_info;

	new_info = (oui_info_t *)g_malloc(sizeof (oui_info_t));
	new_info->table = register_dissector_table(table_name,
	    table_ui_name, proto, FT_UINT16, BASE_HEX);
	new_info->field_info = hf_item;

	/*
	 * Create the hash table for OUI information, if it doesn't
	 * already exist.
	 */
	if (oui_info_table == NULL) {
		oui_info_table = g_hash_table_new_full(g_direct_hash,
		    g_direct_equal, NULL, g_free);
	}
	g_hash_table_insert(oui_info_table, GUINT_TO_POINTER(oui), new_info);
}
Example #30
0
/*
 * Add an entry for a new OUI.
 */
void
llc_add_oui(guint32 oui, const char *table_name, const char *table_ui_name,
	    hf_register_info *hf_item)
{
	oui_info_t *new_info;

	new_info = (oui_info_t *)g_malloc(sizeof (oui_info_t));
	new_info->table = register_dissector_table(table_name,
	    table_ui_name, FT_UINT16, BASE_HEX, DISSECTOR_TABLE_ALLOW_DUPLICATE);
	new_info->field_info = hf_item;

	/*
	 * Create the hash table for OUI information, if it doesn't
	 * already exist.
	 */
	if (oui_info_table == NULL) {
		oui_info_table = g_hash_table_new(g_direct_hash,
		    g_direct_equal);
	}
	g_hash_table_insert(oui_info_table, GUINT_TO_POINTER(oui), new_info);
}