• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ register_dissector_table函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中register_dissector_table函数的典型用法代码示例。如果您正苦于以下问题:C++ register_dissector_table函数的具体用法?C++ register_dissector_table怎么用?C++ register_dissector_table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了register_dissector_table函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: proto_register_sbc_ap

/*--- 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);


}
开发者ID:LucaBongiorni,项目名称:LTE_monitor_c2xx,代码行数:32,代码来源:packet-sbc-ap-template.c


示例2: proto_register_lppa

/*--- 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);
}
开发者ID:ssyram,项目名称:wireshark,代码行数:29,代码来源:packet-lppa-template.c


示例3: proto_register_osi

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);


}
开发者ID:dot-Sean,项目名称:wireshark-http2,代码行数:35,代码来源:packet-osi.c


示例4: proto_register_x2ap

/*--- 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);

}
开发者ID:Sherkyoung,项目名称:wireshark,代码行数:53,代码来源:packet-x2ap-template.c


示例5: proto_register_slow_protocols

/* 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);
}
开发者ID:ARK1988,项目名称:wireshark,代码行数:34,代码来源:packet-slowprotocols.c


示例6: proto_register_hci_h4

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);
}
开发者ID:flaub,项目名称:HotFuzz,代码行数:31,代码来源:packet-hci_h4.c


示例7: proto_reg_handoff_uaudp

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);
        }
    }
}
开发者ID:drower,项目名称:wireshark-1.10.0,代码行数:60,代码来源:packet-uaudp.c


示例8: proto_register_ethertype

void
proto_register_ethertype(void)
{
	/* subdissector code */
	ethertype_dissector_table = register_dissector_table("ethertype",
							     "Ethertype", FT_UINT16, BASE_HEX);
}
开发者ID:parc-wifi,项目名称:wireshark,代码行数:7,代码来源:packet-ethertype.c


示例9: proto_register_hpext

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);
}
开发者ID:RayHightower,项目名称:wireshark,代码行数:29,代码来源:packet-hpext.c


示例10: proto_reg_handoff_ua_msg

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");

}
开发者ID:dot-Sean,项目名称:wireshark-http2,代码行数:26,代码来源:packet-ua.c


示例11: proto_register_arcnet

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));
}
开发者ID:LucaBongiorni,项目名称:LTE_monitor_c2xx,代码行数:59,代码来源:packet-arcnet.c


示例12: proto_register_cmip

/*--- 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);

}
开发者ID:huzhiren,项目名称:wireshark,代码行数:60,代码来源:packet-cmip-template.c


示例13: proto_register_s1ap

/*--- 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);

}
开发者ID:AnkitKejriwal,项目名称:wireshark,代码行数:61,代码来源:packet-s1ap-template.c


示例14: proto_register_nbap

/*--- 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);

}
开发者ID:RazZziel,项目名称:wireshark-dplay,代码行数:43,代码来源:packet-nbap-template.c


示例15: proto_register_mpeg_sect

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);

}
开发者ID:SayCV,项目名称:wireshark,代码行数:54,代码来源:packet-mpeg-sect.c


示例16: proto_register_mac_mgmt_msg

/* 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);
}
开发者ID:ARK1988,项目名称:wireshark,代码行数:54,代码来源:mac_mgmt_msg_decoder.c


示例17: proto_register_ros

/*--- 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);
}
开发者ID:nehaahir,项目名称:wireshark,代码行数:53,代码来源:packet-ros-template.c


示例18: proto_register_op_uavtalk

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);
}
开发者ID:Alex-Rongzhen-Huang,项目名称:OpenPilot,代码行数:52,代码来源:packet-op-uavtalk.c


示例19: proto_register_m3ap

/*--- 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);
}
开发者ID:MichaelQQ,项目名称:Wireshark-PE,代码行数:39,代码来源:packet-m3ap-template.c


示例20: proto_register_sita

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[] 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ register_driver函数代码示例发布时间:2022-05-30
下一篇:
C++ register_dissector函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap