/*--- 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); }
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); } }
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; }
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); }
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); }
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; }
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); }
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); }
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); }
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); }
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); }
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); }
/* 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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
void proto_reg_handoff_echo(void) { dissector_handle_t echo_handle; echo_handle = create_dissector_handle(dissect_echo, proto_echo); dissector_add("udp.port", ECHO_PORT, echo_handle); dissector_add("tcp.port", ECHO_PORT, echo_handle); }
void proto_reg_handoff_dec_bpdu(void) { dissector_handle_t dec_bpdu_handle; dec_bpdu_handle = create_dissector_handle(dissect_dec_bpdu, proto_dec_bpdu); dissector_add("ethertype", ETHERTYPE_DEC_LB, dec_bpdu_handle); dissector_add("chdlctype", ETHERTYPE_DEC_LB, dec_bpdu_handle); dissector_add("ppp.protocol", PPP_DEC_LB, dec_bpdu_handle); }
void proto_reg_handoff_nmpi(void) { dissector_handle_t nmpi_handle; nmpi_handle = create_dissector_handle(dissect_nmpi, proto_nmpi); dissector_add("ipx.socket", IPX_SOCKET_NWLINK_SMB_NAMEQUERY, nmpi_handle); dissector_add("ipx.socket", IPX_SOCKET_NWLINK_SMB_MAILSLOT, nmpi_handle); }
void proto_reg_handoff_idp(void) { dissector_handle_t idp_handle; idp_handle = create_dissector_handle(dissect_idp, proto_idp); dissector_add("ethertype", ETHERTYPE_XNS_IDP, idp_handle); dissector_add("chdlctype", ETHERTYPE_XNS_IDP, idp_handle); data_handle = find_dissector("data"); }
/* 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_brdwlk(void) { dissector_handle_t brdwlk_handle; brdwlk_handle = create_dissector_handle (dissect_brdwlk, proto_brdwlk); dissector_add("ethertype", ETHERTYPE_BRDWALK, brdwlk_handle); dissector_add("ethertype", 0xABCD, brdwlk_handle); data_handle = find_dissector("data"); fc_dissector_handle = find_dissector ("fc"); }
void proto_reg_handoff_lwapp(void) { dissector_handle_t lwapp_l3_handle; dissector_handle_t lwapp_handle; /* * Get handles for the Ethernet and wireless dissectors. */ eth_withoutfcs_handle = find_dissector("eth_withoutfcs"); wlan_handle = find_dissector("wlan"); wlan_bsfc_handle = find_dissector("wlan_bsfc"); data_handle = find_dissector("data"); /* This dissector assumes lwapp packets in an 802.3 frame */ lwapp_l3_handle = create_dissector_handle(dissect_lwapp_l3, proto_lwapp_l3); /* This dissector assumes a lwapp packet */ lwapp_handle = create_dissector_handle(dissect_lwapp, proto_lwapp); /* * Ok, the following deserves some comments. We have four * different ways lwapp can appear on the wire. Mostly, this is * because lwapp is such a new protocol. * * First, lwapp can join on multiple udp ports, as encapsulated * packets on top of UDP. In this case, there is a full raw * ethernet frame inside of the UDP packet. This method is * becoming obscelete, but we still wanted to dissect the * packets. * * Next, lwapp can be over UDP, but packged for L3 tunneling. This * is the new-style. In this case, LWAP headers are just transmitted * via UDP. * * The last method is lwapp directly over layer 2. For this, we * dissect two different ethertypes (until IANA gives us one) * */ /* Obsoleted LWAPP via encapsulated 802.3 over UDP */ dissector_add("udp.port", 12220, lwapp_l3_handle); /* new-style lwapp directly over UDP: L3-lwapp*/ dissector_add("udp.port", 12222, lwapp_handle); dissector_add("udp.port", 12223, lwapp_handle); /* Lwapp over L2 */ dissector_add("ethertype", 0x88bb, lwapp_handle); dissector_add("ethertype", 0xbbbb, lwapp_handle); }
void proto_reg_handoff_sonmp(void) { dissector_handle_t sonmp_handle; sonmp_handle = find_dissector("sonmp"); dissector_add("llc.nortel_pid", 0x01a1, sonmp_handle); /* flatnet hello */ dissector_add("llc.nortel_pid", 0x01a2, sonmp_handle); /* Segment hello */ /* not got round to adding this but its really old, so I'm not sure people will see it */ /* it uses a different packet format */ /* dissector_add("llc.nortel_pid", 0x01a3, sonmp_handle); */ /* Bridge hello */ }
void proto_reg_handoff_bacnet(void) { dissector_handle_t bacnet_handle; bacnet_handle = find_dissector("bacnet"); dissector_add("bvlc.function", 0x04, bacnet_handle); dissector_add("bvlc.function", 0x09, bacnet_handle); dissector_add("bvlc.function", 0x0a, bacnet_handle); dissector_add("bvlc.function", 0x0b, bacnet_handle); dissector_add("llc.dsap", SAP_BACNET, bacnet_handle); bacapp_handle = find_dissector("bacapp"); data_handle = find_dissector("data"); }
void proto_reg_handoff_njack(void) { dissector_handle_t njack_handle; njack_handle = new_create_dissector_handle(dissect_njack_static, proto_njack); dissector_add("udp.port", PORT_NJACK_PC, njack_handle); /* dissector_add("tcp.port", PORT_NJACK_PC, njack_handle); */ dissector_add("udp.port", PORT_NJACK_SWITCH, njack_handle); /* dissector_add("tcp.port", PORT_NJACK_SWITCH, njack_handle); */ heur_dissector_add("udp", dissect_njack_heur, proto_njack); /* heur_dissector_add("tcp", dissect_njack_heur, proto_njack); */ }
void proto_reg_handoff_roofnet(void) { dissector_handle_t roofnet_handle; /* Until now there is no other option than having an IPv4 payload (maybe * extended one day to IPv6 or other?) */ ip_handle = find_dissector("ip"); roofnet_handle = create_dissector_handle(dissect_roofnet, proto_roofnet); /* I did not put the type numbers in the ethertypes.h as they only are * experimental and not official */ dissector_add("ethertype", 0x0641, roofnet_handle); dissector_add("ethertype", 0x0643, roofnet_handle); dissector_add("ethertype", 0x0644, roofnet_handle); dissector_add("ethertype", 0x0645, roofnet_handle); }