示例#1
0
static void
range_add_callback(guint32 port)
{
    dissector_add_uint("udp.port", port, nsip_handle);
}
示例#2
0
void
proto_reg_handoff_imap(void)
{
	dissector_add_uint("tcp.port", TCP_PORT_IMAP, imap_handle);
	ssl_dissector_add(TCP_PORT_SSL_IMAP, "imap", TRUE);
}
static void ipa_udp_add_callback(guint32 port)
{
    if (port)
        dissector_add_uint("udp.port", port, ipa_handle);
}
示例#4
0
/*
 * proto_reg_handoff_ts2()
 * */
void proto_reg_handoff_ts2(void)
{
    dissector_handle_t ts2_handle;
    ts2_handle = create_dissector_handle(dissect_ts2, proto_ts2);
    dissector_add_uint("udp.port", TS2_PORT, ts2_handle);
}
示例#5
0
void proto_reg_handoff_packetlogger (void)
{
  hci_h1_table = find_dissector_table("hci_h1.type");
  data_handle = find_dissector("data");
  dissector_add_uint ("wtap_encap", WTAP_ENCAP_PACKETLOGGER, packetlogger_handle);
}
示例#6
0
void
proto_reg_handoff_llc(void)
{
	dissector_handle_t llc_handle;

	/*
	 * Get handles for the BPDU, Ethernet, FDDI, Token Ring and
	 * Turbocell dissectors.
	 */
	bpdu_handle = find_dissector("bpdu");
	eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
	eth_withfcs_handle = find_dissector("eth_withfcs");
	fddi_handle = find_dissector("fddi");
	tr_handle = find_dissector("tr");
	turbo_handle = find_dissector("turbocell");
	mesh_handle = find_dissector("mesh");
	data_handle = find_dissector("data");

	/*
	 * Get the Ethertype dissector table.
	 */
	ethertype_subdissector_table = find_dissector_table("ethertype");
	hpteam_subdissector_table = find_dissector_table("llc.hpteam_pid");

	llc_handle = find_dissector("llc");
	dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_RFC1483, llc_handle);
	dissector_add_uint("sll.ltype", LINUX_SLL_P_802_2, llc_handle);
	/* RFC 2043 */
	dissector_add_uint("ppp.protocol", PPP_LLC, llc_handle);
	/* RFC 2353 */
	dissector_add_uint("udp.port", UDP_PORT_LLC1, llc_handle);
	dissector_add_uint("udp.port", UDP_PORT_LLC2, llc_handle);
	dissector_add_uint("udp.port", UDP_PORT_LLC3, llc_handle);
	dissector_add_uint("udp.port", UDP_PORT_LLC4, llc_handle);
	dissector_add_uint("udp.port", UDP_PORT_LLC5, llc_handle);
	/* IP-over-FC when we have the full FC frame */
	dissector_add_uint("fc.ftype", FC_FTYPE_IP, llc_handle);

	dissector_add_uint("atm.aal5.type", TRAF_LLCMX, llc_handle);

	/*
	 * BACNET-over-ARCNET is really BACNET-over-802.2 LLC-over-ARCNET,
	 * apparently.
	 */
	dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_BACNET, llc_handle);
	dissector_add_uint("ethertype", ETHERTYPE_JUMBO_LLC, llc_handle);

	dissector_add_uint("juniper.proto", JUNIPER_PROTO_LLC, llc_handle);
	dissector_add_uint("juniper.proto", JUNIPER_PROTO_LLC_SNAP, llc_handle);

	/*
	 * Register all the fields for PIDs for various OUIs.
	 */
	if (oui_info_table != NULL)
		g_hash_table_foreach(oui_info_table, register_hf, NULL);
}
示例#7
0
void
proto_reg_handoff_daytime(void)
{
  dissector_add_uint("udp.port", DAYTIME_PORT, daytime_handle);
  dissector_add_uint("tcp.port", DAYTIME_PORT, daytime_handle);
}
void
proto_reg_handoff_aoe(void)
{
  dissector_add_uint("ethertype", ETHERTYPE_AOE, aoe_handle);
}
示例#9
0
void
proto_reg_handoff_isis(void)
{
    dissector_add_uint("osinl.incl", NLPID_ISO10589_ISIS, isis_handle);
    dissector_add_uint("ethertype", ETHERTYPE_L2ISIS, isis_handle);
}
示例#10
0
void
proto_reg_handoff_forces(void)
{
    static gboolean inited = FALSE;

    static guint alternate_tcp_port = 0; /* 3000 */
    static guint alternate_udp_port = 0;
    static guint alternate_sctp_high_prio_channel_port = 0; /* 6700 */
    static guint alternate_sctp_med_prio_channel_port  = 0;
    static guint alternate_sctp_low_prio_channel_port  = 0;

    static dissector_handle_t  forces_handle_tcp, forces_handle;

    if (!inited) {
        forces_handle_tcp = create_dissector_handle(dissect_forces_tcp,     proto_forces);
        forces_handle     = create_dissector_handle(dissect_forces_not_tcp, proto_forces);
        ip_handle = find_dissector("ip");
        inited = TRUE;
    }

    /* Register TCP port for dissection */
    if ((alternate_tcp_port != 0) && (alternate_tcp_port != forces_alternate_tcp_port))
        dissector_delete_uint("tcp.port", alternate_tcp_port, forces_handle_tcp);
    if ((forces_alternate_tcp_port != 0) && (alternate_tcp_port != forces_alternate_tcp_port))
        dissector_add_uint("tcp.port", forces_alternate_tcp_port, forces_handle_tcp);
    alternate_tcp_port = forces_alternate_tcp_port;

    /* Register UDP port for dissection */
    if ((alternate_udp_port != 0) && (alternate_udp_port != forces_alternate_udp_port))
        dissector_delete_uint("udp.port", alternate_udp_port, forces_handle);
    if ((forces_alternate_udp_port != 0) && (alternate_udp_port != forces_alternate_udp_port))
        dissector_add_uint("udp.port", forces_alternate_udp_port, forces_handle);
    alternate_udp_port = forces_alternate_udp_port;

    /* Register SCTP port for high priority dissection */
    if ((alternate_sctp_high_prio_channel_port != 0) &&
        (alternate_sctp_high_prio_channel_port != forces_alternate_sctp_high_prio_channel_port))
        dissector_delete_uint("sctp.port", alternate_sctp_high_prio_channel_port, forces_handle);
    if ((forces_alternate_sctp_high_prio_channel_port != 0) &&
        (alternate_sctp_high_prio_channel_port != forces_alternate_sctp_high_prio_channel_port))
        dissector_add_uint("sctp.port", forces_alternate_sctp_high_prio_channel_port, forces_handle);
    alternate_sctp_high_prio_channel_port = forces_alternate_sctp_high_prio_channel_port;

    /* Register SCTP port for medium priority dissection */
    if ((alternate_sctp_med_prio_channel_port != 0) &&
        (alternate_sctp_med_prio_channel_port != forces_alternate_sctp_med_prio_channel_port))
        dissector_delete_uint("udp.port", alternate_sctp_med_prio_channel_port, forces_handle);
    if ((forces_alternate_sctp_med_prio_channel_port != 0) &&
        (alternate_sctp_med_prio_channel_port != forces_alternate_sctp_med_prio_channel_port))
        dissector_add_uint("udp.port", forces_alternate_sctp_med_prio_channel_port, forces_handle);
    alternate_sctp_med_prio_channel_port = forces_alternate_sctp_med_prio_channel_port;

    /* Register SCTP port for low priority dissection */
    if ((alternate_sctp_low_prio_channel_port != 0) &&
        (alternate_sctp_low_prio_channel_port != forces_alternate_sctp_low_prio_channel_port))
        dissector_delete_uint("udp.port", alternate_sctp_low_prio_channel_port, forces_handle);
    if ((forces_alternate_sctp_low_prio_channel_port != 0) &&
        (alternate_sctp_low_prio_channel_port != forces_alternate_sctp_low_prio_channel_port))
        dissector_add_uint("udp.port", forces_alternate_sctp_low_prio_channel_port, forces_handle);
    alternate_sctp_low_prio_channel_port = forces_alternate_sctp_low_prio_channel_port;
}
示例#11
0
void
proto_reg_handoff_btsmp(void)
{
    dissector_add_uint("btl2cap.cid", BTL2CAP_FIXED_CID_SMP, btsmp_handle);
}
示例#12
0
void
proto_reg_handoff_btobex(void)
{
    dissector_handle_t btobex_handle;

    btobex_handle = find_dissector("btobex");

    /* register in rfcomm and l2cap the profiles/services this dissector should handle */
    dissector_add_uint("btrfcomm.service", BTSDP_OPP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_FTP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_BPP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_BPP_STATUS_SERVICE_UUID,     btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_BIP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_BIP_RESPONDER_SERVICE_UUID,  btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_BIP_AUTO_ARCH_SERVICE_UUID,  btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_BIP_REF_OBJ_SERVICE_UUID,    btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_PBAP_PCE_SERVICE_UUID,       btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_PBAP_PSE_SERVICE_UUID,       btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_PBAP_SERVICE_UUID,           btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_MAP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_MAP_ACCESS_SRV_SERVICE_UUID, btobex_handle);
    dissector_add_uint("btrfcomm.service", BTSDP_MAP_NOIYFY_SRV_SERVICE_UUID, btobex_handle);

    dissector_add_uint("btl2cap.service",  BTSDP_OPP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_FTP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_BPP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_BPP_STATUS_SERVICE_UUID,     btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_BIP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_BIP_RESPONDER_SERVICE_UUID,  btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_BIP_AUTO_ARCH_SERVICE_UUID,  btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_BIP_REF_OBJ_SERVICE_UUID,    btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_PBAP_PCE_SERVICE_UUID,       btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_PBAP_PSE_SERVICE_UUID,       btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_PBAP_SERVICE_UUID,           btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_MAP_SERVICE_UUID,            btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_MAP_ACCESS_SRV_SERVICE_UUID, btobex_handle);
    dissector_add_uint("btl2cap.service",  BTSDP_MAP_NOIYFY_SRV_SERVICE_UUID, btobex_handle);

    xml_handle  = find_dissector("xml");
    data_handle = find_dissector("data");
}
示例#13
0
void
proto_reg_handoff_rip(void)
{
	dissector_add_uint("udp.port", UDP_PORT_RIP, rip_handle);
}
static void range_add_callback(guint32 ssn)
{
    if (ssn) {
        dissector_add_uint("sccp.ssn", ssn, pcap_handle);
    }
}
示例#15
0
static void range_add_callback(guint32 ssn)
{
    if (ssn && !get_ansi_tcap_subdissector(ssn) && !get_itu_tcap_subdissector(ssn) ) {
        dissector_add_uint("sccp.ssn", ssn, tcap_handle);
    }
}
示例#16
0
void
proto_reg_handoff_jpeg(void)
{
	dissector_add_uint("rtp.pt", PT_JPEG, jpeg_handle);
}
static void range_add_nasdaq_soup_tcp_callback(guint32 port) {
    dissector_add_uint("tcp.port", port, nasdaq_soup_handle);
}
示例#18
0
static void
rtpproxy_add_parameter(proto_tree *rtpproxy_tree, tvbuff_t *tvb, guint begin, guint realsize)
{
    proto_item *ti;
    proto_tree *another_tree = NULL;
    guint offset = 0;
    guint new_offset = 0;
    gint i;
    guint pt = 0;
    gchar** codecs = NULL;
    guint codec_len;
    guint8* rawstr = NULL;

    /* Extract the entire parameters line. */
    /* Something like "t4p1iic8,0,2,4,18,96,97,98,100,101" */
    rawstr = tvb_get_string(wmem_packet_scope(), tvb, begin, realsize);

    while(offset < realsize) {
        ti = proto_tree_add_item(rtpproxy_tree, hf_rtpproxy_command_parameter, tvb, begin + offset, 1, ENC_NA);
        offset++; /* Skip 1-byte parameter's type */
        switch (g_ascii_tolower(tvb_get_guint8(tvb, begin+offset-1)))
        {
        /* Official long parameters */
        case 'c':
            new_offset = (gint)strspn(rawstr+offset, "0123456789,");
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_codecs);
            codecs = g_strsplit(tvb_get_string(wmem_packet_scope(), tvb, begin+offset, new_offset), ",", 0);
            i = 0;
            while(codecs[i]) {
                /* We assume strings < 2^32-1 bytes long. :-) */
                codec_len = (guint)strlen(codecs[i]);
                ti = proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_codec, tvb, begin+offset, codec_len,
                                         (guint16) g_ascii_strtoull((gchar*)tvb_get_string(wmem_packet_scope(), tvb, begin+offset, codec_len), NULL, 10));
                proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(tvb,begin+offset,codec_len),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
                offset += codec_len;
                if(codecs[i+1])
                    offset++; /* skip comma */
                i++;
            };
            g_strfreev(codecs);
            break;
        case 'l':
            new_offset = (gint)strspn(rawstr+offset, "0123456789.");
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_local);
            proto_tree_add_item(another_tree, hf_rtpproxy_command_parameter_local, tvb, begin+offset, new_offset, ENC_ASCII | ENC_NA);
            offset += new_offset;
            break;
        case 'r':
            new_offset = (gint)strspn(rawstr+offset, "0123456789.");
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_remote);
            proto_tree_add_item(another_tree, hf_rtpproxy_command_parameter_remote, tvb, begin+offset, new_offset, ENC_ASCII | ENC_NA);
            offset += new_offset;
            break;
        case 'z':
            new_offset = (gint)strspn(rawstr+offset, "0123456789");
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_repacketize);
            proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_repacketize, tvb, begin+offset, new_offset,
                                (guint16) g_ascii_strtoull((gchar*)tvb_get_string(wmem_packet_scope(), tvb, begin+offset, new_offset), NULL, 10));
            offset += new_offset;
            break;
        /* Unofficial long parameters */
        case 'd':
            new_offset = (gint)strspn(rawstr+offset, "0123456789");
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_dtmf);
            proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_dtmf, tvb, begin+offset, new_offset,
                                (guint16) g_ascii_strtoull((gchar*)tvb_get_string(wmem_packet_scope(), tvb, begin+offset, new_offset), NULL, 10));
            if(rtpproxy_establish_conversation) {
                pt = (guint)strtoul(tvb_format_text(tvb,begin+offset,new_offset),NULL,10);
                dissector_add_uint("rtp.pt", pt, rtp_events_handle);
            }
            offset += new_offset;
            break;
        case 'm':
            new_offset = (gint)strspn(rawstr+offset, "0123456789=,");
            /* TODO */
            offset += new_offset;
            break;
        case 'p':
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_proto);
            proto_tree_add_item(another_tree, hf_rtpproxy_command_parameter_proto, tvb, begin+offset, 1, ENC_NA);
            offset++;
            break;
        case 't':
            new_offset = (gint)strspn(rawstr+offset, "0123456789");
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_transcode);
            ti = proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_transcode, tvb, begin+offset, new_offset,
                                     (guint16) g_ascii_strtoull((gchar*)tvb_get_string(wmem_packet_scope(), tvb, begin+offset, new_offset), NULL, 10));
            proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(tvb,begin+offset, new_offset),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
            offset += new_offset;
            break;
        case 'v':
            another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_acc);
            proto_tree_add_item(another_tree, hf_rtpproxy_command_parameter_acc, tvb, begin+offset, 1, ENC_NA);
            offset++;
            break;
        default:
            break;
        }
    }
}
void proto_reg_handoff_hsr_prp_supervision(void)
{
    dissector_handle_t hsr_prp_supervision_handle;
    hsr_prp_supervision_handle = create_dissector_handle(dissect_hsr_prp_supervision, proto_hsr_prp_supervision);
    dissector_add_uint("ethertype", ETHERTYPE_PRP, hsr_prp_supervision_handle);
}
示例#20
0
void
proto_reg_handoff_ipx(void)
{
	dissector_handle_t ipx_handle, spx_handle;
	dissector_handle_t ipxsap_handle, ipxrip_handle;
	dissector_handle_t serialization_handle, ipxmsg_handle;

	ipx_handle = find_dissector("ipx");
	dissector_add_uint("udp.port", UDP_PORT_IPX, ipx_handle);
	dissector_add_uint("ethertype", ETHERTYPE_IPX, ipx_handle);
	dissector_add_uint("chdlctype", ETHERTYPE_IPX, ipx_handle);
	dissector_add_uint("ppp.protocol", PPP_IPX, ipx_handle);
	dissector_add_uint("llc.dsap", SAP_NETWARE1, ipx_handle);
	dissector_add_uint("llc.dsap", SAP_NETWARE2, ipx_handle);
	dissector_add_uint("sll.ltype", LINUX_SLL_P_802_3, ipx_handle);
	dissector_add_uint("gre.proto", ETHERTYPE_IPX, ipx_handle);

	spx_handle = create_dissector_handle(dissect_spx, proto_spx);
	dissector_add_uint("ipx.packet_type", IPX_PACKET_TYPE_SPX, spx_handle);

	ipxsap_handle = find_dissector("ipxsap");
	dissector_add_uint("ipx.socket", IPX_SOCKET_SAP, ipxsap_handle);

	ipxrip_handle = create_dissector_handle(dissect_ipxrip, proto_ipxrip);
	dissector_add_uint("ipx.socket", IPX_SOCKET_IPXRIP, ipxrip_handle);

	serialization_handle = create_dissector_handle(dissect_serialization,
	    proto_serialization);
	dissector_add_uint("ipx.socket", IPX_SOCKET_SERIALIZATION,
	    serialization_handle);

	ipxmsg_handle = create_dissector_handle(dissect_ipxmsg, proto_ipxmsg);
	dissector_add_uint("ipx.socket", IPX_SOCKET_IPX_MESSAGE, ipxmsg_handle);
	dissector_add_uint("ipx.socket", IPX_SOCKET_IPX_MESSAGE1, ipxmsg_handle);

	data_handle = find_dissector("data");
}
示例#21
0
void proto_reg_handoff_rlogin(void)
{
    /* Dissector install routine */
    dissector_handle_t rlogin_handle = new_create_dissector_handle(dissect_rlogin,proto_rlogin);
    dissector_add_uint("tcp.port", RLOGIN_PORT, rlogin_handle);
}
void
proto_reg_handoff_acap(void)
{
	dissector_add_uint("tcp.port", TCP_PORT_ACAP, acap_handle);
}
示例#23
0
void
proto_reg_handoff_wai(void)
{
    data_handle = find_dissector("data");
    dissector_add_uint("ethertype", ETHERTYPE_WAI, wai_handle);
}
示例#24
0
void
proto_reg_handoff_kdp(void) {
  dissector_handle_t kdp_handle;
  kdp_handle = create_dissector_handle(dissect_kdp, proto_kdp);
  dissector_add_uint("udp.port", KDP_PORT, kdp_handle);
}
static void
dissect_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
	guint16 encap_proto;

	proto_tree *cmd_tree = NULL;
        gint offset = 0;

	col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMD");
	col_clear(pinfo->cinfo, COL_INFO);

	if (tree) {
		proto_item *ti = proto_tree_add_item(tree, proto_cmd, tvb, 0, 6, ENC_NA);

		cmd_tree = proto_item_add_subtree(ti, ett_cmd);
                proto_tree_add_item(cmd_tree, hf_cmd_version, tvb, offset, 1, ENC_BIG_ENDIAN);
                offset += 1;
                proto_tree_add_item(cmd_tree, hf_cmd_length, tvb, offset, 1, ENC_BIG_ENDIAN);
                offset += 1;
                proto_tree_add_item(cmd_tree, hf_cmd_options, tvb, offset, 2, ENC_BIG_ENDIAN);
                offset += 2;
                proto_tree_add_item(cmd_tree, hf_cmd_sgt, tvb, offset, 2, ENC_BIG_ENDIAN);
                offset += 2;
	}

	encap_proto = tvb_get_ntohs(tvb, 6);

