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

C++ dissector_add函数代码示例

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

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



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

示例1: proto_reg_handoff_h501

/*--- proto_reg_handoff_h501 -------------------------------------------*/
void proto_reg_handoff_h501(void) 
{
  static gboolean h501_prefs_initialized = FALSE;
  static dissector_handle_t h501_udp_handle;
  static dissector_handle_t h501_tcp_handle;
  static guint saved_h501_udp_port;
  static guint saved_h501_tcp_port;

  if (!h501_prefs_initialized) {
    h501_pdu_handle = find_dissector(PFNAME);
    h501_udp_handle = new_create_dissector_handle(dissect_h501_udp, proto_h501);
    h501_tcp_handle = new_create_dissector_handle(dissect_h501_tcp, proto_h501);
    h501_prefs_initialized = TRUE;
  } else {
    dissector_delete("udp.port", saved_h501_udp_port, h501_udp_handle);
    dissector_delete("tcp.port", saved_h501_tcp_port, h501_tcp_handle);
  }

  /* Set our port number for future use */
  saved_h501_udp_port = h501_udp_port;
  dissector_add("udp.port", saved_h501_udp_port, h501_udp_handle);
  saved_h501_tcp_port = h501_tcp_port;
  dissector_add("tcp.port", saved_h501_tcp_port, h501_tcp_handle);

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


示例2: proto_reg_handoff_llt

void
proto_reg_handoff_llt(void)
{
	static gboolean initialized = FALSE;
	static dissector_handle_t llt_handle;
	static guint preference_alternate_ethertype_last;

	if (!initialized) {
		llt_handle = create_dissector_handle(dissect_llt, proto_llt);
		dissector_add("ethertype", ETHERTYPE_LLT, llt_handle);
		initialized = TRUE;
	} else {
		if (preference_alternate_ethertype_last != 0x0) {
			dissector_delete("ethertype", preference_alternate_ethertype_last, llt_handle);
		}
	}

	/* Save the setting to see if it has changed later */
	preference_alternate_ethertype_last = preference_alternate_ethertype;

	if (preference_alternate_ethertype != 0x0) {
 		/* Register the new ethertype setting */
		dissector_add("ethertype", preference_alternate_ethertype, llt_handle);
	}
}
开发者ID:RazZziel,项目名称:wireshark-dplay,代码行数:25,代码来源:packet-llt.c


示例3: proto_reg_handoff_bvlc

void
proto_reg_handoff_bvlc(void)
{
	static gboolean bvlc_initialized = FALSE;
	static dissector_handle_t bvlc_handle;
	static guint additional_bvlc_udp_port;
	
	if (!bvlc_initialized)
	{
		bvlc_handle = find_dissector("bvlc");
		dissector_add("udp.port", 0xBAC0, bvlc_handle);
		data_handle = find_dissector("data");
		bvlc_initialized = TRUE;
	}
	else
	{
		if (additional_bvlc_udp_port != 0) {
			dissector_delete("udp.port", additional_bvlc_udp_port, bvlc_handle);
		}
	}

	if (global_additional_bvlc_udp_port != 0) {
		dissector_add("udp.port", global_additional_bvlc_udp_port, bvlc_handle);
	}
	additional_bvlc_udp_port = global_additional_bvlc_udp_port;
}
开发者ID:RazZziel,项目名称:wireshark-dplay,代码行数:26,代码来源:packet-bvlc.c


示例4: proto_reg_handoff_m2pa

void
proto_reg_handoff_m2pa(void)
{
  static gboolean prefs_initialized = FALSE;
  static dissector_handle_t m2pa_handle;
  static guint sctp_port;

  /* Port preferences code shamelessly copied from packet-beep.c */
  if (!prefs_initialized) {
    m2pa_handle   = find_dissector("m2pa");
    mtp3_handle   = find_dissector("mtp3");

    dissector_add("sctp.ppi", M2PA_PAYLOAD_PROTOCOL_ID, m2pa_handle);

    prefs_initialized = TRUE;

  } else {

    dissector_delete("sctp.port", sctp_port, m2pa_handle);

  }

  /* Set our port number for future use */
  sctp_port = global_sctp_port;

  dissector_add("sctp.port", sctp_port, m2pa_handle);
}
开发者ID:RazZziel,项目名称:wireshark-dplay,代码行数:27,代码来源:packet-m2pa.c


示例5: proto_reg_handoff_t38

void
proto_reg_handoff_t38(void)
{
	static gboolean t38_prefs_initialized = FALSE;
	static guint tcp_port;
	static guint udp_port;

	if (!t38_prefs_initialized) {
		t38_udp_handle=create_dissector_handle(dissect_t38_udp, proto_t38);
		t38_tcp_handle=create_dissector_handle(dissect_t38_tcp, proto_t38);
		t38_tcp_pdu_handle=create_dissector_handle(dissect_t38_tcp_pdu, proto_t38);
		rtp_handle = find_dissector("rtp");
		t30_hdlc_handle = find_dissector("t30.hdlc");
		data_handle = find_dissector("data");
		t38_prefs_initialized = TRUE;
	}
	else {
		dissector_delete("tcp.port", tcp_port, t38_tcp_handle);
		dissector_delete("udp.port", udp_port, t38_udp_handle);
	}
	tcp_port = global_t38_tcp_port;
	udp_port = global_t38_udp_port;

	dissector_add("tcp.port", tcp_port, t38_tcp_handle);
	dissector_add("udp.port", udp_port, t38_udp_handle);

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


示例6: proto_reg_handoff_rtsp

void
proto_reg_handoff_rtsp(void)
{
	static dissector_handle_t rtsp_handle;
	static gboolean rtsp_prefs_initialized = FALSE;
	/*
	 * Variables to allow for proper deletion of dissector registration when
	 * the user changes port from the gui.
	 */
	static guint saved_rtsp_tcp_port;
	static guint saved_rtsp_tcp_alternate_port;

	if (!rtsp_prefs_initialized) {
		rtsp_handle = find_dissector("rtsp");
		rtp_handle = find_dissector("rtp");
		rtcp_handle = find_dissector("rtcp");
		rdt_handle = find_dissector("rdt");
		media_type_dissector_table = find_dissector_table("media_type");
		rtsp_prefs_initialized = TRUE;
	}
	else {
		dissector_delete("tcp.port", saved_rtsp_tcp_port, rtsp_handle);
		dissector_delete("tcp.port", saved_rtsp_tcp_alternate_port, rtsp_handle);
	}
	/* Set our port number for future use */
	dissector_add("tcp.port", global_rtsp_tcp_port, rtsp_handle);
	dissector_add("tcp.port", global_rtsp_tcp_alternate_port, rtsp_handle);

	saved_rtsp_tcp_port = global_rtsp_tcp_port;
	saved_rtsp_tcp_alternate_port = global_rtsp_tcp_alternate_port;

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


示例7: proto_reg_handoff_m2tp

void
proto_reg_handoff_m2tp(void)
{
  dissector_handle_t m2tp_handle;
  mtp2_handle   = find_dissector("mtp2");
  m2tp_handle   = create_dissector_handle(dissect_m2tp, proto_m2tp);
  dissector_add("sctp.ppi",  M2TP_PAYLOAD_PROTOCOL_ID, m2tp_handle);
  dissector_add("sctp.port", SCTP_PORT_M2TP, m2tp_handle);
}
开发者ID:flaub,项目名称:HotFuzz,代码行数:9,代码来源:packet-m2tp.c


示例8: proto_reg_handoff_isis

void
proto_reg_handoff_isis(void)
{
    dissector_handle_t isis_handle;

    isis_handle = create_dissector_handle(dissect_isis, proto_isis);
    dissector_add("osinl", NLPID_ISO10589_ISIS, isis_handle);
    dissector_add("ethertype", ETHERTYPE_L2ISIS, isis_handle);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:9,代码来源:packet-isis.c


示例9: proto_reg_handoff_irc

void
proto_reg_handoff_irc(void)
{
	dissector_handle_t irc_handle;

	irc_handle = create_dissector_handle(dissect_irc, proto_irc);
	dissector_add("tcp.port", TCP_PORT_IRC, irc_handle);
	dissector_add("tcp.port", TCP_PORT_DIRCPROXY, irc_handle);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:9,代码来源:packet-irc.c


示例10: proto_reg_handoff_time

void
proto_reg_handoff_time(void)
{
  dissector_handle_t time_handle;

  time_handle = create_dissector_handle(dissect_time, proto_time);
  dissector_add("udp.port", TIME_PORT, time_handle);
  dissector_add("tcp.port", TIME_PORT, time_handle);
}
开发者ID:flaub,项目名称:HotFuzz,代码行数:9,代码来源:packet-time.c


示例11: proto_reg_handoff_ntp

void
proto_reg_handoff_ntp(void)
{
	dissector_handle_t ntp_handle;

	ntp_handle = create_dissector_handle(dissect_ntp, proto_ntp);
	dissector_add("udp.port", UDP_PORT_NTP, ntp_handle);
	dissector_add("tcp.port", TCP_PORT_NTP, ntp_handle);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:9,代码来源:packet-ntp.c


示例12: proto_reg_handoff_aarp

void
proto_reg_handoff_aarp(void)
{
  dissector_handle_t aarp_handle;

  aarp_handle = create_dissector_handle(dissect_aarp, proto_aarp);
  dissector_add("ethertype", ETHERTYPE_AARP, aarp_handle);
  dissector_add("chdlctype", ETHERTYPE_AARP, aarp_handle);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:9,代码来源:packet-aarp.c


示例13: proto_reg_handoff_mbtcp

/* If this dissector uses sub-dissector registration add a registration routine.
   This format is required because a script is used to find these routines and
   create the code that calls these routines.
 */
void
proto_reg_handoff_mbtcp(void)
{
	dissector_handle_t mbtcp_handle;

	mbtcp_handle = new_create_dissector_handle(dissect_mbtcp, proto_mbtcp);
	dissector_add("tcp.port", PORT_MBTCP, mbtcp_handle);
	dissector_add("udp.port", PORT_MBTCP, mbtcp_handle);
}
开发者ID:flaub,项目名称:HotFuzz,代码行数:13,代码来源:packet-mbtcp.c


示例14: proto_reg_handoff_daytime

void
proto_reg_handoff_daytime(void)
{
  dissector_handle_t daytime_handle;

  daytime_handle = create_dissector_handle(dissect_daytime, proto_daytime);
  dissector_add("udp.port", DAYTIME_PORT, daytime_handle);
  dissector_add("tcp.port", DAYTIME_PORT, daytime_handle);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:9,代码来源:packet-daytime.c


示例15: proto_reg_handoff_hci_h4

void
proto_reg_handoff_hci_h4(void)
{
	dissector_handle_t hci_h4_handle;

	data_handle = find_dissector("data");
	hci_h4_handle = find_dissector("hci_h4");
	dissector_add("wtap_encap", WTAP_ENCAP_BLUETOOTH_H4, hci_h4_handle);
	dissector_add("wtap_encap", WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, hci_h4_handle);
}
开发者ID:flaub,项目名称:HotFuzz,代码行数:10,代码来源:packet-hci_h4.c


示例16: proto_reg_handoff_udld

void
proto_reg_handoff_udld(void)
{
    dissector_handle_t udld_handle;

    data_handle = find_dissector("data");
    udld_handle = create_dissector_handle(dissect_udld, proto_udld);
    dissector_add("llc.cisco_pid", 0x0111, udld_handle);
    dissector_add("chdlctype", 0x0111, udld_handle);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:10,代码来源:packet-udld.c


示例17: proto_reg_handoff_bjnp

void proto_reg_handoff_bjnp (void)
{
    dissector_handle_t bjnp_handle;

    bjnp_handle = find_dissector (PFNAME);
    dissector_add ("udp.port", BJNP_PORT1, bjnp_handle);
    dissector_add ("udp.port", BJNP_PORT2, bjnp_handle);
    dissector_add ("udp.port", BJNP_PORT3, bjnp_handle);
    dissector_add ("udp.port", BJNP_PORT4, bjnp_handle);
}
开发者ID:nixpanic,项目名称:gluster-wireshark-1.4,代码行数:10,代码来源:packet-bjnp.c


示例18: proto_reg_handoff_ns

void proto_reg_handoff_ns(void)
{
	dissector_handle_t nstrace_handle;

	eth_withoutfcs_handle = find_dissector("eth_withoutfcs");

	nstrace_handle = create_dissector_handle(dissect_nstrace, proto_nstrace);
	dissector_add("wtap_encap", WTAP_ENCAP_NSTRACE_1_0, nstrace_handle);
	dissector_add("wtap_encap", WTAP_ENCAP_NSTRACE_2_0, nstrace_handle);
}
开发者ID:RazZziel,项目名称:wireshark-dplay,代码行数:10,代码来源:packet-nstrace.c


示例19: proto_reg_handoff_nettl

void
proto_reg_handoff_nettl(void)
{
  dissector_handle_t nettl_handle;

  /*
   * Get handles for the Ethernet, Token Ring, FDDI, and RAW dissectors.
   */
  eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
  tr_handle = find_dissector("tr");
  lapb_handle = find_dissector("lapb");
  x25_handle = find_dissector("x.25");
  sctp_handle = find_dissector("sctp");
  data_handle = find_dissector("data");
  wtap_dissector_table = find_dissector_table("wtap_encap");
  ip_proto_dissector_table = find_dissector_table("ip.proto");
  tcp_subdissector_table = find_dissector_table("tcp.port");

  nettl_handle = create_dissector_handle(dissect_nettl, proto_nettl);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_ETHERNET, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_TOKEN_RING, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_FDDI, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_RAW_IP, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_RAW_ICMP, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_RAW_ICMPV6, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_RAW_TELNET, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_X25, nettl_handle);
  dissector_add("wtap_encap", WTAP_ENCAP_NETTL_UNKNOWN, nettl_handle);

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


示例20: proto_reg_handoff_ax4000

void
proto_reg_handoff_ax4000(void)
{
	dissector_handle_t ax4000_handle;

	ax4000_handle = create_dissector_handle(dissect_ax4000,
	    proto_ax4000);
	dissector_add("ip.proto", IP_PROTO_AX4000, ax4000_handle);
	dissector_add("tcp.port", AX4000_TCP_PORT, ax4000_handle);
	dissector_add("udp.port", AX4000_UDP_PORT, ax4000_handle);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:11,代码来源:packet-ax4000.c



注:本文中的dissector_add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ dissector_try_uint函数代码示例发布时间:2022-05-30
下一篇:
C++ dissect_rpc_uint32函数代码示例发布时间: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