/* Register Protocol handler */
void proto_reg_handoff_mysensors(void)
{
  mysensors_handle = create_dissector_handle(dissect_mysensors, proto_mysensors);
  heur_dissector_add("nrf24" /*parent protocol*/, dissect_mysensors_heur, proto_mysensors);
  heur_dissector_add("rhmesh" /*parent protocol*/, dissect_mysensors_heur, proto_mysensors);
  data_handle = find_dissector("data");
}
Exemple #2
0
void
proto_reg_handoff_h1(void)
{
  heur_dissector_add("cotp", dissect_h1, proto_h1);
  heur_dissector_add("cotp_is", dissect_h1, proto_h1);
  heur_dissector_add("tcp", dissect_h1, proto_h1);
  data_handle = find_dissector("data");
}
Exemple #3
0
void proto_reg_handoff_lanforge(void)
{
    /* Register as a heuristic UDP dissector */
    heur_dissector_add("udp", dissect_lanforge, proto_lanforge);
    heur_dissector_add("tcp", dissect_lanforge, proto_lanforge);

    /* Find data dissector handle */
    data_handle = find_dissector("data");
}
Exemple #4
0
void
proto_reg_handoff_ses(void)
{
	/*   find data dissector  */
	data_handle = find_dissector("data");

	/* define sub dissector */
	pres_handle = find_dissector("pres");

	/* add our session dissector to cotp dissector list
	 * and cotp_is dissector list*/
	heur_dissector_add("cotp", dissect_ses_heur, proto_ses);
	heur_dissector_add("cotp_is", dissect_ses_heur, proto_ses);
}
Exemple #5
0
void
proto_reg_handoff_ndef(void)
{
	dissector_handle_t ndef_handle;
	ndef_handle = new_create_dissector_handle(dissect_ndef, proto_ndef);
	heur_dissector_add("snep.ndef", dissect_ndef, proto_ndef);
}
Exemple #6
0
void
proto_reg_handoff_pn_mrrt (void)
{

    /* register ourself as an heuristic pn-rt payload dissector */
    heur_dissector_add("pn_rt", dissect_PNMRRT_Data_heur, "PROFINET MRRT IO", "pn_mrrt_pn_rt", proto_pn_mrrt, HEURISTIC_ENABLE);
}
void
proto_reg_handoff_tuxedo(void)
{
	tuxedo_handle = create_dissector_handle(dissect_tuxedo, proto_tuxedo);
	dissector_add_handle("tcp.port", tuxedo_handle);
	heur_dissector_add("tcp", dissect_tuxedo_heur, proto_tuxedo);
}
void
proto_reg_handoff_e100(void)
{
    /* Check all UDP traffic, as the specific UDP port is configurable */
    heur_dissector_add("udp", dissect_e100, proto_e100);
    /* e100 traffic encapsulates traffic from the ethernet frame on */
    eth_handle = find_dissector("eth");
}
Exemple #9
0
/* 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_msrp(void)
{
	msrp_handle = find_dissector("msrp");
	dissector_add_handle("tcp.port", msrp_handle);   /* for "decode-as" */
	heur_dissector_add("tcp", dissect_msrp_heur, proto_msrp);
	media_type_dissector_table = find_dissector_table("media_type");
}
Exemple #10
0
void proto_reg_handoff_pktgen(void)
{
    /* Register as a heuristic UDP dissector */
    heur_dissector_add("udp", dissect_pktgen, proto_pktgen);

    /* Find data dissector handle */
    data_handle = find_dissector("data");
}
Exemple #11
0
void
proto_reg_handoff_tte(void)
{
    heur_dissector_add("eth", dissect_tte, proto_tte);

    hf_eth_dst  = proto_registrar_get_byname ("eth.dst")->id;
    hf_eth_src  = proto_registrar_get_byname ("eth.src")->id;
    hf_eth_type = proto_registrar_get_byname ("eth.type")->id;
}
Exemple #12
0
void
proto_reg_handoff_mpa(void)
{
	/*
	 * MPA does not use any specific TCP port so, when not on a specific
	 * port, try this dissector whenever there is TCP traffic.
	 */
	heur_dissector_add("tcp", dissect_iwarp_mpa, "IWARP_MPA over TCP", "iwarp_mpa_tcp", proto_iwarp_mpa, HEURISTIC_ENABLE);
	ddp_rdmap_handle = find_dissector_add_dependency("iwarp_ddp_rdmap", proto_iwarp_mpa);
}
Exemple #13
0
/* handoff function */
void
proto_reg_handoff_tfp(void) {

    dissector_handle_t tfp_handle_tcp;

    tfp_handle_tcp = create_dissector_handle(dissect_tfp_tcp, proto_tfp);

    dissector_add_uint("tcp.port", tfp_PORT, tfp_handle_tcp);
    heur_dissector_add("usb.bulk", dissect_tfp_bulk_heur, proto_tfp);
}
Exemple #14
0
void
proto_reg_handoff_mpa(void)
{
	/*
	 * MPA does not use any specific TCP port so, when not on a specific
	 * port, try this dissector whenever there is TCP traffic.
	 */
	heur_dissector_add("tcp", dissect_iwarp_mpa, proto_iwarp_mpa);
	ddp_rdmap_handle = find_dissector("iwarp_ddp_rdmap");
}
Exemple #15
0
/* Handler registration */
void
proto_reg_handoff_chdr(void)
{
    /* register heuristic dissector for use with USB */
    heur_dissector_add("usb.bulk", heur_dissect_chdr, proto_chdr);

    /* register dissector for UDP packets */
    static dissector_handle_t chdr_handle;
    chdr_handle = create_dissector_handle(dissect_chdr, proto_chdr);
    dissector_add_uint("udp.port", CHDR_PORT, chdr_handle);
}
Exemple #16
0
void
proto_reg_handoff_yhoo(void)
{
	/*
	 * DO NOT register for port 5050, as that's used by the
	 * old and new Yahoo messenger protocols.
	 *
	 * Just register as a heuristic TCP dissector, and reject stuff
	 * not to or from that port.
	 */
	heur_dissector_add("tcp", dissect_yhoo, proto_yhoo);
}
void
proto_reg_handoff_cattp(void)
{
    static dissector_handle_t cattp_handle;

    /* Create dissector handle */
    cattp_handle = create_dissector_handle(dissect_cattp, proto_cattp);
    data_handle = find_dissector("data");

    dissector_add_uint("udp.port", gcattp_port, cattp_handle);
    heur_dissector_add("udp",dissect_cattp_heur,proto_cattp);
}
Exemple #18
0
void
proto_reg_handoff_swift(void)
{
	dissector_handle_t swift_handle;
	swift_handle = find_dissector("swift");

	/* Allow "Decode As" with any UDP packet. */
	dissector_add_handle("udp.port", swift_handle);

	/* Add our heuristic packet finder. */
	heur_dissector_add("udp", dissect_swift_heur, proto_swift);
}
/*
 * 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_fcip (void)
{
    dissector_handle_t fcip_handle;

    heur_dissector_add("tcp", dissect_fcip_heur, proto_fcip);

    fcip_handle = create_dissector_handle(dissect_fcip_handle, proto_fcip);
    dissector_add_handle("tcp.port", fcip_handle);

    data_handle = find_dissector("data");
    fc_handle = find_dissector("fc");
}
Exemple #20
0
void
proto_reg_handoff_interlink(void)
{
	dissector_handle_t interlink_handle;
	interlink_handle = find_dissector("interlink");

	/* Allow "Decode As" with any UDP packet. */
	dissector_add_handle("udp.port", interlink_handle);

	/* Add our heuristic packet finder. */
	heur_dissector_add("udp", dissect_interlink_heur, proto_interlink);

	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_uint("udp.port", PORT_NJACK_PC, njack_handle);
	/* dissector_add_uint("tcp.port", PORT_NJACK_PC, njack_handle); */
	dissector_add_uint("udp.port", PORT_NJACK_SWITCH, njack_handle);
	/* dissector_add_uint("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_pana(void)
{
    dissector_handle_t pana_handle;

    heur_dissector_add("udp", dissect_pana, proto_pana);

    pana_handle = new_create_dissector_handle(dissect_pana, proto_pana);
    dissector_add_handle("udp.port", pana_handle);

    eap_handle = find_dissector("eap");
/**    if(!eap_handle) fprintf(stderr,"PANA warning: EAP dissector not found\n"); **/

}
Exemple #23
0
void
proto_reg_handoff_ccn(void)
{
    static gboolean initialized = FALSE;
    static int current_ccn_port = -1;
    int global_ccn_port = atoi(CCN_DEFAULT_UNICAST_PORT);
    
    if (!initialized) {
        ccn_handle = new_create_dissector_handle(dissect_ccn, proto_ccn);
        heur_dissector_add("udp", dissect_ccn_heur, proto_ccn);
        heur_dissector_add("tcp", dissect_ccn_heur, proto_ccn);
        if (ccn_register_dtls)
            heur_dissector_add("dtls", dissect_ccn_heur, proto_ccn);
        initialized = TRUE;
    }
    if (current_ccn_port != -1) {
        dissector_delete("udp.port", current_ccn_port, ccn_handle);
        dissector_delete("tcp.port", current_ccn_port, ccn_handle);
    }
    dissector_add("udp.port", global_ccn_port, ccn_handle);
    dissector_add("tcp.port", global_ccn_port, ccn_handle);
    current_ccn_port = global_ccn_port;
}
Exemple #24
0
void
proto_reg_handoff_applemidi( void ) {


	applemidi_handle = create_dissector_handle( dissect_applemidi, proto_applemidi );

	/* If we cannot decode the data it will be RTP-MIDI since the Apple session protocol uses
	 * two ports: the control-port and the MIDI-port.  On both ports an invitation is being sent.
	 * The second port is then used for the RTP-MIDI-data. So if we can't find valid AppleMidi
	 * packets, it will be most likely RTP-MIDI...
	 */
	rtp_handle = find_dissector( "rtp" );
	heur_dissector_add( "udp", dissect_applemidi_heur, proto_applemidi );

}
Exemple #25
0
void
proto_reg_handoff_dcp_etsi (void)
{
  dissector_handle_t af_handle;
  dissector_handle_t pft_handle;
  dissector_handle_t tpl_handle;

  af_handle = create_dissector_handle(dissect_af, proto_af);
  pft_handle = create_dissector_handle(dissect_pft, proto_pft);
  tpl_handle = create_dissector_handle(dissect_tpl, proto_tpl);
  heur_dissector_add("udp", dissect_dcp_etsi, proto_dcp_etsi);
  dissector_add_string("dcp-etsi.sync", "AF", af_handle);
  dissector_add_string("dcp-etsi.sync", "PF", pft_handle);
  /* if there are ever other payload types ...*/
  dissector_add("dcp-af.pt", 'T', tpl_handle);
}
void
proto_reg_handoff_bt_dht(void)
{
  static gboolean prefs_initialized = FALSE;

  /* "Decode As" is always available;
   *  Heuristic dissection in disabled by default since the heuristic is quite weak.
   */
  if (!prefs_initialized) {
    heur_dissector_add("udp", dissect_bt_dht_heur, proto_bt_dht);

    bt_dht_handle = new_create_dissector_handle(dissect_bt_dht, proto_bt_dht);
    dissector_add_handle("udp.port", bt_dht_handle);   /* for "decode_as" */

    prefs_initialized = TRUE;
  }

  heur_dissector_set_enabled("udp", dissect_bt_dht_heur, proto_bt_dht, bt_dht_enable_heuristic_dissection);
}
Exemple #27
0
/* If this dissector uses sub-dissector registration add a registration routine.
   This exact format is required because a script is used to find these
   routines and create the code that calls these routines.

*/
void
proto_reg_handoff_wol(void)
{
    dissector_handle_t wol_handle;

/*  Use new_create_dissector_handle() to indicate that dissect_wol()
 *  returns the number of bytes it dissected (or 0 if it thinks the packet
 *  does not belong to PROTONAME).
 */
    wol_handle = new_create_dissector_handle(dissect_wol, proto_wol);

    /* We don't really want to register with EVERY possible dissector,
     * do we?  I know that the AMD white paper specifies that the
     * MagicPacket could be present in any frame, but are we seriously
     * going to register WOL with every other dissector!?  I think not.
     *
     * Unless anyone has a better idea, just register with only those that
     * are in "common usage" and grow this list as needed.  Yeah, I'm sure
     * we'll miss some, but how else to do this ... add a thousand of
     * these dissector_add_uint()'s and heur_dissector_add()'s??? */
    dissector_add_uint("ethertype", ETHERTYPE_WOL, wol_handle);
    heur_dissector_add("udp", dissect_wol, proto_wol);
}
void
proto_reg_handoff_dlm_controld(void)
{
  static gboolean register_dissector = FALSE;
  static dissector_handle_t dlm_controld_daemon_handle;
  static dissector_handle_t dlm_controld_ls_handle;

  if (register_dissector) {
    dissector_delete_string("openais_cpg.mar_name.value", 
			    DLM_CONTROLD_DAEMON_NAME, 
			    dlm_controld_daemon_handle);
  } else {
    dlm_controld_daemon_handle = new_create_dissector_handle(dissect_dlm_controld_daemon,
							     proto_dlm_controld);
    register_dissector = TRUE;
  }

  dissector_add_string("openais_cpg.mar_name.value", 
		       DLM_CONTROLD_DAEMON_NAME,
		       dlm_controld_daemon_handle);
  heur_dissector_add("openais_cpg", 
		     dissect_dlm_controld_ls, 
		     proto_dlm_controld);
}
Exemple #29
0
void
proto_reg_handoff_mpeg_audio(void)
{
	heur_dissector_add("mpeg", dissect_mpeg_audio, proto_mpeg_audio);
}
void proto_reg_handoff_mqpcf(void)
{
    heur_dissector_add("mq", dissect_mqpcf_heur, proto_mqpcf);
}