当前位置: 首页>>代码示例>>C++>>正文


C++ dissector_add函数代码示例

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


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


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