/* This Logic to identify and decode IEEE 802.3 frames is not working correctly. Carry over code from packet-vlan.c
 * Commenting it out for now will display as Unknown for L2 control frames instead of showing a wrong decode.
 */
#if 0
	if (encap_proto <= IEEE_802_3_MAX_LEN) {
		gboolean is_802_2 = TRUE;

		/* Don't throw an exception for this check (even a BoundsError) */
		if (tvb_length_remaining(tvb, 4) >= 2) {
			if (tvb_get_ntohs(tvb, 4) == 0xffff)
				is_802_2 = FALSE;
		}

		dissect_802_3(encap_proto, is_802_2, tvb, 4, pinfo, tree, cmd_tree, hf_eth_type, hf_cmd_trailer, 0);
	} else {
#endif

	ethertype(encap_proto, tvb, 8, pinfo, tree, cmd_tree,
	          hf_eth_type, hf_cmd_trailer, 0);
}

void
proto_register_cmd(void)
{
	static hf_register_info hf[] = {
		{ &hf_cmd_version,
			{ "Version", "cmd.version", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
		},
		{ &hf_cmd_length,
			{ "Length", "cmd.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
		},
		{ &hf_cmd_options,
			{ "Options", "cmd.options", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
		},
		{ &hf_cmd_sgt,
			{ "SGT", "cmd.sgt", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
		},
                { &hf_eth_type,
                        { "Type", "cmd.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, NULL, HFILL }
                },
		{ &hf_cmd_trailer,
			{ "Trailer", "cmd.trailer", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
		},
	};

	static gint *ett[] = {
		&ett_cmd
	};

	proto_cmd = proto_register_protocol("Cisco MetaData", "Cisco MetaData", "cmd");
	proto_register_field_array(proto_cmd, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
}

void
proto_reg_handoff_cmd(void)
{
	dissector_handle_t cmd_handle;

	cmd_handle = create_dissector_handle(dissect_cmd, proto_cmd);
	dissector_add_uint("ethertype", ETHERTYPE_CMD, cmd_handle);
}
示例#26
0
void
proto_reg_handoff_osi(void)
{
  static gboolean           osi_prefs_initialized = FALSE;
  static dissector_handle_t osi_tpkt_handle;
  static guint              tcp_port_osi_over_tpkt;

  if (!osi_prefs_initialized) {
    osi_handle = create_dissector_handle(dissect_osi, proto_osi);
    dissector_add_uint("llc.dsap", SAP_OSINL1, osi_handle);
    dissector_add_uint("llc.dsap", SAP_OSINL2, osi_handle);
    dissector_add_uint("llc.dsap", SAP_OSINL3, osi_handle);
    dissector_add_uint("llc.dsap", SAP_OSINL4, osi_handle);
    dissector_add_uint("llc.dsap", SAP_OSINL5, osi_handle);
    dissector_add_uint("ppp.protocol", PPP_OSI, osi_handle);
    dissector_add_uint("chdlc.protocol", CHDLCTYPE_OSI, osi_handle);
    dissector_add_uint("null.type", BSD_AF_ISO, osi_handle);
    dissector_add_uint("gre.proto", SAP_OSINL5, osi_handle);
    dissector_add_uint("ip.proto", IP_PROTO_ISOIP, osi_handle); /*  ISO-TP4 ISO Transport Protocol Class 4 [RFC905,RC77] */
    data_handle = find_dissector("data");
    ppp_handle  = find_dissector("ppp");


    osi_tpkt_handle = create_dissector_handle(dissect_osi_tpkt, proto_osi);
    dissector_add_handle("tcp.port", osi_tpkt_handle); /* for 'decode-as' */
    osi_prefs_initialized = TRUE;
  } else {
    if (tcp_port_osi_over_tpkt != 0) {
      dissector_delete_uint("tcp.port", tcp_port_osi_over_tpkt, osi_tpkt_handle);
    }
  }

  if (global_tcp_port_osi_over_tpkt != 0) {
    dissector_add_uint("tcp.port", global_tcp_port_osi_over_tpkt, osi_tpkt_handle);
  }
  tcp_port_osi_over_tpkt = global_tcp_port_osi_over_tpkt;
}
示例#27
0
void
proto_reg_handoff_xyplex(void)
{
  xyplex_handle = new_create_dissector_handle(dissect_xyplex, proto_xyplex);
  dissector_add_uint("udp.port", UDP_PORT_XYPLEX, xyplex_handle);
}
示例#28
0
extern void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) {
    g_hash_table_insert(itu_sub_dissectors,GUINT_TO_POINTER(ssn),dissector);
    dissector_add_uint("sccp.ssn",ssn,tcap_handle);
}
示例#29
0
void
proto_reg_handoff_pktap(void)
{
	dissector_add_uint("wtap_encap", WTAP_ENCAP_PKTAP, pktap_handle);
}
示例#30
0
static void
range_add_gopher_tcp_callback(guint32 port) {
    dissector_add_uint("tcp.port", port, gopher_handle);
}