Ejemplo n.º 1
0
void
proto_register_sbc(void)
{
    module_t *module;
    expert_module_t* expert_sbc;

    static hf_register_info hf[] = {
        { &hf_sbc_fragmented,
            { "Fragmented",                      "sbc.fragmented",
            FT_BOOLEAN, 8, NULL, 0x80,
            NULL, HFILL }
        },
        { &hf_sbc_starting_packet,
            { "Starting Packet",                 "sbc.starting_packet",
            FT_BOOLEAN, 8, NULL, 0x40,
            NULL, HFILL }
        },
        { &hf_sbc_last_packet,
            { "Last Packet",                     "sbc.last_packet",
            FT_BOOLEAN, 8, NULL, 0x20,
            NULL, HFILL }
        },
        { &hf_sbc_rfa,
            { "RFA",                             "sbc.rfa",
            FT_BOOLEAN, 8, NULL, 0x10,
            NULL, HFILL }
        },
        { &hf_sbc_number_of_frames,
            { "Number of Frames",                "sbc.number_of_frames",
            FT_UINT8, BASE_DEC, NULL, 0x0F,
            NULL, HFILL }
        },
        { &hf_sbc_syncword,
            { "Sync Word",                       "sbc.syncword",
            FT_UINT8, BASE_HEX, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_sampling_frequency,
            { "Sampling Frequency",              "sbc.sampling_frequency",
            FT_UINT8, BASE_HEX, VALS(sampling_frequency_vals), 0xC0,
            NULL, HFILL }
        },
        { &hf_sbc_blocks,
            { "Blocks",                          "sbc.blocks",
            FT_UINT8, BASE_HEX, VALS(blocks_vals), 0x30,
            NULL, HFILL }
        },
        { &hf_sbc_channel_mode,
            { "Channel Mode",                    "sbc.channel_mode",
            FT_UINT8, BASE_HEX, VALS(channel_mode_vals), 0x0C,
            NULL, HFILL }
        },
        { &hf_sbc_allocation_method,
            { "Allocation Method",               "sbc.allocation_method",
            FT_UINT8, BASE_HEX, VALS(allocation_method_vals), 0x02,
            NULL, HFILL }
        },
        { &hf_sbc_subbands,
            { "Subbands",                        "sbc.subbands",
            FT_UINT8, BASE_HEX, VALS(subbands_vals), 0x01,
            NULL, HFILL }
        },
        { &hf_sbc_bitpool,
            { "Bitpool",                         "sbc.bitpool",
            FT_UINT8, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_crc_check,
            { "CRC Check",                       "sbc.crc_check",
            FT_UINT8, BASE_HEX, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_expected_data_speed,
            { "Expected data speed",             "sbc.expected_speed_data",
            FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_kibps, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_frame_duration,
            { "Frame Duration",                  "sbc.frame_duration",
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_milliseconds, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_cumulative_frame_duration,
            { "Cumulative Frame Duration",      "sbc.cumulative_frame_duration",
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_milliseconds, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_delta_time,
            { "Delta time",                      "sbc.delta_time",
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_milliseconds, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_delta_time_from_the_beginning,
            { "Delta time from the beginning",   "sbc.delta_time_from_the_beginning",
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_milliseconds, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_cumulative_duration,
            { "Cumulative Music Duration",      "sbc.cumulative_music_duration",
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_milliseconds, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_avrcp_song_position,
            { "AVRCP Song Position",             "sbc.avrcp_song_position",
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_milliseconds, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_diff,
            { "Diff",            "sbc.diff",
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_milliseconds, 0x00,
            NULL, HFILL }
        },
        { &hf_sbc_data,
            { "Frame Data",                      "sbc.data",
            FT_NONE, BASE_NONE, NULL, 0x00,
            NULL, HFILL }
        },
    };

    static gint *ett[] = {
        &ett_sbc,
        &ett_sbc_list,
    };

    static ei_register_info ei[] = {
        { &ei_sbc_syncword, { "sbc.syncword.unexpected", PI_PROTOCOL, PI_WARN, "Unexpected syncword", EXPFILL }},
    };

    proto_sbc = proto_register_protocol("Bluetooth SBC Codec", "SBC", "sbc");

    proto_register_field_array(proto_sbc, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    expert_sbc = expert_register_protocol(proto_sbc);
    expert_register_field_array(expert_sbc, ei, array_length(ei));

    register_dissector("sbc", dissect_sbc, proto_sbc);

    module = prefs_register_protocol_subtree("Bluetooth", proto_sbc, NULL);
    prefs_register_static_text_preference(module, "a2dp.version",
            "Bluetooth Audio Codec SBC version based on A2DP 1.3",
            "Version of codec supported by this dissector.");
}
Ejemplo n.º 2
0
void
proto_register_docsis_cmstatus (void)
{
/* Setup list of header fields  See Section 1.6.1 for details*/
  static hf_register_info hf[] = {
    {&hf_docsis_cmstatus_tranid,
      {"Transaction ID", "docsis_cmstatus.tranid",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL}
    },
    /* See Table 10-3 in CM-SP-MULPIv3.0-I14-101008 */

    {&hf_docsis_cmstatus_e_t_mdd_t,
      {"Secondary Channel MDD timeout", "docsis_cmstatus.mdd_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_qfl_f,
      {"QAM/FEC lock failure", "docsis_cmstatus.qam_fec_lock_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_s_o,
      {"Sequence out-of-range", "docsis_cmstatus.sequence_out_of_range", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_mdd_r,
      {"Secondary Channel MDD Recovery", "docsis_cmstatus.mdd_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_qfl_r,
      {"QAM/FEC Lock Recovery", "docsis_cmstatus.qam_fec_lock_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_t4_t,
      {"T4 timeout", "docsis_cmstatus.t4_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_t3_e,
      {"T3 retries exceeded", "docsis_cmstatus.t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_rng_s,
      {"Successful ranging after T3 retries exceeded", "docsis_cmstatus.successful_ranging_after_t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_cm_b,
      {"CM operating on battery backup", "docsis_cmstatus.cm_on_battery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_e_t_cm_a,
      {"CM returned to A/C power", "docsis_cmstatus.cm_on_ac_power", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
    },
    {&hf_docsis_cmstatus_descr,
      {"1.2 Description", "docsis_cmstatus.description",FT_BYTES, BASE_NONE, NULL, 0x0,"Description", HFILL}
    },
    {&hf_docsis_cmstatus_ds_ch_id,
      {"1.4 Downstream Channel ID", "docsis_cmstatus.ds_chid",FT_UINT8, BASE_DEC, NULL, 0x0, "Downstream Channel ID", HFILL}
    },
    {&hf_docsis_cmstatus_us_ch_id,
      {"1.5 Upstream Channel ID", "docsis_cmstatus.us_chid",FT_UINT8, BASE_DEC, NULL, 0x0, "Upstream Channel ID", HFILL}
    },
    {&hf_docsis_cmstatus_dsid,
      {"1.6 DSID", "docsis_cmstatus.dsid", FT_UINT24, BASE_DEC, NULL, 0x0, "DSID", HFILL}
    }
  };

/* Setup protocol subtree array */
static gint *ett[] = {
  &ett_docsis_cmstatus,
  &ett_docsis_cmstatus_tlv
};

/* Register the protocol name and description */
  proto_docsis_cmstatus = proto_register_protocol ("DOCSIS CM-STATUS Report", "DOCSIS CM-STATUS", "docsis_cmstatus");

/* Required function calls to register the header fields and subtrees used */
  proto_register_field_array (proto_docsis_cmstatus, hf, array_length (hf));
  proto_register_subtree_array (ett, array_length (ett));
  register_dissector ("docsis_cmstatus", dissect_cmstatus, proto_docsis_cmstatus);
}
Ejemplo n.º 3
0
void
proto_register_nasdaq_itch(void)
{

/* Setup list of header fields  See Section 1.6.1 for details*/
    static hf_register_info hf[] = {
    { &hf_nasdaq_itch_version,
      { "Version",         "nasdaq-itch.version",
        FT_UINT8, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_message_type,
      { "Message Type",         "nasdaq-itch.message_type",
        FT_UINT8, BASE_DEC, VALS(message_types_val), 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_second,
      { "Second",         "nasdaq-itch.second",
        FT_UINT32, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_millisecond,
      { "Millisecond",         "nasdaq-itch.millisecond",
        FT_UINT32, BASE_DEC,  NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_system_event,
      { "System Event",         "nasdaq-itch.system_event",
        FT_UINT8, BASE_DEC, VALS(system_event_val), 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_market_category,
      { "Market Category",         "nasdaq-itch.market_category",
        FT_UINT8, BASE_DEC, VALS(market_category_val), 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_financial_status,
      { "Financial Status Indicator",         "nasdaq-itch.financial_status",
        FT_UINT8, BASE_DEC, VALS(financial_status_val), 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_stock,
      { "Stock",         "nasdaq-itch.stock",
        FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_round_lot_size,
      { "Round Lot Size",         "nasdaq-itch.round_lot_size",
        FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_round_lots_only,
      { "Round Lots Only",         "nasdaq-itch.round_lots_only",
        FT_UINT8, BASE_DEC, VALS(round_lots_only_val), 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_trading_state,
      { "Trading State",         "nasdaq-itch.trading_state",
        FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_reserved,
      { "Reserved",         "nasdaq-itch.reserved",
        FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_reason,
      { "Reason",         "nasdaq-itch.reason",
        FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_order_reference,
      { "Order Reference",         "nasdaq-itch.order_reference",
        FT_UINT32, BASE_DEC, NULL, 0x0,
        "Order reference number", HFILL }},

    { &hf_nasdaq_itch_buy_sell,
      { "Buy/Sell",         "nasdaq-itch.buy_sell",
        FT_STRING, BASE_NONE, NULL, 0x0,
        "Buy/Sell indicator", HFILL }},

    { &hf_nasdaq_itch_shares,
      { "Shares",         "nasdaq-itch.shares",
        FT_UINT32, BASE_DEC,  NULL, 0x0,
        "Number of shares", HFILL }},

    { &hf_nasdaq_itch_price,
      { "Price",         "nasdaq-itch.price",
        FT_DOUBLE, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_attribution,
      { "Attribution",         "nasdaq-itch.attribution",
        FT_STRING, BASE_NONE, NULL, 0x0,
        "Market participant identifier", HFILL }},

    { &hf_nasdaq_itch_executed,
      { "Executed Shares",         "nasdaq-itch.executed",
        FT_UINT32, BASE_DEC,  NULL, 0x0,
        "Number of shares executed", HFILL }},

    { &hf_nasdaq_itch_match,
      { "Matched",         "nasdaq-itch.match",
        FT_STRING, BASE_NONE, NULL, 0x0,
        "Match number", HFILL }},

    { &hf_nasdaq_itch_printable,
      { "Printable",         "nasdaq-itch.printable",
        FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_execution_price,
      { "Execution Price",         "nasdaq-itch.execution_price",
        FT_DOUBLE, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_nasdaq_itch_canceled,
      { "Canceled Shares",         "nasdaq-itch.canceled",
        FT_UINT32, BASE_DEC,  NULL, 0x0,
        "Number of shares to be removed", HFILL }},

    { &hf_nasdaq_itch_cross,
      { "Cross Type",         "nasdaq-itch.cross",
        FT_STRING, BASE_NONE, NULL, 0x0,
        "Cross trade type", HFILL }},

    { &hf_nasdaq_itch_message,
      { "Message",         "nasdaq-itch.message",
        FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }}
    };

/* Setup protocol subtree array */
    static gint *ett[] = {
        &ett_nasdaq_itch
    };

    module_t *nasdaq_itch_module;

    /* Register the protocol name and description */
    proto_nasdaq_itch = proto_register_protocol("Nasdaq TotalView-ITCH", "NASDAQ-ITCH", "nasdaq_itch");

    /* Required function calls to register the header fields and subtrees used */
    proto_register_field_array(proto_nasdaq_itch, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    nasdaq_itch_module = prefs_register_protocol(proto_nasdaq_itch, NULL);
    prefs_register_bool_preference(nasdaq_itch_module, "chi_x", "Decode Chi X extensions",
        "Whether the Nasdaq ITCH dissector should decode Chi X extensions.",
        &nasdaq_itch_chi_x);

    register_dissector("nasdaq-itch", dissect_nasdaq_itch, proto_nasdaq_itch);
}
void
proto_register_tte_pcf(void)
{
    static hf_register_info hf[] = {

        { &hf_tte_pcf,
            { "Protocol Control Frame", "tte.pcf",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_tte_pcf_ic,
            { "Integration Cycle", "tte.pcf.ic",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
            { &hf_tte_pcf_mn,
            { "Membership New", "tte.pcf.mn",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
            { &hf_tte_pcf_res0,
            { "Reserved 0", "tte.pcf.res0",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_tte_pcf_sp,
            { "Sync Priority", "tte.pcf.sp",
            FT_UINT8, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_tte_pcf_sd,
            { "Sync Domain", "tte.pcf.sd",
            FT_UINT8, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_tte_pcf_type,
            { "Type", "tte.pcf.type",
            FT_UINT8, BASE_HEX, NULL, 0x0F,
            NULL, HFILL }
        },
        { &hf_tte_pcf_res1,
            { "Reserved 1", "tte.pcf.res1",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_tte_pcf_tc,
            { "Transparent Clock", "tte.pcf.tc",
            FT_UINT64, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        }
    };

    /* Setup protocol subtree array */
    static gint *ett[] = {
        &ett_tte_pcf
    };

    /* Register the protocol name and description */
    proto_tte_pcf = proto_register_protocol("TTEthernet Protocol Control Frame",
        "TTE PCF", "tte_pcf");

    /* Required function calls to register header fields and subtrees used */
    proto_register_field_array(proto_tte_pcf, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    register_dissector("tte_pcf", dissect_tte_pcf, proto_tte_pcf);

}
Ejemplo n.º 5
0
void
proto_register_fw1(void)
{
  static hf_register_info hf[] = {
    { &hf_fw1_direction,
      { "Direction", "fw1.direction", FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_fw1_chain,
      { "Chain Position", "fw1.chain", FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_fw1_interface,
      { "Interface", "fw1.interface", FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_fw1_uuid,
      { "UUID", "fw1.uuid", FT_UINT32, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},

    /* registered here but handled in ethertype.c */
    { &hf_fw1_type,
      { "Type", "fw1.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
        NULL, HFILL }},

    { &hf_fw1_trailer,
      { "Trailer", "fw1.trailer", FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }
    }
  };
  /* Setup protocol subtree array */
  static gint *ett[] = {
    &ett_fw1,
  };
  module_t *fw1_module;
  int       i;

  /* Register the protocol name and description */
  proto_fw1 = proto_register_protocol("Checkpoint FW-1", "FW-1", "fw1");
  /* Required function calls to register the header fields and subtrees used */
  proto_register_field_array(proto_fw1, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register configuration preferences */
  fw1_module = prefs_register_protocol(proto_fw1, NULL);
  prefs_register_bool_preference(fw1_module, "summary_in_tree",
                                 "Show FireWall-1 summary in protocol tree",
                                 "Whether the FireWall-1 summary line should be shown in the protocol tree",
                                 &fw1_summary_in_tree);
  prefs_register_bool_preference(fw1_module, "with_uuid",
                                 "Monitor file includes UUID",
                                 "Whether the Firewall-1 monitor file includes UUID information",
                                 &fw1_with_uuid);
  prefs_register_bool_preference(fw1_module, "iflist_with_chain",
                                 "Interface list includes chain position",
                                 "Whether the interface list includes the chain position",
                                 &fw1_iflist_with_chain);

  register_dissector("fw1", dissect_fw1, proto_fw1);

  for (i=0; i<MAX_INTERFACES; i++) {
    p_interfaces[i] = NULL;
  }
  register_init_routine(fw1_init);
}
Ejemplo n.º 6
0
void proto_register_uasip(void)
{
    module_t *uasip_module;

    static hf_register_info hf_uasip[] = {
        {
            &hf_uasip_opcode,
            {
                "Opcode",
                "uasip.opcode",
                FT_UINT8,
                BASE_DEC | BASE_EXT_STRING,
                &uaudp_opcode_str_ext,
                0x0,
                "UA/SIP Opcode",
                HFILL
            }
        },
        {
            &hf_uasip_version,
            {
                "Version",
                "uasip.version",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP Version",
                HFILL
            }
        },
        {
            &hf_uasip_window_size,
            {
                "Window Size",
                "uasip.window_size",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP Window Size",
                HFILL
            }
        },
        {
            &hf_uasip_mtu,
            {
                "MTU",
                "uasip.mtu",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP MTU",
                HFILL
            }
        },
        {
            &hf_uasip_udp_lost,
            {
                "UDP Lost",
                "uasip.udp_lost",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP Lost",
                HFILL
            }
        },
        {
            &hf_uasip_udp_lost_reinit,
            {
                "UDP lost reinit",
                "uasip.udp_lost_reinit",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP Lost Re-Init",
                HFILL
            }
        },
        {
            &hf_uasip_keepalive,
            {
                "Keepalive",
                "uasip.keepalive",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP Keepalive",
                HFILL
            }
        },
        {
            &hf_uasip_qos_ip_tos,
            {
                "QoS IP TOS",
                "uasip.qos_ip_tos",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP QoS IP TOS",
                HFILL
            }
        },
        {
            &hf_uasip_qos_8021_vlid,
            {
                "QoS 802.1 VLID",
                "uasip.qos_8021_vlid",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP QoS 802.1 VLID",
                HFILL
            }
        },
        {
            &hf_uasip_qos_8021_pri,
            {
                "QoS 802.1 PRI",
                "uasip.qos_8021_pri",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP QoS 802.1 PRI",
                HFILL
            }
        },
        {
            &hf_uasip_expseq,
            {
                "Sequence Number (expected)",
                "uasip.expseq",
                FT_UINT16,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP Expected Sequence Number",
                HFILL
            }
        },
        {
            &hf_uasip_sntseq,
            {
                "Sequence Number (sent)",
                "uasip.sntseq",
                FT_UINT16,
                BASE_DEC,
                NULL,
                0x0,
                "UA/SIP Sent Sequence Number",
                HFILL
            }
        },
    };

    static gint *ett[] =
    {
        &ett_uasip,
    };

    proto_uasip = proto_register_protocol("UA/SIP Protocol", "UASIP", "uasip");
    uasip_handle = register_dissector("uasip", dissect_uasip, proto_uasip);

    proto_register_field_array(proto_uasip, hf_uasip, array_length(hf_uasip));
    proto_register_subtree_array(ett, array_length(ett));

    uasip_module = prefs_register_protocol(proto_uasip, proto_reg_handoff_uasip);
    prefs_register_bool_preference(uasip_module, "aplication_octet_stream", "Try to decode application/octet-stream as UASIP", "UA SIP Protocol enabled", &uasip_enabled);
    prefs_register_bool_preference(uasip_module, "noesip", "Try to decode SIP NOE", "NOE SIP Protocol", &noesip_enabled);
    prefs_register_string_preference(uasip_module, "proxy_ipaddr", "Proxy IP Address",
                                     "IPv4 address of the proxy (Invalid values will be ignored)",
                                     &pref_proxy_ipaddr_s);
#if 0
    uasip_tap = register_tap("uasip");
#endif
}
Ejemplo n.º 7
0
void
proto_register_ses(void)
{
	static hf_register_info hf[] =
	{
		{
			&hf_ses_type,
			{
				"SPDU Type",
				"ses.type",
				FT_UINT8,
				BASE_DEC,
				VALS(ses_vals),
				0x0,
				NULL, HFILL
			}
		},
		{
			&hf_ses_type_0,
			{
				"SPDU Type",
				"ses.type",
				FT_UINT8,
				BASE_DEC,
				VALS(ses_category0_vals),
				0x0,
				NULL, HFILL
			}
		},
		{
			&hf_ses_length,
			{
				"Length",
				"ses.length",
				FT_UINT16,
				BASE_DEC,
				NULL,
				0x0,
				NULL, HFILL
			}
		},

#if 0
		{
			&hf_ses_version,
			{
				"Version",
				"ses.version",
				FT_UINT8,
				BASE_DEC,
				NULL,
				0x0,
				NULL, HFILL
			}
		},
#endif
#if 0
		{
			&hf_ses_reserved,
			{
				"Reserved",
				"ses.reserved",
				FT_UINT8,
				BASE_DEC,
				NULL,
				0x0,
				NULL, HFILL
			}
		},
#endif
		{
			&hf_called_ss_user_reference,
			{
				"Called SS User Reference",
				"ses.called_ss_user_reference",
				FT_BYTES, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_calling_ss_user_reference,
			{
				"Calling SS User Reference",
				"ses.calling_ss_user_reference",
				FT_BYTES, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_common_reference,
			{
				"Common Reference",
				"ses.common_reference",
				FT_BYTES, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_additional_reference_information,
			{
				"Additional Reference Information",
				"ses.additional_reference_information",
				FT_BYTES, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_release_token,
			{
				"release token",
				"ses.release_token",
				FT_BOOLEAN, 8,
				NULL,
				RELEASE_TOKEN,
				NULL,
				HFILL
			}
		},
		{
			&hf_major_activity_token,
			{
				"major/activity token",
				"ses.major.token",
				FT_BOOLEAN, 8,
				NULL,
				MAJOR_ACTIVITY_TOKEN,
				NULL,
				HFILL
			}
		},
		{
			&hf_synchronize_minor_token,
			{
				"synchronize minor token",
				"ses.synchronize_token",
				FT_BOOLEAN, 8,
				NULL,
				SYNCHRONIZE_MINOR_TOKEN,
				NULL,
				HFILL
			}
		},
		{
			&hf_data_token,
			{
				"data token",
				"ses.data_token",
				FT_BOOLEAN, 8,
				NULL,
				DATA_TOKEN,
				"data  token",
				HFILL
			}
		},
		{
			&hf_able_to_receive_extended_concatenated_SPDU,
			{
				"Able to receive extended concatenated SPDU",
				"ses.connect.f1",
				FT_BOOLEAN, 8,
				NULL,
				SES_EXT_CONT,
				NULL,
				HFILL
			}
		},
		{
			&hf_session_user_req_flags,
			{
				"Flags",
				"ses.req.flags",
				FT_UINT16,
				BASE_HEX,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_session_exception_report,
			{
				"Session exception report",
				"ses.exception_report.",
				FT_BOOLEAN, 16,
				NULL,
				SES_EXCEPTION_REPORT,
				NULL,
				HFILL
			}
		},
		{
			&hf_data_separation_function_unit,
			{
				"Data separation function unit",
				"ses.data_sep",
				FT_BOOLEAN, 16,
				NULL,
				DATA_SEPARATION_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_symmetric_synchronize_function_unit,
			{
				"Symmetric synchronize function unit",
				"ses.symm_sync",
				FT_BOOLEAN, 16,
				NULL,
				SYMMETRIC_SYNCHRONIZE_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_typed_data_function_unit,
			{
				"Typed data function unit",
				"ses.typed_data",
				FT_BOOLEAN, 16,
				NULL,
				TYPED_DATA_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_exception_function_unit,
			{
				"Exception function unit",
				"ses.exception_data",
				FT_BOOLEAN, 16,
				NULL,
				EXCEPTION_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_capability_function_unit,
			{
				"Capability function unit",
				"ses.capability_data",
				FT_BOOLEAN, 16,
				NULL,
				CAPABILITY_DATA_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_negotiated_release_function_unit,
			{
				"Negotiated release function unit",
				"ses.negotiated_release",
				FT_BOOLEAN, 16,
				NULL,
				NEGOTIATED_RELEASE_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_activity_management_function_unit,
			{
				"Activity management function unit",
				"ses.activity_management",
				FT_BOOLEAN, 16,
				NULL,
				ACTIVITY_MANAGEMENT_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_resynchronize_function_unit,
			{
				"Resynchronize function unit",
				"ses.resynchronize",
				FT_BOOLEAN, 16,
				NULL,
				RESYNCHRONIZE_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_major_resynchronize_function_unit,
			{
				"Major resynchronize function unit",
				"ses.major_resynchronize",
				FT_BOOLEAN, 16,
				NULL,
				MAJOR_SYNCHRONIZE_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_minor_resynchronize_function_unit,
			{
				"Minor resynchronize function unit",
				"ses.minor_resynchronize",
				FT_BOOLEAN, 16,
				NULL,
				MINOR_SYNCHRONIZE_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_expedited_data_resynchronize_function_unit,
			{
				"Expedited data function unit",
				"ses.expedited_data",
				FT_BOOLEAN, 16,
				NULL,
				EXPEDITED_DATA_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_duplex_function_unit,
			{
				"Duplex functional unit",
				"ses.duplex",
				FT_BOOLEAN, 16,
				NULL,
				DUPLEX_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_half_duplex_function_unit,
			{
				"Half-duplex functional unit",
				"ses.half_duplex",
				FT_BOOLEAN, 16,
				NULL,
				HALF_DUPLEX_FUNCTION_UNIT,
				NULL,
				HFILL
			}
		},
		{
			&hf_proposed_tsdu_maximum_size_i2r,
			{
				"Proposed TSDU Maximum Size, Initiator to Responder",
				"ses.proposed_tsdu_maximum_size_i2r",
				FT_UINT16,
				BASE_DEC,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_proposed_tsdu_maximum_size_r2i,
			{
				"Proposed TSDU Maximum Size, Responder to Initiator",
				"ses.proposed_tsdu_maximum_size_r2i",
				FT_UINT16,
				BASE_DEC,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_protocol_version_1,
			{
				"Protocol Version 1",
				"ses.protocol_version1",
				FT_BOOLEAN, 8,
				NULL,
				PROTOCOL_VERSION_1,
				NULL,
				HFILL
			}
		},
		{
			&hf_protocol_version_2,
			{
				"Protocol Version 2",
				"ses.protocol_version2",
				FT_BOOLEAN, 8,
				NULL,
				PROTOCOL_VERSION_2,
				NULL,
				HFILL
			}
		},
		{
			&hf_initial_serial_number,
			{
				"Initial Serial Number",
				"ses.initial_serial_number",
				FT_STRING, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_beginning_of_SSDU,
			{
				"beginning of SSDU",
				"ses.begininng_of_SSDU",
				FT_BOOLEAN, 8,
				NULL,
				BEGINNING_SPDU,
				NULL,
				HFILL
			}
		},
		{
			&hf_end_of_SSDU,
			{
				"end of SSDU",
				"ses.end_of_SSDU",
				FT_BOOLEAN, 8,
				NULL,
				END_SPDU,
				NULL,
				HFILL
			}
		},
		{
			&hf_release_token_setting,
			{
				"release token setting",
				"ses.release_token_setting",
				FT_UINT8, BASE_HEX,
				VALS(token_setting_vals),
				0xC0,
				NULL,
				HFILL
			}
		},
		{
			&hf_major_activity_token_setting,
			{
				"major/activity setting",
				"ses.major_activity_token_setting",
				FT_UINT8, BASE_HEX,
				VALS(token_setting_vals),
				0x30,
				"major/activity token setting",
				HFILL
			}
		},
		{
			&hf_synchronize_minor_token_setting,
			{
				"synchronize-minor token setting",
				"ses.synchronize_minor_token_setting",
				FT_UINT8, BASE_HEX,
				VALS(token_setting_vals),
				0x0C,
				NULL,
				HFILL
			}
		},
		{
			&hf_data_token_setting,
			{
				"data token setting",
				"ses.data_token_setting",
				FT_UINT8, BASE_HEX,
				VALS(token_setting_vals),
				0x03,
				NULL,
				HFILL
			}
		},
		{
			&hf_activity_identifier,
			{
				"Activity Identifier",
				"ses.activity_identifier",
				FT_BYTES, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_serial_number,
			{
				"Serial Number",
				"ses.serial_number",
				FT_STRING, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_calling_session_selector,
			{
				"Calling Session Selector",
				"ses.calling_session_selector",
				FT_BYTES, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_called_session_selector,
			{
				"Called Session Selector",
				"ses.called_session_selector",
				FT_BYTES, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_second_serial_number,
			{
				"Second Serial Number",
				"ses.second_serial_number",
				FT_STRING, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_second_initial_serial_number,
			{
				"Second Initial Serial Number",
				"ses.second_initial_serial_number",
				FT_STRING, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_large_initial_serial_number,
			{
				"Large Initial Serial Number",
				"ses.large_initial_serial_number",
				FT_STRING, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_large_second_initial_serial_number,
			{
				"Large Second Initial Serial Number",
				"ses.large_second_initial_serial_number",
				FT_STRING, BASE_NONE,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_connect_protocol_options_flags,
			{
				"Flags",
				"ses.connect.flags",
				FT_UINT8,
				BASE_HEX,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},
		{
			&hf_version_number_options_flags,

			{
				"Flags",
				"ses.version.flags",
				FT_UINT8,
				BASE_HEX,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},

		{
			&hf_token_item_options_flags,

			{
				"Flags",
				"ses.tken_item.flags",
				FT_UINT8,
				BASE_HEX,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},

		{
			&hf_enclosure_item_options_flags,

			{
				"Flags",
				"ses.enclosure.flags",
				FT_UINT8,
				BASE_HEX,
				NULL,
				0x0,
				NULL,
				HFILL
			}
		},

		{ &hf_ses_segment_data,
		  { "SES segment data", "ses.segment.data", FT_NONE, BASE_NONE,
		    NULL, 0x00, NULL, HFILL } },
		{ &hf_ses_segments,
		  { "SES segments", "ses.segments", FT_NONE, BASE_NONE,
		    NULL, 0x00, NULL, HFILL } },
		{ &hf_ses_segment,
		  { "SES segment", "ses.segment", FT_FRAMENUM, BASE_NONE,
		    NULL, 0x00, NULL, HFILL } },
		{ &hf_ses_segment_overlap,
		  { "SES segment overlap", "ses.segment.overlap", FT_BOOLEAN,
		    BASE_NONE, NULL, 0x0, NULL, HFILL } },
		{ &hf_ses_segment_overlap_conflicts,
		  { "SES segment overlapping with conflicting data",
		    "ses.segment.overlap.conflicts", FT_BOOLEAN, BASE_NONE,
		    NULL, 0x0, NULL, HFILL } },
		{ &hf_ses_segment_multiple_tails,
		  { "SES has multiple tail segments",
		    "ses.segment.multiple_tails", FT_BOOLEAN, BASE_NONE,
		    NULL, 0x0, NULL, HFILL } },
		{ &hf_ses_segment_too_long_segment,
		  { "SES segment too long", "ses.segment.too_long_segment",
		    FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
		{ &hf_ses_segment_error,
		  { "SES desegmentation error", "ses.segment.error", FT_FRAMENUM,
		    BASE_NONE, NULL, 0x00, NULL, HFILL } },
		{ &hf_ses_segment_count,
		  { "SES segment count", "ses.segment.count", FT_UINT32, BASE_DEC,
		    NULL, 0x00, NULL, HFILL } },
		{ &hf_ses_reassembled_in,
		  { "Reassembled SES in frame", "ses.reassembled.in", FT_FRAMENUM, BASE_NONE,
		    NULL, 0x00, "This SES packet is reassembled in this frame", HFILL } },
		{ &hf_ses_reassembled_length,
		  { "Reassembled SES length", "ses.reassembled.length", FT_UINT32, BASE_DEC,
		    NULL, 0x00, "The total length of the reassembled payload", HFILL } }
	};

	static gint *ett[] =
	{
		&ett_ses,
		&ett_ses_param,
		&ett_connect_protocol_options_flags,
		&ett_protocol_version_flags,
		&ett_enclosure_item_flags,
		&ett_token_item_flags,
		&ett_ses_req_options_flags,
		&ett_ses_segment,
		&ett_ses_segments
	};
	module_t *ses_module;

	proto_ses = proto_register_protocol(PROTO_STRING_SES, "SES", "ses");
	proto_register_field_array(proto_ses, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	register_init_routine (&ses_reassemble_init);

	ses_module = prefs_register_protocol(proto_ses, NULL);

	prefs_register_bool_preference(ses_module, "desegment",
	    "Reassemble session packets ",
	    "Whether the session dissector should reassemble messages spanning multiple SES segments",
	    &ses_desegment);

	/*
	 * Register the dissector by name, so other dissectors can
	 * grab it by name rather than just referring to it directly
	 * (you can't refer to it directly from a plugin dissector
	 * on Windows without stuffing it into the Big Transfer Vector).
	 */
	register_dissector("ses", dissect_ses, proto_ses);
}
Ejemplo n.º 8
0
/* Register the protocol with Wireshark */
void
proto_register_gsm_sms_ud(void)
{
    module_t *gsm_sms_ud_module; /* Preferences for GSM SMS UD */

    /* Setup list of header fields  */
    static hf_register_info hf[] = {
        /*
         * User Data Header
         */
        {   &hf_gsm_sms_udh_iei,
            {   "IE Id", "gsm_sms_ud.udh.iei",
                FT_UINT8, BASE_HEX, VALS(vals_udh_iei), 0x00,
                "Name of the User Data Header Information Element.",
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_length,
            {   "UDH Length", "gsm_sms_ud.udh.len",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "Length of the User Data Header (bytes)",
                HFILL
            }
        },
#if 0
        {   &hf_gsm_sms_udh_multiple_messages,
            {   "Multiple messages UDH", "gsm_sms_ud.udh.mm",
                FT_NONE, BASE_NONE, NULL, 0x00,
                "Multiple messages User Data Header",
                HFILL
            }
        },
#endif
        {   &hf_gsm_sms_udh_multiple_messages_msg_id,
            {   "Message identifier", "gsm_sms_ud.udh.mm.msg_id",
                FT_UINT16, BASE_DEC, NULL, 0x00,
                "Identification of the message",
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_multiple_messages_msg_parts,
            {   "Message parts", "gsm_sms_ud.udh.mm.msg_parts",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "Total number of message parts (fragments)",
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_multiple_messages_msg_part,
            {   "Message part number", "gsm_sms_ud.udh.mm.msg_part",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "Message part (fragment) sequence number",
                HFILL
            }
        },
#if 0
        {   &hf_gsm_sms_udh_ports,
            {   "Port number UDH", "gsm_sms_ud.udh.ports",
                FT_NONE, BASE_NONE, NULL, 0x00,
                "Port number User Data Header",
                HFILL
            }
        },
#endif
        {   &hf_gsm_sms_udh_ports_src,
            {   "Source port", "gsm_sms_ud.udh.ports.src",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                NULL,
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_ports_dst,
            {   "Destination port", "gsm_sms_ud.udh.ports.dst",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                NULL,
                HFILL
            }
        },
        /*
         * Short Message fragment reassembly
         */
        {   &hf_gsm_sms_ud_fragments,
            {   "Short Message fragments", "gsm_sms_ud.fragments",
                FT_NONE, BASE_NONE, NULL, 0x00,
                "GSM Short Message fragments",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment,
            {   "Short Message fragment", "gsm_sms_ud.fragment",
                FT_FRAMENUM, BASE_NONE, NULL, 0x00,
                "GSM Short Message fragment",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_overlap,
            {   "Short Message fragment overlap", "gsm_sms_ud.fragment.overlap",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment overlaps with other fragment(s)",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_overlap_conflicts,
            {   "Short Message fragment overlapping with conflicting data",
                "gsm_sms_ud.fragment.overlap.conflicts",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment overlaps with conflicting data",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_multiple_tails,
            {   "Short Message has multiple tail fragments",
                "gsm_sms_ud.fragment.multiple_tails",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment has multiple tail fragments",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_too_long_fragment,
            {   "Short Message fragment too long",
                "gsm_sms_ud.fragment.too_long_fragment",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment data goes beyond the packet end",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_error,
            {   "Short Message defragmentation error", "gsm_sms_ud.fragment.error",
                FT_FRAMENUM, BASE_NONE, NULL, 0x00,
                "GSM Short Message defragmentation error due to illegal fragments",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_count,
            {   "Short Message fragment count", "gsm_sms_ud.fragment.count",
                FT_UINT32, BASE_DEC, NULL, 0x00,
                NULL,
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_reassembled_in,
            {   "Reassembled in",
                "gsm_sms_ud.reassembled.in",
                FT_FRAMENUM, BASE_NONE, NULL, 0x00,
                "GSM Short Message has been reassembled in this packet.",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_reassembled_length,
            {   "Reassembled Short Message length",
                "gsm_sms_ud.reassembled.length",
                FT_UINT32, BASE_DEC, NULL, 0x00,
                "The total length of the reassembled payload",
                HFILL
            }
        },
    };

    static gint *ett[] = {
    &ett_gsm_sms,
    &ett_udh,
    &ett_udh_ie,
    &ett_gsm_sms_ud_fragment,
    &ett_gsm_sms_ud_fragments,
    };
    /* Register the protocol name and description */
    proto_gsm_sms_ud = proto_register_protocol(
        "GSM Short Message Service User Data",  /* Name */
        "GSM SMS UD",           /* Short name */
        "gsm_sms_ud");          /* Filter name */

    /* Required function calls to register header fields and subtrees used */
    proto_register_field_array(proto_gsm_sms_ud, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    /* Subdissector code */
    gsm_sms_dissector_table = register_dissector_table("gsm_sms_ud.udh.port",
        "GSM SMS port IE in UDH", FT_UINT16, BASE_DEC);

    /* Preferences for GSM SMS UD */
    gsm_sms_ud_module = prefs_register_protocol(proto_gsm_sms_ud, NULL);
    prefs_register_bool_preference(gsm_sms_ud_module,
        "port_number_udh_means_wsp",
        "Port Number IE in UDH always triggers CL-WSP dissection",
        "Always decode a GSM Short Message as Connectionless WSP "
        "if a Port Number Information Element is present "
        "in the SMS User Data Header.",
        &port_number_udh_means_wsp);
    prefs_register_bool_preference(gsm_sms_ud_module, "try_dissect_1st_fragment",
        "Always try subdissection of 1st Short Message fragment",
        "Always try subdissection of the 1st fragment of a fragmented "
        "GSM Short Message. If reassembly is possible, the Short Message "
        "may be dissected twice (once as a short frame, once in its "
        "entirety).",
        &try_dissect_1st_frag);
    prefs_register_bool_preference(gsm_sms_ud_module, "prevent_dissectors_chg_cols",
            "Prevent sub-dissectors from changing column data",
        "Prevent sub-dissectors from replacing column data with their "
        "own. Eg. Prevent WSP dissector overwriting SMPP information.",
        &prevent_subdissectors_changing_columns);

    register_dissector("gsm_sms_ud", dissect_gsm_sms_ud, proto_gsm_sms_ud);

    /* GSM SMS UD dissector initialization routines */
    register_init_routine(gsm_sms_ud_defragment_init);
}
Ejemplo n.º 9
0
void
proto_register_ehdlc(void)
{
	static hf_register_info hf[] = {
		{ &hf_ehdlc_data_len,
		  { "DataLen", "ehdlc.data_len",
		    FT_UINT8, BASE_DEC, NULL, 0x0,
		    "The length of the data (in bytes)", HFILL }
		},
		{ &hf_ehdlc_protocol,
		  { "Protocol", "ehdlc.protocol",
		    FT_UINT8, BASE_HEX, VALS(ehdlc_protocol_vals), 0x0,
		    "The HDLC Sub-Protocol", HFILL }
		},
#if 0
		{ &hf_ehdlc_sapi,
		  { "SAPI", "ehdlc.sapi",
		    FT_UINT8, BASE_DEC, NULL, 0x1f,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_c_r,
		  { "C/R", "ehdlc.c_r",
		    FT_UINT8, BASE_HEX, NULL, 0x20,
		    NULL, HFILL }
		},
#endif
		{ &hf_ehdlc_xid_payload,
		  { "XID Payload", "ehdlc.xid_payload",
		    FT_BYTES, BASE_NONE, NULL, 0,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_control,
		  { "Control Field", "ehdlc.control",
		    FT_UINT16, BASE_HEX, NULL, 0,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_n_r,
		  { "N(R)", "ehdlc.control.n_r",
		    FT_UINT16, BASE_DEC, NULL, XDLC_N_R_EXT_MASK,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_n_s,
		  { "N(S)", "ehdlc.control.n_s",
		    FT_UINT16, BASE_DEC, NULL, XDLC_N_S_EXT_MASK,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_p,
		  { "Poll", "ehdlc.control.p",
		    FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_p_ext,
		  { "Poll", "ehdlc.control.p",
		    FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_f,
		  { "Final", "ehdlc.control.f",
		    FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_f_ext,
		  { "Final", "ehdlc.control.f",
		    FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_s_ftype,
		  { "Supervisory frame type", "ehdlc.control.s_ftype",
		    FT_UINT16, BASE_HEX, VALS(stype_vals), XDLC_S_FTYPE_MASK,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_u_modifier_cmd,
		  { "Command", "ehdlc.control.u_modifier_cmd",
		    FT_UINT8, BASE_HEX, VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_u_modifier_resp,
		  { "Response", "ehdlc.control.u_modifier_resp",
		    FT_UINT8, BASE_HEX, VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_ftype_i,
		  { "Frame Type", "ehdlc.control.ftype",
		    FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_I_MASK,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_ftype_s_u,
		  { "Frame Type", "ehdlc.control.ftype",
		    FT_UINT8, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK,
		    NULL, HFILL }
		},
		{ &hf_ehdlc_ftype_s_u_ext,
		  { "Frame Type", "ehdlc.control.ftype",
		    FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK,
		    NULL, HFILL }
		},
	};

	static gint *ett[] = {
		&ett_ehdlc,
		&ett_ehdlc_control,
	};

	proto_ehdlc =
	    proto_register_protocol("Ericsson HDLC",
				    "Ericsson HDLC as used in A-bis over IP", "ehdlc");

	proto_register_field_array(proto_ehdlc, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	register_dissector("ehdlc", dissect_ehdlc, proto_ehdlc);
}
Ejemplo n.º 10
0
void
proto_register_docsis_dcd (void)
{
/* Setup list of header fields  See Section 1.6.1 for details*/
  static hf_register_info hf[] = {
    {&hf_docsis_dcd_config_ch_cnt,
      {
      "Configuration Change Count", 
      "docsis_dcd.config_ch_cnt",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_num_of_frag,
      {
      "Number of Fragments", 
      "docsis_dcd.num_of_frag",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_frag_sequence_num,
      {
      "Fragment Sequence Number", 
      "docsis_dcd.frag_sequence_num",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_id,
      {
      "Downstream Classifier Id", 
      "docsis_dcd.cfr_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_rule_pri,
      {
      "Downstream Classifier Rule Priority", 
      "docsis_dcd.cfr_rule_pri",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_source_addr,
      {
      "Downstream Classifier IP Source Address", 
      "docsis_dcd.cfr_ip_source_addr",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_source_mask,
      {
      "Downstream Classifier IP Source Mask", 
      "docsis_dcd.cfr_ip_source_mask",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_dest_addr,
      {
      "Downstream Classifier IP Destination Address", 
      "docsis_dcd.cfr_ip_dest_addr",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_dest_mask,
      {
      "Downstream Classifier IP Destination Mask", 
      "docsis_dcd.cfr_ip_dest_mask",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      "Downstream Classifier IP Destination Address", 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_srcport_start,
      {
      "Downstream Classifier IP TCP/UDP Source Port Start", 
      "docsis_dcd.cfr_ip_tcpudp_srcport_start",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_srcport_end,
      {
      "Downstream Classifier IP TCP/UDP Source Port End", 
      "docsis_dcd.cfr_ip_tcpudp_srcport_end",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_dstport_start,
      {
      "Downstream Classifier IP TCP/UDP Destination Port Start", 
      "docsis_dcd.cfr_ip_tcpudp_dstport_start",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_dstport_end,
      {
      "Downstream Classifier IP TCP/UDP Destination Port End", 
      "docsis_dcd.cfr_ip_tcpudp_dstport_end",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_id,
      {
      "DSG Rule Id", 
      "docsis_dcd.rule_id",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_pri,
      {
      "DSG Rule Priority", 
      "docsis_dcd.rule_pri",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_ucid_list,
      {
      "DSG Rule UCID Range", 
      "docsis_dcd.rule_ucid_list",
      FT_BYTES, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_clid_known_mac_addr,
      {
      "DSG Rule Client ID Known MAC Address", 
      "docsis_dcd.clid_known_mac_addr",
      FT_ETHER, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_clid_ca_sys_id,
      {
      "DSG Rule Client ID CA System ID", 
      "docsis_dcd.clid_ca_sys_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_clid_app_id,
      {
      "DSG Rule Client ID Application ID", 
      "docsis_dcd.clid_app_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_tunl_addr,
      {
      "DSG Rule Tunnel MAC Address", 
      "docsis_dcd.rule_tunl_addr",
      FT_ETHER, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_cfr_id,
      {
      "DSG Rule Classifier ID", 
      "docsis_dcd.rule_cfr_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_vendor_spec,
      {
      "DSG Rule Vendor Specific Parameters", 
      "docsis_dcd.rule_vendor_spec",
      FT_BYTES, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_chan,
      {
      "DSG Configuration Channel", 
      "docsis_dcd.cfg_chan",
      FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg1,
      {
      "DSG Initialization Timeout (Tdsg1)", 
      "docsis_dcd.cfg_tdsg1",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg2,
      {
      "DSG Operational Timeout (Tdsg2)", 
      "docsis_dcd.cfg_tdsg2",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg3,
      {
      "DSG Two-Way Retry Timer (Tdsg3)", 
      "docsis_dcd.cfg_tdsg3",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg4,
      {
      "DSG One-Way Retry Timer (Tdsg4)", 
      "docsis_dcd.cfg_tdsg4",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_vendor_spec,
      {
      "DSG Configuration Vendor Specific Parameters", 
      "docsis_dcd.cfg_vendor_spec",
      FT_BYTES, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },

  };

/* Setup protocol subtree array */
  static gint *ett[] = {
    &ett_docsis_dcd,
    &ett_docsis_dcd_cfr,
    &ett_docsis_dcd_cfr_ip,
    &ett_docsis_dcd_rule,
    &ett_docsis_dcd_clid,
    &ett_docsis_dcd_cfg,
  };

/* Register the protocol name and description */
  proto_docsis_dcd =
    proto_register_protocol ("DOCSIS Downstream Channel Descriptor",
			     "DOCSIS DCD", "docsis_dcd");

/* Required function calls to register the header fields and subtrees used */
  proto_register_field_array (proto_docsis_dcd, hf, array_length (hf));
  proto_register_subtree_array (ett, array_length (ett));

  register_dissector ("docsis_dcd", dissect_dcd, proto_docsis_dcd);
}
void proto_register_ipa(void)
{
    module_t *ipa_module;

    static hf_register_info hf[] = {
        {   &hf_ipa_data_len,
            {   "DataLen", "gsm_ipa.data_len",
                FT_UINT16, BASE_DEC, NULL, 0x0,
                "The length of the data (in bytes)", HFILL
            }
        },
        {   &hf_ipa_protocol,
            {   "Protocol", "gsm_ipa.protocol",
                FT_UINT8, BASE_HEX, VALS(ipa_protocol_vals), 0x0,
                "The IPA Sub-Protocol", HFILL
            }
        },
        {   &hf_ipa_hsl_debug,
            {   "Debug Message", "gsm_ipa.hsl_debug",
                FT_STRING, BASE_NONE, NULL, 0,
                "Hay Systems Limited debug message", HFILL
            }
        },
        {   &hf_ipa_osmo_proto,
            {   "Osmo ext protocol", "gsm_ipa.osmo.protocol",
                FT_UINT8, BASE_HEX, VALS(ipa_osmo_proto_vals), 0x0,
                "The osmo extension protocol", HFILL
            }
        },

        {   &hf_ipa_osmo_ctrl_data,
            {   "CTRL data", "gsm_ipa.ctrl.data",
                FT_STRING, BASE_NONE, NULL, 0x0,
                "Control interface data", HFILL
            }
        },

    };
    static hf_register_info hf_ipa[] = {
        {   &hf_ipaccess_msgtype,
            {   "MessageType", "ipaccess.msg_type",
                FT_UINT8, BASE_HEX, VALS(ipaccess_msgtype_vals), 0x0,
                "Type of ip.access messsage", HFILL
            }
        },
        {   &hf_ipaccess_attr_tag,
            {   "Tag", "ipaccess.attr_tag",
                FT_UINT8, BASE_HEX, VALS(ipaccess_idtag_vals), 0x0,
                "Attribute Tag", HFILL
            }
        },
        {   &hf_ipaccess_attr_string,
            {   "String", "ipaccess.attr_string",
                FT_STRING, BASE_NONE, NULL, 0x0,
                "String attribute", HFILL
            }
        },
    };

    static gint *ett[] = {
        &ett_ipa,
        &ett_ipaccess,
    };

    proto_ipa =
        proto_register_protocol("GSM over IP protocol as used by ip.access",
                                "GSM over IP", "gsm_ipa");
    proto_ipaccess =
        proto_register_protocol("GSM over IP ip.access CCM sub-protocol",
                                "IPA", "ipaccess");

    proto_register_field_array(proto_ipa, hf, array_length(hf));
    proto_register_field_array(proto_ipaccess, hf_ipa, array_length(hf_ipa));
    proto_register_subtree_array(ett, array_length(ett));

    register_dissector("gsm_ipa", dissect_ipa, proto_ipa);

    /* Register table for subdissectors */
    osmo_dissector_table = register_dissector_table("ipa.osmo.protocol",
                           "ip.access Protocol", FT_UINT8, BASE_DEC);


    range_convert_str(&global_ipa_tcp_ports, IPA_TCP_PORTS, MAX_TCP_PORT);
    range_convert_str(&global_ipa_udp_ports, IPA_UDP_PORTS, MAX_UDP_PORT);
    ipa_module = prefs_register_protocol(proto_ipa,
                                         proto_reg_handoff_gsm_ipa);

    prefs_register_range_preference(ipa_module, "tcp_ports",
                                    "GSM IPA TCP Port(s)",
                                    "Set the port(s) for ip.access IPA"
                                    " (default: " IPA_TCP_PORTS ")",
                                    &global_ipa_tcp_ports, MAX_TCP_PORT);
    prefs_register_range_preference(ipa_module, "udp_ports",
                                    "GSM IPA UDP Port(s)",
                                    "Set the port(s) for ip.access IPA"
                                    " (default: " IPA_UDP_PORTS ")",
                                    &global_ipa_udp_ports, MAX_UDP_PORT);

    prefs_register_bool_preference(ipa_module, "hsl_debug_in_root_tree",
                                   "HSL Debug messages in root protocol tree",
                                   NULL, &global_ipa_in_root);
    prefs_register_bool_preference(ipa_module, "hsl_debug_in_info",
                                   "HSL Debug messages in INFO column",
                                   NULL, &global_ipa_in_info);
}
Ejemplo n.º 12
0
void
proto_register_mtp3(void)
{

  /* Setup list of header fields  See Section 1.6.1 for details*/
  static hf_register_info hf[] = {
    { &hf_mtp3_service_indicator,     { "Service indicator",        "mtp3.service_indicator", FT_UINT8,  BASE_HEX,  VALS(mtp3_service_indicator_code_vals), SERVICE_INDICATOR_MASK,     NULL, HFILL }},
    { &hf_mtp3_network_indicator,     { "Network indicator",        "mtp3.network_indicator", FT_UINT8,  BASE_HEX,  VALS(mtp3_network_indicator_vals),      NETWORK_INDICATOR_MASK,     NULL, HFILL }},
    { &hf_mtp3_itu_spare,             { "Spare",                    "mtp3.spare",             FT_UINT8,  BASE_HEX,  NULL,                                   SPARE_MASK,                 NULL, HFILL }},
    { &hf_mtp3_itu_priority,          { "ITU priority",             "mtp3.priority",          FT_UINT8,  BASE_DEC,  NULL,                                   SPARE_MASK,                 NULL, HFILL }},
    { &hf_mtp3_ansi_priority,         { "ANSI Priority",            "mtp3.priority",          FT_UINT8,  BASE_DEC,  NULL,                                   ANSI_PRIORITY_MASK,         NULL, HFILL }},
    { &hf_mtp3_itu_opc,               { "OPC",                      "mtp3.opc",               FT_UINT32, BASE_DEC,  NULL,                                   ITU_OPC_MASK,               NULL, HFILL }},
    { &hf_mtp3_itu_pc,                { "PC",                       "mtp3.pc",                FT_UINT32, BASE_DEC,  NULL,                                   0x0,                        NULL, HFILL }},
    { &hf_mtp3_24bit_pc,              { "PC",                       "mtp3.pc",                FT_UINT32, BASE_DEC,  NULL,                                   ANSI_PC_MASK,               NULL, HFILL }},
    { &hf_mtp3_24bit_opc,             { "OPC",                      "mtp3.opc",               FT_UINT32, BASE_DEC,  NULL,                                   ANSI_PC_MASK,               NULL, HFILL }},
    { &hf_mtp3_ansi_opc,              { "OPC",                      "mtp3.ansi_opc",          FT_STRING, BASE_NONE, NULL,                                   0x0,                        NULL, HFILL }},
    { &hf_mtp3_chinese_opc,           { "OPC",                      "mtp3.chinese_opc",       FT_STRING, BASE_NONE, NULL,                                   0x0,                        NULL, HFILL }},
    { &hf_mtp3_opc_network,           { "OPC Network",              "mtp3.opc.network",       FT_UINT24, BASE_DEC,  NULL,                                   ANSI_NETWORK_MASK,          NULL, HFILL }},
    { &hf_mtp3_opc_cluster,           { "OPC Cluster",              "mtp3.opc.cluster",       FT_UINT24, BASE_DEC,  NULL,                                   ANSI_CLUSTER_MASK,          NULL, HFILL }},
    { &hf_mtp3_opc_member,            { "OPC Member",               "mtp3.opc.member",        FT_UINT24, BASE_DEC,  NULL,                                   ANSI_MEMBER_MASK,           NULL, HFILL }},
    { &hf_mtp3_japan_opc,             { "OPC",                      "mtp3.opc",               FT_UINT16, BASE_DEC,  NULL,                                   JAPAN_PC_MASK,              NULL, HFILL }},
    { &hf_mtp3_japan_pc,              { "PC",                       "mtp3.pc",                FT_UINT16, BASE_DEC,  NULL,                                   JAPAN_PC_MASK,              NULL, HFILL }},
    { &hf_mtp3_itu_dpc,               { "DPC",                      "mtp3.dpc",               FT_UINT32, BASE_DEC,  NULL,                                   ITU_DPC_MASK,               NULL, HFILL }},
    { &hf_mtp3_24bit_dpc,             { "DPC",                      "mtp3.dpc",               FT_UINT32, BASE_DEC,  NULL,                                   ANSI_PC_MASK,               NULL, HFILL }},
    { &hf_mtp3_ansi_dpc,              { "DPC",                      "mtp3.ansi_dpc",          FT_STRING, BASE_NONE, NULL,                                   0x0,                        NULL, HFILL }},
    { &hf_mtp3_chinese_dpc,           { "DPC",                      "mtp3.chinese_dpc",       FT_STRING, BASE_NONE, NULL,                                   0x0,                        NULL, HFILL }},
    { &hf_mtp3_dpc_network,           { "DPC Network",              "mtp3.dpc.network",       FT_UINT24, BASE_DEC,  NULL,                                   ANSI_NETWORK_MASK,          NULL, HFILL }},
    { &hf_mtp3_dpc_cluster,           { "DPC Cluster",              "mtp3.dpc.cluster",       FT_UINT24, BASE_DEC,  NULL,                                   ANSI_CLUSTER_MASK,          NULL, HFILL }},
    { &hf_mtp3_dpc_member,            { "DPC Member",               "mtp3.dpc.member",        FT_UINT24, BASE_DEC,  NULL,                                   ANSI_MEMBER_MASK,           NULL, HFILL }},
    { &hf_mtp3_japan_dpc,             { "DPC",                      "mtp3.dpc",               FT_UINT16, BASE_DEC,  NULL,                                   JAPAN_PC_MASK,              NULL, HFILL }},
    { &hf_mtp3_itu_sls,               { "Signalling Link Selector", "mtp3.sls",               FT_UINT32, BASE_DEC,  NULL,                                   ITU_SLS_MASK,               NULL, HFILL }},
    { &hf_mtp3_japan_4_bit_sls,       { "Signalling Link Selector", "mtp3.sls",               FT_UINT8,  BASE_DEC,  NULL,                                   JAPAN_4_BIT_SLS_MASK,       NULL, HFILL }},
    { &hf_mtp3_japan_4_bit_sls_spare, { "SLS Spare",                "mtp3.sls_spare",         FT_UINT8,  BASE_HEX,  NULL,                                   JAPAN_4_BIT_SLS_SPARE_MASK, NULL, HFILL }},
    { &hf_mtp3_japan_5_bit_sls,       { "Signalling Link Selector", "mtp3.sls",               FT_UINT8,  BASE_DEC,  NULL,                                   JAPAN_5_BIT_SLS_MASK,       NULL, HFILL }},
    { &hf_mtp3_japan_5_bit_sls_spare, { "SLS Spare",                "mtp3.sls_spare",         FT_UINT8,  BASE_HEX,  NULL,                                   JAPAN_5_BIT_SLS_SPARE_MASK, NULL, HFILL }},
    { &hf_mtp3_ansi_5_bit_sls,        { "Signalling Link Selector", "mtp3.sls",               FT_UINT8,  BASE_DEC,  NULL,                                   ANSI_5BIT_SLS_MASK,         NULL, HFILL }},
    { &hf_mtp3_ansi_8_bit_sls,        { "Signalling Link Selector", "mtp3.sls",               FT_UINT8,  BASE_DEC,  NULL,                                   ANSI_8BIT_SLS_MASK,         NULL, HFILL }},
    { &hf_mtp3_chinese_itu_sls,       { "Signalling Link Selector", "mtp3.sls",               FT_UINT8,  BASE_DEC,  NULL,                                   CHINESE_ITU_SLS_MASK,       NULL, HFILL }}
  };

  /* Setup protocol subtree array */
  static gint *ett[] = {
    &ett_mtp3,
    &ett_mtp3_sio,
    &ett_mtp3_label,
    &ett_mtp3_label_dpc,
    &ett_mtp3_label_opc
  };

  static const enum_val_t mtp3_options[] = {
    { "itu",		"ITU",		ITU_STANDARD },
    { "ansi",		"ANSI",		ANSI_STANDARD },
    { "chinese-itu",	"Chinese ITU",	CHINESE_ITU_STANDARD },
    { "japan",		"Japan",	JAPAN_STANDARD },
    { NULL,		NULL,		0 }
  };

  static const enum_val_t mtp3_addr_fmt_str_e[] = {
    { "decimal",	"Decimal",		MTP3_ADDR_FMT_DEC },
    { "hexadecimal",	"Hexadecimal",		MTP3_ADDR_FMT_HEX },
    { "ni-decimal",     "NI-Decimal",		MTP3_ADDR_FMT_NI_DEC },
    { "ni-hexadecimal", "NI-Hexadecimal",       MTP3_ADDR_FMT_NI_HEX },
    { "dashed",		"Dashed",		MTP3_ADDR_FMT_DASHED },
    { NULL,		NULL,			0 }
  };

  static const enum_val_t itu_pc_structures[] = {
    { "unstructured",	"Unstructured",	ITU_PC_STRUCTURE_NONE},
    { "3-8-3",		"3-8-3",	ITU_PC_STRUCTURE_3_8_3 },
    { "4-3-4-3",	"4-3-4-3",	ITU_PC_STRUCTURE_4_3_4_3 },
    { NULL,		NULL,		0 }
  };

  static const enum_val_t japan_pc_structures[] = {
    { "unstructured",	"Unstructured",	JAPAN_PC_STRUCTURE_NONE},
    { "7-4-5",		"7-4-5",	JAPAN_PC_STRUCTURE_7_4_5 },
    { "3-4-4-5",	"3-4-4-5",	JAPAN_PC_STRUCTURE_3_4_4_5 },
    { NULL,		NULL,		0 }
  };

 /* Register the protocol name and description */
  proto_mtp3 = proto_register_protocol("Message Transfer Part Level 3",
				       "MTP3", "mtp3");
  mtp3_handle = register_dissector("mtp3", dissect_mtp3, proto_mtp3);

  /* Required function calls to register the header fields and subtrees used */
  proto_register_field_array(proto_mtp3, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  mtp3_sio_dissector_table = register_dissector_table("mtp3.service_indicator",
						      "MTP3 Service indicator",
						      FT_UINT8, BASE_HEX);

  mtp3_tap = register_tap("mtp3");

  mtp3_module = prefs_register_protocol(proto_mtp3, NULL);

  prefs_register_bool_preference(mtp3_module, "heuristic_standard",
				 "Try to determine the MTP3 standard heuristically",
				 "This only works for SCCP traffic for now",
				 &mtp3_heuristic_standard);

  prefs_register_enum_preference(mtp3_module, "standard", "MTP3 standard",
				 "The SS7 standard used in MTP3 packets",
				 &mtp3_standard, mtp3_options, FALSE);

  prefs_register_enum_preference(mtp3_module, "itu_pc_structure", "ITU Pointcode structure",
				 "The structure of the pointcodes in ITU networks",
				 &itu_pc_structure, itu_pc_structures, FALSE);

  prefs_register_enum_preference(mtp3_module, "japan_pc_structure", "Japan Pointcode structure",
				 "The structure of the pointcodes in Japan networks",
				 &japan_pc_structure, japan_pc_structures, FALSE);

  prefs_register_bool_preference(mtp3_module, "ansi_5_bit_sls",
				 "Use 5-bit SLS (ANSI only)",
				 "Use 5-bit (instead of 8-bit) SLS in ANSI MTP3 packets",
				 &mtp3_use_ansi_5_bit_sls);

  prefs_register_bool_preference(mtp3_module, "japan_5_bit_sls",
				 "Use 5-bit SLS (Japan only)",
				 "Use 5-bit (instead of 4-bit) SLS in Japan MTP3 packets",
				 &mtp3_use_japan_5_bit_sls);

  prefs_register_enum_preference(mtp3_module, "addr_format", "Address Format",
				 "Format for point code in the address columns",
				 &mtp3_addr_fmt, mtp3_addr_fmt_str_e, FALSE);

  prefs_register_bool_preference(mtp3_module, "itu_priority",
				 "Show MSU priority (national option, ITU and China ITU only)",
				 "Decode the spare bits of the SIO as the MSU priority (a national option in ITU)",
				 &mtp3_show_itu_priority);

}
Ejemplo n.º 13
0
void
proto_register_btmcap(void)
{
    module_t *module;

    static hf_register_info hf[] = {
        { &hf_btmcap_op_code,
            { "Op Code",                         "btmcap.op_code",
            FT_UINT8, BASE_HEX, VALS(op_code_vals), 0x0,
            NULL, HFILL }
        },
        { &hf_btmcap_response_code,
            { "Response Code",                   "btmcap.response_code",
            FT_UINT8, BASE_HEX, VALS(response_code_vals), 0x0,
            NULL, HFILL }
        },
        { &hf_btmcap_mdl_id,
            { "MDL ID",                          "btmcap.mdl_id",
            FT_UINT16, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_btmcap_mdep_id,
            { "MDEP ID",                         "btmcap.mdep_id",
            FT_UINT8, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_btmcap_configuration,
            { "Configuration",                   "btmcap.configuration",
            FT_UINT8, BASE_HEX, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_btmcap_timestamp_required_accuracy,
            { "Timestamp Required Accuracy",     "btmcap.timestamp_required_accuracy",
            FT_UINT16, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_timestamp_update_information,
            { "Timestamp Update Information",    "btmcap.timestamp_update_information",
            FT_UINT8, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_bluetooth_clock_sync_time,
            { "Bluetooth Clock Sync Time",       "btmcap.bluetooth_clock_sync_time",
            FT_UINT32, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_timestamp_sync_time,
            { "Timestamp Sync Time",             "btmcap.timestamp_sync_time",
            FT_UINT64, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_timestamp_sample_accuracy,
            { "Timestamp Sample Accuracy",       "btmcap.timestamp_sample_accuracy",
            FT_UINT16, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_bluetooth_clock_access_resolution,
            { "Bluetooth Clock Access Resolution","btmcap.bluetooth_clock_access_resolution",
            FT_UINT8, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_sync_lead_time,
            { "Sync Lead Time",                  "btmcap.sync_lead_time",
            FT_UINT16, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_timestamp_native_resolution,
            { "Timestamp Native Resolution",     "btmcap.timestamp_native_resolution",
            FT_UINT16, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_timestamp_native_accuracy,
            { "Timestamp Native Accuracy",       "btmcap.timestamp_native_accuracy",
            FT_UINT16, BASE_DEC, NULL, 0x00,
            NULL, HFILL }
        },
        { &hf_btmcap_response_parameters,
            { "Response Parameters",             "btmcap.response_parameters",
            FT_BYTES, BASE_NONE, NULL, 0x00,
            NULL, HFILL }
        },

        { &hf_btmcap_data,
            { "Data",                            "btmcap.data",
            FT_NONE, BASE_NONE, NULL, 0x00,
            NULL, HFILL }
        },

    };

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

    proto_btmcap = proto_register_protocol("Bluetooth MCAP Protocol", "BT MCAP", "btmcap");
    register_dissector("btmcap", dissect_btmcap, proto_btmcap);

    proto_register_field_array(proto_btmcap, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    module = prefs_register_protocol(proto_btmcap, NULL);
    prefs_register_static_text_preference(module, "mcap.version",
            "Bluetooth Protocol MCAP version: 1.0",
            "Version of protocol supported by this dissector.");
}
Ejemplo n.º 14
0
void
proto_register_ppi_gps(void) {
    /* The following array initializes those header fields declared above to the values displayed */
    static hf_register_info hf[] = {
        { &hf_ppi_gps_version,
          { "Header revision", "ppi_gps.version",
            FT_UINT8, BASE_DEC, NULL, 0x0,
            "Version of ppi_gps header format", HFILL } },
        { &hf_ppi_gps_pad,
          { "Header pad", "ppi_gps.pad",
            FT_UINT8, BASE_DEC, NULL, 0x0,
            "Padding", HFILL } },
        { &hf_ppi_gps_length,
          { "Header length", "ppi_gps.length",
            FT_UINT16, BASE_DEC, NULL, 0x0,
            "Length of header including version, pad, length and data fields", HFILL } },
        { &hf_ppi_gps_present, /* these flag fields are composed of a uint32 on the display */
          { "Present", "ppi_gps.present",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            "Bitmask indicating which fields are present", HFILL } },

        /* Boolean 'present' flags */
        { &hf_ppi_gps_present_gpsflags_flags, /* followed by a lot of booleans */
          { "GPSFlags", "ppi_gps.present.gpsflagss",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_GPSFLAGS,
            "32-bit bitmask indicating type of GPS fix (GPS/INS/software/etc)", HFILL } },
        { &hf_ppi_gps_present_lat,
          { "Lat", "ppi_gps.present.lat",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_LAT,
            "Specifies if the latitude field is present", HFILL } },

        { &hf_ppi_gps_present_lon,
          { "Lon", "ppi_gps.present.lon",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_LON,
            "Specifies if the longitude field is present", HFILL } },

        { &hf_ppi_gps_present_alt,
          { "Alt", "ppi_gps.present.alt",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_ALT,
            "Specifies if the altitude field is present", HFILL } },

        { &hf_ppi_gps_present_alt_gnd,
          { "Alt-gnd", "ppi_gps.present.alt_gnd",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_ALT_G,
            "Specifies if the altitude-g field is present", HFILL } },

        { &hf_ppi_gps_present_gpstime,
          { "GPStime", "ppi_gps.present.gpstime",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_GPSTIME,
            "Specifies if the GPS time field is present", HFILL } },


        { &hf_ppi_gps_present_fractime,
          { "fractime", "ppi_gps.present.fractime",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_FRACTIME,
            "Specifies if the fractional time field is present", HFILL } },


        { &hf_ppi_gps_present_eph,
          { "error_h", "ppi_gps.present.eph",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_EPH,
            "Specifies if the horizontal error field is present (eph)", HFILL } },

        { &hf_ppi_gps_present_epv,
          { "error_v", "ppi_gps.present.epv",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_EPV,
            "Specifies if the vertical error field present (epv)", HFILL } },


        { &hf_ppi_gps_present_ept,
          { "error_t", "ppi_gps.present.ept",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_EPT,
            "Specifies if the estimed time error field is present (ept)", HFILL } },

        { &hf_ppi_gps_present_descr,
          { "Description", "ppi_gps.present.descr",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_DESCRSTR,
            "Specifies if the (ASCII) description is present", HFILL } },

        { &hf_ppi_gps_present_appspecific_num,
          { "AppId", "ppi_gps.present.appid",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_APPID,
            "Specifies if the application specific field id is present", HFILL } },

        { &hf_ppi_gps_present_appspecific_data,
          { "AppData", "ppi_gps.present.appdata",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_APPDATA,
            "Specifies if the application specific data field  is present", HFILL } },

        { &hf_ppi_gps_present_ext,
          { "Ext", "ppi_gps.present.ext",
            FT_BOOLEAN, 32, NULL, PPI_GPS_MASK_EXT,
            "Specifies if there are any extensions to the header present", HFILL } },

        /* ---Now we get to the actual data fields--- */

        { &hf_ppi_gps_gpsflags_flags,
          { "GPSFlags", "ppi_gps.gpsflags",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            "Bitmask indicating GPS/INS/manual fix", HFILL } },
        { &hf_ppi_gps_lat,
          { "Latitude", "ppi_gps.lat",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "Latitude packet was received at", HFILL } },
        { &hf_ppi_gps_lon,
          { "Longitude", "ppi_gps.lon",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "Longitude packet was received at", HFILL } },
        { &hf_ppi_gps_alt,
          { "Altitude", "ppi_gps.alt",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "Altitude packet was received at", HFILL } },
        { &hf_ppi_gps_alt_gnd,
          { "Altitude_gnd", "ppi_gps.alt_gnd",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "Altitude packet was received at (relative to ground)", HFILL } },
        { &hf_ppi_gps_gpstime,
          { "GPSTimestamp", "ppi_gps.gpstime",
            FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0,
            "GPSTimestamp packet was received at", HFILL } },
#if 0
        { &hf_ppi_gps_fractime,
          { "fractional Timestamp", "ppi_gps.fractime",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "fractional GPSTimestamp packet was received at", HFILL } },
#endif
        { &hf_ppi_gps_eph,
          { "Horizontal Error (m)", "ppi_gps.eph",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "Horizontal margin of error (meters)", HFILL } },
        { &hf_ppi_gps_epv,
          { "Vertical Error (m)", "ppi_gps.epv",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "Vertical margin of error (meters)", HFILL } },
        { &hf_ppi_gps_ept,
          { "Time Error (s)", "ppi_gps.ept",
            FT_DOUBLE, BASE_NONE, NULL, 0x0,
            "Time margin of error (secs)", HFILL } },
        { &hf_ppi_gps_descstr,
          { "Description", "ppi_gps.descr",
            FT_STRING, BASE_NONE, NULL, 0x0,
            NULL, HFILL } },
        { &hf_ppi_gps_appspecific_num,
          { "Application Specific id", "ppi_gps.appid",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            NULL, HFILL } },
        { &hf_ppi_gps_appspecific_data,
          { "Application specific data", "ppi_gps.appdata",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL } },

        /* --- moving on to the 'FixType' flags --- */
#define PPI_GPS_GPSFLAGS_FLAG0_NOFIX     0x00000001
#define PPI_GPS_GPSFLAGS_FLAG1_GPS       0x00000002
#define PPI_GPS_GPSFLAGS_FLAG2_DIFFGPS   0x00000004
#define PPI_GPS_GPSFLAGS_FLAG3_PPS       0x00000008
#define PPI_GPS_GPSFLAGS_FLAG4_RTK       0x00000010
#define PPI_GPS_GPSFLAGS_FLAG5_FLOATRTK  0x00000020
#define PPI_GPS_GPSFLAGS_FLAG6_DEAD_RECK 0x00000040
#define PPI_GPS_GPSFLAGS_FLAG7_MANUAL    0x00000080
#define PPI_GPS_GPSFLAGS_FLAG8_SIM       0x00000100
        { &hf_ppi_gps_gpsflags_flag0_nofix, /* no fix available */
          { "No fix available", "ppi_gps.gpsflagss.nofix",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG0_NOFIX,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag1_gpsfix, /* GPSfix available */
          { "GPS provided fix", "ppi_gps.gpsflagss.gps",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG1_GPS,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag2_diffgps, /* Differential GPS fix  available */
          { "Differential GPS provided fix", "ppi_gps.gpsflagss.diffgps",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG2_DIFFGPS,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag3_PPS, /* PPS fix  */
          { "PPS fix", "ppi_gps.gpsflagss.pps",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG3_PPS,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag4_RTK, /* RTK fix*/
          { "RTK fix", "ppi_gps.gpsflagss.rtk",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG4_RTK,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag5_floatRTK, /*float RTK */
          { "floatRTK fix", "ppi_gps.gpsflagss.frtk",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG5_FLOATRTK,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag6_dead_reck, /*dead reckoning */
          { "dead reckoning fix", "ppi_gps.gpsflagss.dead_reck",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG6_DEAD_RECK,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag7_manual, /* manual */
          { "manual fix", "ppi_gps.gpsflagss.manual",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG7_MANUAL,
            NULL, HFILL } },
        { &hf_ppi_gps_gpsflags_flag8_sim, /* simulation */
          { "simulated fix", "ppi_gps.gpsflagss.simulation",
            FT_BOOLEAN, 32, NULL, PPI_GPS_GPSFLAGS_FLAG8_SIM,
            NULL, HFILL } },

    };
    static gint *ett[] = {
        &ett_ppi_gps,
        &ett_ppi_gps_present,
        &ett_ppi_gps_gpsflags_flags
    };

    static ei_register_info ei[] = {
        { &ei_ppi_gps_present_bit, { "ppi_gps.present.unknown_bit", PI_PROTOCOL, PI_WARN, "Error: PPI-GEOLOCATION-GPS: unknown bit set in present field.", EXPFILL }},
    };

    expert_module_t* expert_ppi_gps;

    proto_ppi_gps = proto_register_protocol("PPI Geotagging GPS tag decoder", "PPI GPS Decoder", "ppi_gps");
    proto_register_field_array(proto_ppi_gps, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    expert_ppi_gps = expert_register_protocol(proto_ppi_gps);
    expert_register_field_array(expert_ppi_gps, ei, array_length(ei));
    register_dissector("ppi_gps", dissect_ppi_gps, proto_ppi_gps);
}
Ejemplo n.º 15
0
void
proto_register_frame(void)
{
	static hf_register_info hf[] = {
		{ &hf_frame_arrival_time,
		  { "Arrival Time", "frame.time",
		    FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
		    "Absolute time when this frame was captured", HFILL }},

		{ &hf_frame_shift_offset,
		  { "Time shift for this packet", "frame.offset_shift",
		    FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
		    "Time shift applied to this packet", HFILL }},

		{ &hf_frame_arrival_time_epoch,
		  { "Epoch Time", "frame.time_epoch",
		    FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
		    "Epoch time when this frame was captured", HFILL }},

		{ &hf_frame_time_delta,
		  { "Time delta from previous captured frame", "frame.time_delta",
		    FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_time_delta_displayed,
		  { "Time delta from previous displayed frame", "frame.time_delta_displayed",
		    FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_time_relative,
		  { "Time since reference or first frame", "frame.time_relative",
		    FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
		    "Time relative to time reference or first frame", HFILL }},

		{ &hf_frame_time_reference,
		  { "This is a Time Reference frame", "frame.ref_time",
		    FT_NONE, BASE_NONE, NULL, 0x0,
		    "This frame is a Time Reference frame", HFILL }},

		{ &hf_frame_number,
		  { "Frame Number", "frame.number",
		    FT_UINT32, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_len,
		  { "Frame length on the wire", "frame.len",
		    FT_UINT32, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_capture_len,
		  { "Frame length stored into the capture file", "frame.cap_len",
		    FT_UINT32, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_md5_hash,
		  { "Frame MD5 Hash", "frame.md5_hash",
		    FT_STRING, BASE_NONE, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_p2p_dir,
		  { "Point-to-Point Direction", "frame.p2p_dir",
		    FT_INT8, BASE_DEC, VALS(p2p_dirs), 0x0,
		    NULL, HFILL }},

		{ &hf_link_number,
		  { "Link Number", "frame.link_nr",
		    FT_UINT16, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_file_off,
		  { "File Offset", "frame.file_off",
		    FT_INT64, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_marked,
		  { "Frame is marked", "frame.marked",
		    FT_BOOLEAN, BASE_NONE, NULL, 0x0,
		    "Frame is marked in the GUI", HFILL }},

		{ &hf_frame_ignored,
		  { "Frame is ignored", "frame.ignored",
		    FT_BOOLEAN, BASE_NONE, NULL, 0x0,
		    "Frame is ignored by the dissectors", HFILL }},

		{ &hf_frame_protocols,
		  { "Protocols in frame", "frame.protocols",
		    FT_STRING, BASE_NONE, NULL, 0x0,
		    "Protocols carried by this frame", HFILL }},

		{ &hf_frame_color_filter_name,
		  { "Coloring Rule Name", "frame.coloring_rule.name",
		    FT_STRING, BASE_NONE, NULL, 0x0,
		    "The frame matched the coloring rule with this name", HFILL }},

		{ &hf_frame_color_filter_text,
		  { "Coloring Rule String", "frame.coloring_rule.string",
		    FT_STRING, BASE_NONE, NULL, 0x0,
		    "The frame matched this coloring rule string", HFILL }},

		{ &hf_frame_interface_id,
		  { "Interface id", "frame.interface_id",
		    FT_UINT32, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_pack_flags,
		  { "Packet flags", "frame.packet_flags",
		    FT_UINT32, BASE_HEX, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_pack_direction,
		  { "Direction", "frame.packet_flags_direction",
		    FT_UINT32, BASE_HEX, VALS(&packet_word_directions), PACKET_WORD_DIRECTION_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_reception_type,
		  { "Reception type", "frame.packet_flags_reception_type",
		    FT_UINT32, BASE_DEC, VALS(&packet_word_reception_types), PACKET_WORD_RECEPTION_TYPE_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_fcs_length,
		  { "FCS length", "frame.packet_flags_fcs_length",
		    FT_UINT32, BASE_DEC, NULL, PACKET_WORD_FCS_LENGTH_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_reserved,
		  { "Reserved", "frame.packet_flags_reserved",
		    FT_UINT32, BASE_DEC, NULL, PACKET_WORD_RESERVED_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_crc_error,
		  { "CRC error", "frame.packet_flags_crc_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_CRC_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_wrong_packet_too_long_error,
		  { "Packet too long error", "frame.packet_flags_packet_too_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_PACKET_TOO_LONG_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_wrong_packet_too_short_error,
		  { "Packet too short error", "frame.packet_flags_packet_too_short_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_PACKET_TOO_SHORT_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_wrong_inter_frame_gap_error,
		  { "Wrong interframe gap error", "frame.packet_flags_wrong_inter_frame_gap_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_WRONG_INTER_FRAME_GAP_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_unaligned_frame_error,
		  { "Unaligned frame error", "frame.packet_flags_unaligned_frame_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_UNALIGNED_FRAME_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_start_frame_delimiter_error,
		  { "Start frame delimiter error", "frame.packet_flags_start_frame_delimiter_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_START_FRAME_DELIMITER_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_preamble_error,
		  { "Preamble error", "frame.packet_flags_preamble_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_PREAMBLE_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_frame_pack_symbol_error,
		  { "Symbol error", "frame.packet_flags_symbol_error",
		    FT_BOOLEAN, 32, TFS(&tfs_set_notset), PACKET_WORD_SYMBOL_ERR_MASK,
		    NULL, HFILL }},

		{ &hf_comments_text,
		  { "Comment", "frame.comment",
		    FT_STRING, BASE_NONE, NULL, 0x0,
		    NULL, HFILL }},

		{ &hf_frame_num_p_prot_data,
		  { "Number of per-protocol-data", "frame.p_prot_data",
		    FT_UINT32, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }},
	};

	static hf_register_info hf_encap =
		{ &hf_frame_wtap_encap,
		  { "Encapsulation type", "frame.encap_type",
		    FT_INT16, BASE_DEC, NULL, 0x0,
		    NULL, HFILL }};

 	static gint *ett[] = {
		&ett_frame,
		&ett_flags,
		&ett_comments
	};

	static ei_register_info ei[] = {
		{ &ei_comments_text, { "frame.comment.expert", PI_COMMENTS_GROUP, PI_COMMENT, "Formatted comment", EXPFILL }},
		{ &ei_arrive_time_out_of_range, { "frame.time_invalid", PI_SEQUENCE, PI_NOTE, "Arrival Time: Fractional second out of range (0-1000000000)", EXPFILL }},
	};

	module_t *frame_module;
	expert_module_t* expert_frame;

	if (hf_encap.hfinfo.strings == NULL) {
		int encap_count = wtap_get_num_encap_types();
		value_string *arr;
		int i;

		hf_encap.hfinfo.strings = arr = g_new(value_string, encap_count+1);

		for (i = 0; i < encap_count; i++) {
			arr[i].value = i;
			arr[i].strptr = wtap_encap_string(i);
		}
		arr[encap_count].value = 0;
		arr[encap_count].strptr = NULL;
	}

	wtap_encap_dissector_table = register_dissector_table("wtap_encap",
	    "Wiretap encapsulation type", FT_UINT32, BASE_DEC);

	proto_frame = proto_register_protocol("Frame", "Frame", "frame");
	proto_pkt_comment = proto_register_protocol("Packet comments", "Pkt_Comment", "pkt_comment");
	proto_register_field_array(proto_frame, hf, array_length(hf));
	proto_register_field_array(proto_frame, &hf_encap, 1);
	proto_register_subtree_array(ett, array_length(ett));
	expert_frame = expert_register_protocol(proto_frame);
	expert_register_field_array(expert_frame, ei, array_length(ei));
	register_dissector("frame",dissect_frame,proto_frame);

	/* You can't disable dissection of "Frame", as that would be
	   tantamount to not doing any dissection whatsoever. */
	proto_set_cant_toggle(proto_frame);

	/* Our preferences */
	frame_module = prefs_register_protocol(proto_frame, NULL);
	prefs_register_bool_preference(frame_module, "show_file_off",
	    "Show File Offset", "Show offset of frame in capture file", &show_file_off);
	prefs_register_bool_preference(frame_module, "force_docsis_encap",
	    "Treat all frames as DOCSIS frames", "Treat all frames as DOCSIS Frames", &force_docsis_encap);
	prefs_register_bool_preference(frame_module, "generate_md5_hash",
	    "Generate an MD5 hash of each frame",
	    "Whether or not MD5 hashes should be generated for each frame, useful for finding duplicate frames.",
	    &generate_md5_hash);
	prefs_register_bool_preference(frame_module, "generate_epoch_time",
	    "Generate an epoch time entry for each frame",
	    "Whether or not an Epoch time entry should be generated for each frame.",
	    &generate_epoch_time);
	prefs_register_bool_preference(frame_module, "generate_bits_field",
	    "Show the number of bits in the frame",
	    "Whether or not the number of bits in the frame should be shown.",
	    &generate_bits_field);

	frame_tap=register_tap("frame");
}
Ejemplo n.º 16
0
void
proto_register_eapol(void)
{
  static hf_register_info hf[] = {
    { &hf_eapol_version, {
        "Version", "eapol.version",
        FT_UINT8, BASE_DEC, VALS(eapol_version_vals), 0x0,
        NULL, HFILL }},

    { &hf_eapol_type, {
        "Type", "eapol.type",
        FT_UINT8, BASE_DEC, VALS(eapol_type_vals), 0x0,
        NULL, HFILL }},

    { &hf_eapol_len, {
        "Length", "eapol.len",
        FT_UINT16, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_type, {
        "Key Descriptor Type", "eapol.keydes.type",
        FT_UINT8, BASE_DEC, VALS(eapol_keydes_type_vals), 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_key_len, {
        "Key Length", "eapol.keydes.key_len",
        FT_UINT16, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_replay_counter, {
        "Replay Counter", "eapol.keydes.replay_counter",
        FT_UINT64, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_key_iv, {
        "Key IV", "eapol.keydes.key_iv",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_key_index, {
        "Key Index", "eapol.keydes.key_index",
        FT_UINT8, BASE_HEX, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_key_index_type, {
        "Type", "eapol.keydes.key_index.type",
        FT_BOOLEAN, 8, TFS(&keytype_tfs), KEYDES_KEY_INDEX_TYPE_MASK ,
        NULL, HFILL }},

    { &hf_eapol_keydes_key_index_number, {
        "Number", "eapol.keydes.key_index.number",
        FT_UINT8, BASE_DEC, NULL, KEYDES_KEY_INDEX_NUMBER_MASK,
        NULL, HFILL }},

    { &hf_eapol_keydes_key_signature, {
        "Key Signature", "eapol.keydes.key_signature",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_key, {
        "Key", "eapol.keydes.key",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_keydes_key_generated_locally, {
        "Key Generated Locally", "eapol.keydes.key.generated_locally",
        FT_BOOLEAN, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo, {
        "Key Information", "eapol.keydes.key_info",
        FT_UINT16, BASE_HEX, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_keydes_version, {
        "Key Descriptor Version", "eapol.keydes.key_info.keydes_version",
        FT_UINT16, BASE_DEC, VALS(keydes_version_vals), KEY_INFO_KEYDES_VERSION_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_key_type, {
        "Key Type", "eapol.keydes.key_info.key_type",
        FT_BOOLEAN, 16, TFS(&keyinfo_key_type_tfs), KEY_INFO_KEY_TYPE_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_key_index, {
        "Key Index", "eapol.keydes.key_info.key_index",
        FT_UINT16, BASE_DEC, NULL, KEY_INFO_KEY_INDEX_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_install, {
        "Install", "eapol.keydes.key_info.install",
        FT_BOOLEAN, 16, TFS(&tfs_set_notset), KEY_INFO_INSTALL_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_key_ack, {
        "Key ACK", "eapol.keydes.key_info.key_ack",
        FT_BOOLEAN, 16, TFS(&tfs_set_notset), KEY_INFO_KEY_ACK_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_key_mic, {
        "Key MIC", "eapol.keydes.key_info.key_mic",
        FT_BOOLEAN, 16, TFS(&tfs_set_notset), KEY_INFO_KEY_MIC_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_secure, {
        "Secure", "eapol.keydes.key_info.secure",
        FT_BOOLEAN, 16, TFS(&tfs_set_notset), KEY_INFO_SECURE_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_error, {
        "Error", "eapol.keydes.key_info.error",
        FT_BOOLEAN, 16, TFS(&tfs_set_notset), KEY_INFO_ERROR_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_request, {
        "Request", "eapol.keydes.key_info.request",
        FT_BOOLEAN, 16, TFS(&tfs_set_notset), KEY_INFO_REQUEST_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_keyinfo_encrypted_key_data, {
        "Encrypted Key Data", "eapol.keydes.key_info.encrypted_key_data",
        FT_BOOLEAN, 16, TFS(&tfs_set_notset), KEY_INFO_ENCRYPTED_KEY_DATA_MASK,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_nonce, {
        "WPA Key Nonce", "eapol.keydes.nonce",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_rsc, {
        "WPA Key RSC", "eapol.keydes.rsc",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_id, {
        "WPA Key ID", "eapol.keydes.id",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_mic, {
        "WPA Key MIC", "eapol.keydes.mic",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_data_len, {
        "WPA Key Data Length", "eapol.keydes.data_len",
        FT_UINT16, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},

    { &hf_eapol_wpa_keydes_data, {
        "WPA Key Data", "eapol.keydes.data",
        FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
  };

  static gint *ett[] = {
    &ett_eapol,
    &ett_eapol_keydes_data,
    &ett_keyinfo,
    &ett_eapol_key_index
  };

  proto_eapol = proto_register_protocol("802.1X Authentication", "EAPOL", "eapol");
  eapol_handle = register_dissector("eapol", dissect_eapol, proto_eapol);

  proto_register_field_array(proto_eapol, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
}
Ejemplo n.º 17
0
void
proto_register_nflog(void)
{
	static hf_register_info hf[] = {
	/* Header */
		{ &hf_nflog_family,
			{ "Family", "nflog.family", FT_UINT8, BASE_DEC, VALS(_linux_family_vals), 0x00, NULL, HFILL }
		},
		{ &hf_nflog_version,
			{ "Version", "nflog.version", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
		},
		{ &hf_nflog_resid,
			{ "Resource id", "nflog.res_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
		},

		{ &hf_nflog_encoding,
			{ "Encoding", "nflog.encoding", FT_UINT32, BASE_HEX, VALS(_encoding_vals), 0x00, NULL, HFILL }
		},

	/* TLV */
		{ &hf_nflog_tlv,
			{ "TLV", "nflog.tlv", FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
		},
		{ &hf_nflog_tlv_length,
			{ "Length", "nflog.tlv_length", FT_UINT16, BASE_DEC, NULL, 0x00, "TLV Length", HFILL }
		},
		{ &hf_nflog_tlv_type,
			{ "Type", "nflog.tlv_type", FT_UINT16, BASE_DEC, VALS(nflog_tlv_vals), 0x7fff, "TLV Type", HFILL }
		},
	/* TLV values */
		{ &hf_nflog_tlv_prefix,
			{ "Prefix", "nflog.prefix", FT_STRINGZ, BASE_NONE, NULL, 0x00, "TLV Prefix Value", HFILL }
		},
		{ &hf_nflog_tlv_uid,
			{ "UID", "nflog.uid", FT_INT32, BASE_DEC, NULL, 0x00, "TLV UID Value", HFILL }
		},
		{ &hf_nflog_tlv_gid,
			{ "GID", "nflog.gid", FT_INT32, BASE_DEC, NULL, 0x00, "TLV GID Value", HFILL }
		},
		{ &hf_nflog_tlv_timestamp,
			{ "Timestamp", "nflog.timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, "TLV Timestamp Value", HFILL }
		},
		{ &hf_nflog_tlv_unknown,
			{ "Value", "nflog.tlv_value", FT_BYTES, BASE_NONE, NULL, 0x00, "TLV Value", HFILL }
		},
	};

	static gint *ett[] = {
		&ett_nflog,
		&ett_nflog_tlv
	};

	module_t *pref;

	proto_nflog = proto_register_protocol("Linux Netfilter NFLOG", "NFLOG", "nflog");

	pref = prefs_register_protocol(proto_nflog, NULL);
	prefs_register_enum_preference(pref, "byte_order_type", "Byte Order", "Byte Order",
				       &nflog_byte_order, byte_order_types, FALSE);

	register_dissector("nflog", dissect_nflog, proto_nflog);

	proto_register_field_array(proto_nflog, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

}
Ejemplo n.º 18
0
void
proto_register_bacnet(void)
{
	static hf_register_info hf[] = {
		{ &hf_bacnet_version,
			{ "Version",           "bacnet.version",
			FT_UINT8, BASE_DEC, NULL, 0,
			"BACnet Version", HFILL }
		},
		{ &hf_bacnet_control,
			{ "Control",           "bacnet.control",
			FT_UINT8, BASE_HEX, NULL, 0,
			"BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_net,
			{ "NSDU contains",
			"bacnet.control_net",
			FT_BOOLEAN, 8, TFS(&control_net_set_high),
			BAC_CONTROL_NET, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_res1,
			{ "Reserved",
			"bacnet.control_res1",
			FT_BOOLEAN, 8, TFS(&control_res_high),
			BAC_CONTROL_RES1, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_dest,
			{ "Destination Specifier",
			"bacnet.control_dest",
			FT_BOOLEAN, 8, TFS(&control_dest_high),
			BAC_CONTROL_DEST, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_res2,
			{ "Reserved",
			"bacnet.control_res2",
			FT_BOOLEAN, 8, TFS(&control_res_high),
			BAC_CONTROL_RES2, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_src,
			{ "Source specifier",
			"bacnet.control_src",
			FT_BOOLEAN, 8, TFS(&control_src_high),
			BAC_CONTROL_SRC, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_expect,
			{ "Expecting Reply",
			"bacnet.control_expect",
			FT_BOOLEAN, 8, TFS(&control_expect_high),
			BAC_CONTROL_EXPECT, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_prio_high,
			{ "Priority",
			"bacnet.control_prio_high",
			FT_BOOLEAN, 8, TFS(&control_prio_high_high),
			BAC_CONTROL_PRIO_HIGH, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_control_prio_low,
			{ "Priority",
			"bacnet.control_prio_low",
			FT_BOOLEAN, 8, TFS(&control_prio_low_high),
			BAC_CONTROL_PRIO_LOW, "BACnet Control", HFILL }
		},
		{ &hf_bacnet_dnet,
			{ "Destination Network Address", "bacnet.dnet",
			FT_UINT16, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_dlen,
			{ "Destination MAC Layer Address Length", "bacnet.dlen",
			FT_UINT8, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_dadr_eth,
			{ "Destination ISO 8802-3 MAC Address", "bacnet.dadr_eth",
			FT_ETHER, BASE_NONE, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_dadr_mstp,
			{ "DADR", "bacnet.dadr_mstp",
			FT_UINT8, BASE_DEC, NULL, 0,
			"Destination MS/TP or ARCNET MAC Address", HFILL }
		},
		{ &hf_bacnet_dadr_tmp,
			{ "Unknown Destination MAC", "bacnet.dadr_tmp",
			FT_BYTES, BASE_NONE, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_snet,
			{ "Source Network Address", "bacnet.snet",
			FT_UINT16, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_slen,
			{ "Source MAC Layer Address Length", "bacnet.slen",
			FT_UINT8, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_sadr_eth,
			{ "SADR", "bacnet.sadr_eth",
			FT_ETHER, BASE_NONE, NULL, 0,
			"Source ISO 8802-3 MAC Address", HFILL }
		},
		{ &hf_bacnet_sadr_mstp,
			{ "SADR", "bacnet.sadr_mstp",
			FT_UINT8, BASE_DEC, NULL, 0,
			"Source MS/TP or ARCNET MAC Address", HFILL }
		},
		{ &hf_bacnet_sadr_tmp,
			{ "Unknown Source MAC", "bacnet.sadr_tmp",
			FT_BYTES, BASE_NONE, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_hopc,
			{ "Hop Count", "bacnet.hopc",
			FT_UINT8, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_mesgtyp,
			{ "Network Layer Message Type", "bacnet.mesgtyp",
			FT_UINT8, BASE_HEX, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_vendor,
			{ "Vendor ID", "bacnet.vendor",
			FT_UINT16, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_perf,
			{ "Performance Index", "bacnet.perf",
			FT_UINT8, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_rejectreason,
			{ "Reject Reason", "bacnet.rejectreason",
			FT_UINT8, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_rportnum,
			{ "Number of Port Mappings", "bacnet.rportnum",
			FT_UINT8, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_pinfolen,
			{ "Port Info Length", "bacnet.pinfolen",
			FT_UINT8, BASE_DEC, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_portid,
			{ "Port ID", "bacnet.portid",
			FT_UINT8, BASE_HEX, NULL, 0,
			NULL, HFILL }
		},
		{ &hf_bacnet_term_time_value,
			{ "Termination Time Value (seconds)", "bacnet.term_time_value",
			FT_UINT8, BASE_DEC, NULL, 0,
			"Termination Time Value", HFILL }
		}
	};

	static gint *ett[] = {
		&ett_bacnet,
		&ett_bacnet_control,
	};

	proto_bacnet = proto_register_protocol("Building Automation and Control Network NPDU",
	    "BACnet", "bacnet");

	proto_register_field_array(proto_bacnet, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	register_dissector("bacnet", dissect_bacnet, proto_bacnet);

	bacnet_dissector_table = register_dissector_table("bacnet.vendor",
							  "BACnet Vendor Identifier",
							  FT_UINT8, BASE_HEX);
}
Ejemplo n.º 19
0
void
proto_register_ax25_kiss(void)
{
	/* Setup list of header fields */
	static hf_register_info hf[] = {
		{ &hf_ax25_kiss_cmd,
			{ "Cmd",			"ax25_kiss.cmd",
			FT_UINT8, BASE_DEC, VALS(kiss_frame_types), KISS_CMD_MASK,
			NULL, HFILL }
		},
		{ &hf_ax25_kiss_port,
			{ "Port",			"ax25_kiss.port",
			FT_UINT8, BASE_DEC, NULL, KISS_PORT_MASK,
			NULL, HFILL }
		},
		{ &hf_ax25_kiss_txdelay,
			{ "Tx delay",			"ax25_kiss.txdelay",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_ax25_kiss_persistence,
			{ "Persistence",		"ax25_kiss.persistence",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_ax25_kiss_slottime,
			{ "Slot time",			"ax25_kiss.slottime",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_ax25_kiss_txtail,
			{ "Tx tail",			"ax25_kiss.txtail",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_ax25_kiss_fullduplex,
			{ "Full duplex",		"ax25_kiss.fullduplex",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_ax25_kiss_sethardware,
			{ "Set hardware",		"ax25_kiss.sethardware",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
	};

	/* Setup protocol subtree array */
	static gint *ett[] = {
		&ett_ax25_kiss,
	};

	/* Register the protocol name and description */
	proto_ax25_kiss = proto_register_protocol( "AX.25 KISS", "AX.25 KISS", "ax25_kiss" );

	/* Register the dissector */
	register_dissector( "ax25_kiss", dissect_ax25_kiss, proto_ax25_kiss );

	/* Required function calls to register the header fields and subtrees used */
	proto_register_field_array( proto_ax25_kiss, hf, array_length( hf ) );
	proto_register_subtree_array( ett, array_length( ett ) );
}
Ejemplo n.º 20
0
void
proto_register_pktap(void)
{
	static hf_register_info hf[] = {
	  { &hf_pktap_hdrlen,
	    { "Header length", "pktap.hdrlen",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_rectype,
	    { "Record type", "pktap.rectype",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_dlt,
	    { "DLT", "pktap.dlt",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_ifname,	/* fixed length *and* null-terminated */
	    { "Interface name", "pktap.ifname",
	      FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_flags,
	    { "Flags", "pktap.flags",
	      FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_pfamily,
	    { "Protocol family", "pktap.pfamily",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_llhdrlen,
	    { "Link-layer header length", "pktap.llhdrlen",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_lltrlrlen,
	    { "Link-layer trailer length", "pktap.lltrlrlen",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_pid,
	    { "Process ID", "pktap.pid",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_cmdname,	/* fixed length *and* null-terminated */
	    { "Command name", "pktap.cmdname",
	      FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_svc_class,
	    { "Service class", "pktap.svc_class",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_iftype,
	    { "Interface type", "pktap.iftype",
	      FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_ifunit,
	    { "Interface unit", "pktap.ifunit",
	      FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_epid,
	    { "Effective process ID", "pktap.epid",
	      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
	  { &hf_pktap_ecmdname,	/* fixed length *and* null-terminated */
	    { "Effective command name", "pktap.ecmdname",
	      FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL } },
	};

	static gint *ett[] = {
		&ett_pktap,
	};

	static ei_register_info ei[] = {
	    { &ei_pktap_hdrlen_too_short,
	      { "pktap.hdrlen_too_short", PI_MALFORMED, PI_ERROR,
	        "Header length is too short", EXPFILL }},
	};

	expert_module_t* expert_pktap;

	proto_pktap = proto_register_protocol("PKTAP packet header", "PKTAP",
	    "pktap");
	proto_register_field_array(proto_pktap, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_pktap = expert_register_protocol(proto_pktap);
	expert_register_field_array(expert_pktap, ei, array_length(ei));

	pktap_handle = register_dissector("pktap", dissect_pktap, proto_pktap);
}
Ejemplo n.º 21
0
void
proto_register_wai(void)
{
    static hf_register_info hf[] = {
        { &hf_wai_version, { "Version", "wai.version", FT_UINT16, BASE_DEC, NULL,
            0x0, "Version of authentication infrastructure", HFILL }},

        { &hf_wai_type, { "Type", "wai.type", FT_UINT8, BASE_HEX, VALS(wai_type_names),
            0x0, "Protocol type", HFILL }},

        { &hf_wai_subtype, { "Subtype", "wai.subtype", FT_UINT8, BASE_DEC, VALS(wai_subtype_names),
            0x0, NULL, HFILL }},

        { &hf_wai_reserved, { "Reserved", "wai.reserved", FT_UINT16, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_length, { "Length", "wai.length", FT_UINT16, BASE_DEC, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_seq, { "Sequence number", "wai.seq", FT_UINT16, BASE_DEC, NULL,
            0x0, "Packet sequence number", HFILL }},

        { &hf_wai_fragm_seq, { "Fragment sequence number", "wai.fragm.seq", FT_UINT8, BASE_DEC, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_flag, { "Flag", "wai.flag", FT_UINT8, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_data, { "Data", "wai.data", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_bk_rekeying_flag, {"BK rekeying", "wai.bk.rekeying.flag", FT_BOOLEAN, 8, TFS (&wai_bk_rekeying_flag),
            FLAG_BIT0, "BK rekeying flag", HFILL }},

        { &hf_wai_preauthentication_flag,{"Pre-Authentication", "wai.preauthentication.flag", FT_BOOLEAN, 8, TFS (&wai_preauthentication_flag),
            FLAG_BIT1, "Pre-Authentication flag", HFILL }},

        { &hf_wai_certificate_flag,{"Certificate", "wai.certificate.flag", FT_BOOLEAN, 8, TFS (&wai_certificate_flag),
            FLAG_BIT2, "Certificate flag", HFILL }},

        { &hf_wai_optional_flag,{"Optional", "wai.optional.flag", FT_BOOLEAN, 8, TFS (&wai_optional_flag),
            FLAG_BIT3, "Optional flag", HFILL }},

        { &hf_wai_usk_rekeying_flag,{"USK rekeying", "wai.usk.rekeying.flag", FT_BOOLEAN, 8, TFS (&wai_usk_rekeying_flag),
            FLAG_BIT4, "USK rekeying flag", HFILL }},

        { &hf_wai_negotiation_flag,{"STA negotiation", "wai.negotiation.flag", FT_BOOLEAN, 8, TFS (&wai_negotiation_flag),
            FLAG_BIT5, "STA negotiation flag", HFILL }},

        { &hf_wai_revoking_flag,{"STA revoking", "wai.revoking.flag", FT_BOOLEAN, 8, TFS (&wai_revoking_flag),
            FLAG_BIT6, "STA revoking flag", HFILL }},

        { &hf_wai_reserved_flag,{"Reserved", "wai.reserved.flag", FT_BOOLEAN, 8, TFS (&wai_reserved_flag),
            FLAG_BIT7, "Reserved flag", HFILL }},

        { &hf_wai_cert, {"Certificate", "wai.cert", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_cert_id, {"Id", "wai.cert.id", FT_UINT16, BASE_HEX, NULL,
            0x0, "Certificate Id", HFILL }},

        { &hf_wai_cert_data, {"Data", "wai.cert.data", FT_BYTES, BASE_NONE, NULL,
            0x0, "Certificate data", HFILL }},

        { &hf_wai_cert_len, {"Length", "wai.cert.len", FT_UINT16, BASE_DEC, NULL,
            0x0, "Certificate length", HFILL }},

        { &hf_wai_addid, {"ADDID", "wai.addid", FT_STRING, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_ae_mac, {"AE MAC", "wai.ae.mac", FT_ETHER, BASE_NONE, NULL,
            0x0, "AE MAC address", HFILL }},

        { &hf_wai_asue_mac, {"ASUE MAC", "wai.asue.mac", FT_ETHER, BASE_NONE, NULL,
            0x0, "ASUE MAC address", HFILL }},

        { &hf_wai_bkid, {"BKID", "wai.bkid", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_uskid, {"USKID", "wai.uskid", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_wie, {"WIE from ASUE", "wai.wie", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_message_auth_code, {"Message Authentication Code", "wai.message.auth.code", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_mskid, {"MSKID/STAKeyID", "wai.mskid", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_data_pack_num, {"Data packet number", "wai.data.packet.num", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_key_data, {"Key Data", "wai.key.data", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_key_data_len, {"Length", "wai.key.data.len", FT_UINT8, BASE_DEC, NULL,
            0x0, "Key data length", HFILL }},

        { &hf_wai_key_data_content, {"Content", "wai.key.data.content", FT_BYTES, BASE_NONE, NULL,
            0x0, "Key data content", HFILL }},

        { &hf_wai_key_ann_id, {"Key Announcement Identifier", "wai.key.ann.id", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_auth_id, {"Authentication Identifier", "wai.auth.id", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_identity, {"Identifier", "wai.identity", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_identity_id, {"Id", "wai.identity.id", FT_UINT16, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_identity_len, {"Length", "wai.identity.len", FT_UINT16, BASE_DEC, NULL,
            0x0, "Identity length", HFILL }},

        { &hf_wai_identity_data, {"Data", "wai.identity.data", FT_BYTES, BASE_NONE, NULL,
            0x0, "Identity data", HFILL }},

        { &hf_wai_ecdh, {"ECDH Parameter", "wai.ecdhp", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_ecdh_id, {"ID", "wai.edch.id", FT_UINT8, BASE_HEX, NULL,
            0x0, "ECDH Parameter Identifier", HFILL }},

        { &hf_wai_ecdh_len, {"Length", "wai.ecdh.len", FT_UINT16, BASE_DEC, NULL,
            0x0, "ECDH Parameter Length", HFILL }},

        { &hf_wai_ecdh_content, {"Content", "wai.ecdh.content", FT_BYTES, BASE_NONE, NULL,
            0x0, "ECDH Parameter Content", HFILL }},

        { &hf_wai_counter, {"Replay counter", "wai.counter", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_sta_key_id, {"STAKeyID", "wai.sta.key.id", FT_UINT8, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_challenge, {"Challenge", "wai.challenge", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_cert_ver, {"Multiple Certificate Verification Result", "wai.cert.ver", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_nonce, {"Nonce", "wai.nonce", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_ver_res, {"Verification result", "wai.ver.res", FT_UINT8, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_sign_alg, {"Signature Algorithm", "wai.sign.alg", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_hash_alg_id, {"Hash Algorithm Identifier", "wai.hash.alg.id", FT_UINT8, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_sign_alg_id, {"Signature Algorithm Identifier", "wai.sign.alg.id", FT_UINT8, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_param, {"Parameter", "wai.param", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_param_id, {"Parameter Identifier", "wai.param.id", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_param_content, {"Parameter Content", "wai.param.content", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_sign_val, {"Signature Value", "wai.sign.val", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_sign_content, {"Signature Content", "wai.sign.content", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_sign, {"Signature", "wai.sign", FT_BYTES, BASE_NONE, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_identity_list, {"ASU List trusted by ASUE", "wai.identity_list", FT_BYTES, BASE_NONE, NULL,
            0x0, "Identity list", HFILL }},

        { &hf_wai_reserved_byte, {"Reserved", "wai.reserved.byte", FT_UINT8, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_no_of_ids, {"Number of Identities", "wai.no.of.ids", FT_UINT16, BASE_DEC, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_access_res, {"Access result", "wai.access_result", FT_UINT8, BASE_HEX, NULL,
            0x0, NULL, HFILL }},

        { &hf_wai_fragments,{"Message fragments", "wai.fragments",FT_NONE, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_fragment,{"Message fragment", "wai.fragment",FT_FRAMENUM, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_fragment_overlap,{"Message fragment overlap", "wai.fragment.overlap",FT_BOOLEAN, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_fragment_overlap_conflicts,{"Message fragment overlapping with conflicting data","wai.fragment.overlap.conflicts",FT_BOOLEAN, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_fragment_multiple_tails,{"Message has multiple tail fragments","wai.fragment.multiple_tails",FT_BOOLEAN, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_fragment_too_long_fragment,{"Message fragment too long", "wai.fragment.too_long_fragment",FT_BOOLEAN, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_fragment_error,{"Message defragmentation error", "wai.fragment.error",FT_FRAMENUM, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_fragment_count,{"Message fragment count", "wai.fragment.count",FT_UINT32, BASE_DEC, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_reassembled_in,{"Reassembled in", "wai.reassembled.in",FT_FRAMENUM, BASE_NONE, NULL,
            0x00, NULL, HFILL }},

        { &hf_wai_reassembled_length,{"Reassembled length", "wai.reassembled.length",FT_UINT32, BASE_DEC, NULL,
            0x00, NULL, HFILL }}
    };

    static gint *ett[] = {
        &ett_wai,
        &ett_wai_data,
        &ett_wai_flags,
        &ett_wai_certificate,
        &ett_wai_mac,
        &ett_wai_identity,
        &ett_wai_key_data,
        &ett_wai_ecdh_param,
        &ett_wai_certificate_verification,
        &ett_wai_identity_list,
        &ett_wai_sign,
        &ett_wai_sign_alg,
        &ett_wai_sign_val,
        &ett_wai_parameter,
        &ett_wai_fragment,
        &ett_wai_fragments
    };

    proto_wai = proto_register_protocol("WAI Protocol", "WAI", "wai");
    register_init_routine(&wai_reassemble_init);
    proto_register_field_array(proto_wai, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    register_dissector("wai", dissect_wai, proto_wai);
}
Ejemplo n.º 22
0
void
proto_register_frame(void)
{
	static hf_register_info hf[] = {
		{ &hf_frame_arrival_time,
		{ "Arrival Time",		"frame.time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
			"Absolute time when this frame was captured", HFILL }},

		{ &hf_frame_arrival_time_epoch,
		{ "Epoch Time",			"frame.time_epoch", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
			"Epoch time when this frame was captured", HFILL }},

		{ &hf_frame_time_invalid,
		{ "Arrival Timestamp invalid",		"frame.time_invalid", FT_NONE, BASE_NONE, NULL, 0x0,
			"The timestamp from the capture is out of the valid range", HFILL }},

		{ &hf_frame_time_delta,
		{ "Time delta from previous captured frame",	"frame.time_delta", FT_RELATIVE_TIME, BASE_NONE, NULL,
			0x0,
			NULL, HFILL }},

		{ &hf_frame_time_delta_displayed,
		{ "Time delta from previous displayed frame",	"frame.time_delta_displayed", FT_RELATIVE_TIME, BASE_NONE, NULL,
			0x0,
			NULL, HFILL }},

		{ &hf_frame_time_relative,
		{ "Time since reference or first frame",	"frame.time_relative", FT_RELATIVE_TIME, BASE_NONE, NULL,
			0x0,
			"Time relative to time reference or first frame", HFILL }},

		{ &hf_frame_time_reference,
		{ "This is a Time Reference frame",	"frame.ref_time", FT_NONE, BASE_NONE, NULL, 0x0,
			"This frame is a Time Reference frame", HFILL }},

		{ &hf_frame_number,
		{ "Frame Number",		"frame.number", FT_UINT32, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_frame_len,
		{ "Frame length on the wire",		"frame.len", FT_UINT32, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_frame_capture_len,
		{ "Frame length stored into the capture file",	"frame.cap_len", FT_UINT32, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_frame_md5_hash,
		{ "Frame MD5 Hash",	"frame.md5_hash", FT_STRING, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_frame_p2p_dir,
		{ "Point-to-Point Direction",	"frame.p2p_dir", FT_INT8, BASE_DEC, VALS(p2p_dirs), 0x0,
			NULL, HFILL }},

		{ &hf_link_number,
		{ "Link Number",		"frame.link_nr", FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_frame_file_off,
		{ "File Offset",	"frame.file_off", FT_INT64, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_frame_marked,
		{ "Frame is marked",	"frame.marked", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
			"Frame is marked in the GUI", HFILL }},

		{ &hf_frame_ignored,
		{ "Frame is ignored",	"frame.ignored", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
			"Frame is ignored by the dissectors", HFILL }},

		{ &hf_frame_protocols,
		{ "Protocols in frame",	"frame.protocols", FT_STRING, BASE_NONE, NULL, 0x0,
			"Protocols carried by this frame", HFILL }},

		{ &hf_frame_color_filter_name,
		{ "Coloring Rule Name",	"frame.coloring_rule.name", FT_STRING, BASE_NONE, NULL, 0x0,
			"The frame matched the coloring rule with this name", HFILL }},

		{ &hf_frame_color_filter_text,
		{ "Coloring Rule String", "frame.coloring_rule.string", FT_STRING, BASE_NONE, NULL, 0x0,
			"The frame matched this coloring rule string", HFILL }}
	};
	static gint *ett[] = {
		&ett_frame
	};
	module_t *frame_module;

	wtap_encap_dissector_table = register_dissector_table("wtap_encap",
	    "Wiretap encapsulation type", FT_UINT32, BASE_DEC);

	proto_frame = proto_register_protocol("Frame", "Frame", "frame");
	proto_register_field_array(proto_frame, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	register_dissector("frame",dissect_frame,proto_frame);

	/* You can't disable dissection of "Frame", as that would be
	   tantamount to not doing any dissection whatsoever. */
	proto_set_cant_toggle(proto_frame);

	proto_short = proto_register_protocol("Short Frame", "Short frame", "short");
	proto_malformed = proto_register_protocol("Malformed Packet",
	    "Malformed packet", "malformed");
	proto_unreassembled = proto_register_protocol(
	    "Unreassembled Fragmented Packet",
	    "Unreassembled fragmented packet", "unreassembled");

	/* "Short Frame", "Malformed Packet", and "Unreassembled Fragmented
	   Packet" aren't really protocols, they're error indications;
	   disabling them makes no sense. */
	proto_set_cant_toggle(proto_short);
	proto_set_cant_toggle(proto_malformed);
	proto_set_cant_toggle(proto_unreassembled);

	/* Our preferences */
	frame_module = prefs_register_protocol(proto_frame, NULL);
	prefs_register_bool_preference(frame_module, "show_file_off",
	    "Show File Offset", "Show offset of frame in capture file", &show_file_off);
	prefs_register_bool_preference(frame_module, "force_docsis_encap",
	    "Treat all frames as DOCSIS frames", "Treat all frames as DOCSIS Frames", &force_docsis_encap);
	prefs_register_bool_preference(frame_module, "generate_md5_hash",
	    "Generate an MD5 hash of each frame",
	    "Whether or not MD5 hashes should be generated for each frame, useful for finding duplicate frames.",
	    &generate_md5_hash);
	prefs_register_bool_preference(frame_module, "generate_epoch_time",
	    "Generate an epoch time entry for each frame",
	    "Whether or not an Epoch time entry should be generated for each frame.",
	    &generate_epoch_time);
	prefs_register_bool_preference(frame_module, "generate_bits_field",
	    "Show the number of bits in the frame",
	    "Whether or not the number of bits in the frame should be shown.",
	    &generate_bits_field);

	frame_tap=register_tap("frame");
}
Ejemplo n.º 23
0
/* Wireshark Protocol Registration */
void
proto_register_t38(void)
{
	static hf_register_info hf[] =
	{
#include "packet-t38-hfarr.c"
		{   &hf_t38_setup,
		    { "Stream setup", "t38.setup", FT_STRING, BASE_NONE,
		    NULL, 0x0, "Stream setup, method and frame number", HFILL }},
		{   &hf_t38_setup_frame,
            { "Stream frame", "t38.setup-frame", FT_FRAMENUM, BASE_NONE,
            NULL, 0x0, "Frame that set up this stream", HFILL }},
        {   &hf_t38_setup_method,
            { "Stream Method", "t38.setup-method", FT_STRING, BASE_NONE,
            NULL, 0x0, "Method used to set up this stream", HFILL }},
		{&hf_t38_fragments,
			{"Message fragments", "t38.fragments",
			FT_NONE, BASE_NONE, NULL, 0x00,	NULL, HFILL } },
		{&hf_t38_fragment,
			{"Message fragment", "t38.fragment",
			FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
		{&hf_t38_fragment_overlap,
			{"Message fragment overlap", "t38.fragment.overlap",
			FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
		{&hf_t38_fragment_overlap_conflicts,
			{"Message fragment overlapping with conflicting data",
			"t38.fragment.overlap.conflicts",
			FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
		{&hf_t38_fragment_multiple_tails,
			{"Message has multiple tail fragments",
			"t38.fragment.multiple_tails", 
			FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
		{&hf_t38_fragment_too_long_fragment,
			{"Message fragment too long", "t38.fragment.too_long_fragment",
			FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
		{&hf_t38_fragment_error,
			{"Message defragmentation error", "t38.fragment.error",
			FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
		{&hf_t38_reassembled_in,
			{"Reassembled in", "t38.reassembled.in",
			FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
	};

	static gint *ett[] =
	{
		&ett_t38,
#include "packet-t38-ettarr.c"
		&ett_t38_setup,
		&ett_data_fragment,
		&ett_data_fragments
	};

	module_t *t38_module;

	proto_t38 = proto_register_protocol("T.38", "T.38", "t38");
	proto_register_field_array(proto_t38, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	register_dissector("t38", dissect_t38, proto_t38);

	/* Init reassemble tables for HDLC */
	register_init_routine(t38_defragment_init);

	t38_tap = register_tap("t38");

	t38_module = prefs_register_protocol(proto_t38, proto_reg_handoff_t38);
	prefs_register_bool_preference(t38_module, "use_pre_corrigendum_asn1_specification",
	    "Use the Pre-Corrigendum ASN.1 specification",
	    "Whether the T.38 dissector should decode using the Pre-Corrigendum T.38 "
		"ASN.1 specification (1998).",
	    &use_pre_corrigendum_asn1_specification);
	prefs_register_bool_preference(t38_module, "dissect_possible_rtpv2_packets_as_rtp",
	    "Dissect possible RTP version 2 packets with RTP dissector",
	    "Whether a UDP packet that looks like RTP version 2 packet will "
		"be dissected as RTP packet or T.38 packet. If enabled there is a risk that T.38 UDPTL "
		"packets with sequence number higher than 32767 may be dissected as RTP.",
	    &dissect_possible_rtpv2_packets_as_rtp);
	prefs_register_uint_preference(t38_module, "tcp.port",
		"T.38 TCP Port",
		"Set the TCP port for T.38 messages",
		10, &global_t38_tcp_port);
	prefs_register_uint_preference(t38_module, "udp.port",
		"T.38 UDP Port",
		"Set the UDP port for T.38 messages",
		10, &global_t38_udp_port);	
	prefs_register_bool_preference(t38_module, "reassembly",
		"Reassemble T.38 PDUs over TPKT over TCP",
		"Whether the dissector should reassemble T.38 PDUs spanning multiple TCP segments "
		"when TPKT is used over TCP. "
		"To use this option, you must also enable \"Allow subdissectors to reassemble "
		"TCP streams\" in the TCP protocol settings.",
		&t38_tpkt_reassembly);
	prefs_register_enum_preference(t38_module, "tpkt_usage",
		"TPKT used over TCP",
		"Whether T.38 is used with TPKT for TCP",
		(gint *)&t38_tpkt_usage,t38_tpkt_options,FALSE);

	prefs_register_bool_preference(t38_module, "show_setup_info",
                "Show stream setup information",
                "Where available, show which protocol and frame caused "
                "this T.38 stream to be created",
                &global_t38_show_setup_info);

}
Ejemplo n.º 24
0
void
proto_register_rtsp(void)
{
	static gint *ett[] = {
		&ett_rtspframe,
		&ett_rtsp,
		&ett_rtsp_method,
	};
	static hf_register_info hf[] = {
		{ &hf_rtsp_request,
			{ "Request", "rtsp.request", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_response,
			{ "Response", "rtsp.response", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_method,
			{ "Method", "rtsp.method", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_content_type,
			{ "Content-type", "rtsp.content-type", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_content_length,
			{ "Content-length", "rtsp.content-length", FT_UINT32, BASE_DEC, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_url,
			{ "URL", "rtsp.url", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_status,
			{ "Status", "rtsp.status", FT_UINT32, BASE_DEC, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_session,
			{ "Session", "rtsp.session", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_transport,
			{ "Transport", "rtsp.transport", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_rdtfeaturelevel,
			{ "RDTFeatureLevel", "rtsp.rdt-feature-level", FT_UINT32, BASE_DEC, NULL, 0,
			NULL, HFILL }},
		{ &hf_rtsp_X_Vig_Msisdn,
			{ "X-Vig-Msisdn", "X_Vig_Msisdn", FT_STRING, BASE_NONE, NULL, 0,
			NULL, HFILL }},


	};
	module_t *rtsp_module;

	proto_rtsp = proto_register_protocol("Real Time Streaming Protocol",
		"RTSP", "rtsp");

	proto_register_field_array(proto_rtsp, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	/* Make this dissector findable by name */
	register_dissector("rtsp", dissect_rtsp, proto_rtsp);

	/* Register our configuration options, particularly our ports */

	rtsp_module = prefs_register_protocol(proto_rtsp, proto_reg_handoff_rtsp);
	prefs_register_uint_preference(rtsp_module, "tcp.port",
		"RTSP TCP Port",
		"Set the TCP port for RTSP messages",
		10, &global_rtsp_tcp_port);
	prefs_register_uint_preference(rtsp_module, "tcp.alternate_port",
		"Alternate RTSP TCP Port",
		"Set the alternate TCP port for RTSP messages",
		10, &global_rtsp_tcp_alternate_port);
	prefs_register_bool_preference(rtsp_module, "desegment_headers",
	    "Reassemble RTSP headers spanning multiple TCP segments",
	    "Whether the RTSP dissector should reassemble headers "
	    "of a request spanning multiple TCP segments. "
	    " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
	    &rtsp_desegment_headers);
	prefs_register_bool_preference(rtsp_module, "desegment_body",
	    "Trust the \"Content-length:\" header and\ndesegment RTSP "
	    "bodies\nspanning multiple TCP segments",
	    "Whether the RTSP dissector should use the "
	    "\"Content-length:\" value to desegment the body "
	    "of a request spanning multiple TCP segments",
	    &rtsp_desegment_body);

}
Ejemplo n.º 25
0
void proto_register_turbocell(void)
{

    static hf_register_info hf[] = {
        { &hf_turbocell_type,
          { "Packet Type", "turbocell.type",
            FT_UINT8, BASE_HEX, VALS(turbocell_type_values), 0,
            NULL, HFILL }
        },
        { &hf_turbocell_satmode,
          { "Satellite Mode", "turbocell.satmode",
            FT_UINT8, BASE_HEX, VALS(turbocell_satmode_values), 0xF0,
            NULL, HFILL }
        },
        { &hf_turbocell_nwid,
          { "Network ID", "turbocell.nwid",
            FT_UINT8, BASE_DEC, NULL, 0x0F,
            NULL, HFILL }
        },
        { &hf_turbocell_counter,
          { "Counter", "turbocell.counter",
            FT_UINT24, BASE_DEC_HEX, NULL, 0,
            "Increments every frame (per station)", HFILL }
        },
        { &hf_turbocell_dst,
          { "Destination", "turbocell.dst",
            FT_ETHER, BASE_NONE, NULL, 0,
            "Seems to be the destination", HFILL }
        },

        { &hf_turbocell_ip,
          { "IP", "turbocell.ip",
            FT_IPv4, BASE_NONE, NULL, 0,
            "IP address of base station ?", HFILL }
        },

        { &hf_turbocell_unknown,
          { "Unknown", "turbocell.unknown",
            FT_UINT16, BASE_HEX, NULL, 0,
            "Always 0000", HFILL }
        },

        { &hf_turbocell_timestamp,
          { "Timestamp (in 10 ms)", "turbocell.timestamp",
            FT_UINT24, BASE_DEC_HEX, NULL, 0,
            "Timestamp per station (since connection?)", HFILL }
        },
        { &hf_turbocell_name,
          { "Network Name", "turbocell.name",
            FT_STRINGZ, BASE_NONE, NULL, 0,
            NULL, HFILL }
        },
        { &hf_turbocell_station,
            { "Station", "turbocell.station",
            FT_ETHER, BASE_NONE, NULL, 0,
            "connected stations / satellites ?", HFILL },
        }
    };

    static hf_register_info aggregate_fields[] = {
        { &hf_turbocell_aggregate_msdu_header_text,
          {"MAC Service Data Unit (MSDU)", "turbocell_aggregate.msduheader",
           FT_UINT16, BASE_DEC, 0, 0x0000, NULL, HFILL }
        },
        { &hf_turbocell_aggregate_msdu_len,
          {"MSDU length", "turbocell_aggregate.msdulen",
           FT_UINT16, BASE_DEC_HEX, 0, 0x0FFF, NULL, HFILL }
        },
        { &hf_turbocell_aggregate_len,
          { "Total Length", "turbocell_aggregate.len",
            FT_UINT16, BASE_DEC_HEX, NULL, 0,
            "Total reported length", HFILL }
        },
        { &hf_turbocell_aggregate_unknown1,
          { "Unknown", "turbocell_aggregate.unknown1",
            FT_UINT16, BASE_HEX, NULL, 0,
            "Always 0x7856", HFILL }
        },
        { &hf_turbocell_aggregate_unknown2,
          { "Unknown", "turbocell_aggregate.unknown2",
            FT_UINT8, BASE_HEX, NULL, 0xF0,
            "have the values 0x4,0xC or 0x8", HFILL }
        },
    };

    static gint *ett[] = {
        &ett_turbocell,
        &ett_network,
        &ett_msdu_aggregation_parent_tree,
        &ett_msdu_aggregation_subframe_tree
    };

    proto_turbocell = proto_register_protocol("Turbocell Header", "Turbocell", "turbocell");

    proto_aggregate = proto_register_protocol("Turbocell Aggregate Data",
                                              "Turbocell Aggregate Data", "turbocell_aggregate");
    proto_register_field_array(proto_aggregate, aggregate_fields, array_length(aggregate_fields));

    register_dissector("turbocell", dissect_turbocell, proto_turbocell);

    proto_register_field_array(proto_turbocell, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

}
Ejemplo n.º 26
0
/*FUNCTION:------------------------------------------------------
 *  NAME
 *      proto_register_zep
 *  DESCRIPTION
 *      IEEE 802.15.4 protocol registration routine.
 *  PARAMETERS
 *      none
 *  RETURNS
 *      void
 *---------------------------------------------------------------
 */
void proto_register_zep(void)
{
    module_t *zep_module;

    static hf_register_info hf[] = {
        { &hf_zep_version,
        { "Protocol Version",           "zep.version", FT_UINT8, BASE_DEC, NULL, 0x0,
            "The version of the sniffer.", HFILL }},

        { &hf_zep_type,
        { "Type",                       "zep.type", FT_UINT8, BASE_DEC, NULL, 0x0,
            NULL, HFILL }},

        { &hf_zep_channel_id,
        { "Channel ID",                 "zep.channel_id", FT_UINT8, BASE_DEC, NULL, 0x0,
            "The logical channel on which this packet was detected.", HFILL }},

        { &hf_zep_device_id,
        { "Device ID",                  "zep.device_id", FT_UINT16, BASE_DEC, NULL, 0x0,
            "The ID of the device that detected this packet.", HFILL }},

        { &hf_zep_lqi_mode,
        { "LQI/CRC Mode",               "zep.lqi_mode", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "Determines what format the last two bytes of the MAC frame use.", HFILL }},

        { &hf_zep_lqi,
        { "Link Quality Indication",    "zep.lqi", FT_UINT8, BASE_DEC, NULL, 0x0,
            NULL, HFILL }},

        { &hf_zep_timestamp,
        { "Timestamp",                  "zep.time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
            NULL, HFILL }},

        { &hf_zep_seqno,
        { "Sequence Number",            "zep.seqno", FT_UINT8, BASE_DEC, NULL, 0x0,
            NULL, HFILL }},

        { &hf_zep_ieee_length,
        { "Length",              "zep.length", FT_UINT8, BASE_DEC, NULL, 0x0,
            "The length (in bytes) of the encapsulated IEEE 802.15.4 MAC frame.", HFILL }},
    };

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

    /*  Register protocol name and description. */
    proto_zep = proto_register_protocol("ZigBee Encapsulation Protocol", "ZEP", "zep");

    /*  Register header fields and subtrees. */
    proto_register_field_array(proto_zep, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    /*  Register preferences module */
    zep_module = prefs_register_protocol(proto_zep, proto_reg_handoff_zep);

    /*  Register preferences */
    prefs_register_uint_preference(zep_module, "udp.port", "ZEP UDP port",
                 "Set the port for ZEP Protocol\n"
                 "Default port is 17754",
                 10, &gPREF_zep_udp_port);

    /*  Register dissector with Wireshark. */
    zep_handle = register_dissector("zep", dissect_zep, proto_zep);
} /* proto_register_zep */
Ejemplo n.º 27
0
void
proto_register_hpsw(void)
{
    static hf_register_info hf[] = {
        { &hf_hpsw_version,
          { "Version", "hpsw.version", FT_UINT8, BASE_HEX,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_type,
          { "Type", "hpsw.type", FT_UINT8, BASE_HEX,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_tlvtype,
          { "Type", "hpsw.tlv_type", FT_UINT8, BASE_HEX,
            VALS(hpsw_tlv_type_vals), 0x0, NULL, HFILL }},
        { &hf_hpsw_tlvlength,
          { "Length", "hpsw.tlv_len", FT_UINT8, BASE_DEC,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_device_name,
          { "Device Name", "hpsw.device_name", FT_STRING, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_device_version,
          { "Version", "hpsw.device_version", FT_STRING, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_config_name,
          { "Config Name", "hpsw.config_name", FT_STRING, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_root_mac_addr,
          { "Root MAC Addr", "hpsw.root_mac_addr", FT_ETHER, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_ip_addr,
          { "IP Addr", "hpsw.ip_addr", FT_IPv4, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_field_6,
          { "Field 6", "hpsw.field_6", FT_UINT16, BASE_HEX,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_domain,
          { "Domain", "hpsw.domain", FT_STRING, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_field_8,
          { "Field 8", "hpsw.field_8", FT_UINT16, BASE_HEX,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_field_9,
          { "Field 9", "hpsw.field_9", FT_UINT16, BASE_HEX,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_field_10,
          { "Field 10", "hpsw.field_10", FT_UINT32, BASE_HEX,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_neighbor_mac_addr,
          { "MAC Addr", "hpsw.neighbor_mac_addr", FT_ETHER, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_field_12,
          { "Field 12", "hpsw.field_12", FT_UINT8, BASE_HEX,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_own_mac_addr,
          { "Own MAC Addr", "hpsw.own_mac_addr", FT_ETHER, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_device_id,
          { "Device ID", "hpsw.device_id", FT_ETHER, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
        { &hf_hpsw_device_id_data,
          { "Data", "hpsw.device_id_data", FT_BYTES, BASE_NONE,
            NULL, 0x0, NULL, HFILL }},
    };

    static gint *ett[] = {
        &ett_hpsw,
        &ett_hpsw_tlv
    };

    static ei_register_info ei[] = {
        { &ei_hpsw_tlvlength_bad, { "hpsw.tlv_len.bad", PI_PROTOCOL, PI_WARN, "Bad length", EXPFILL }},
    };

    expert_module_t* expert_hpsw;

    proto_hpsw = proto_register_protocol( "HP Switch Protocol", "HPSW", "hpsw");
    proto_register_field_array(proto_hpsw, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    expert_hpsw = expert_register_protocol(proto_hpsw);
    expert_register_field_array(expert_hpsw, ei, array_length(ei));

    register_dissector("hpsw", dissect_hpsw, proto_hpsw);
}
Ejemplo n.º 28
0
void
proto_register_btobex(void)
{
    static hf_register_info hf[] = {
        { &hf_opcode,
          { "Opcode", "btobex.opcode",
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &code_vals_ext, BTOBEX_CODE_VALS_MASK,
            "Request Opcode", HFILL}
        },
        { &hf_response_code,
          { "Response Code", "btobex.resp_code",
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &code_vals_ext, BTOBEX_CODE_VALS_MASK,
            NULL, HFILL}
        },
        { &hf_final_flag,
          { "Final Flag", "btobex.final_flag",
            FT_BOOLEAN, 8, NULL, 0x80,
            NULL, HFILL}
        },
        { &hf_length,
          { "Packet Length", "btobex.pkt_len",
            FT_UINT16, BASE_DEC, NULL, 0,
            NULL, HFILL}
        },
        { &hf_version,
          { "Version", "btobex.version",
            FT_UINT8, BASE_HEX, VALS(version_vals), 0x00,
            "Obex Protocol Version", HFILL}
        },
        { &hf_flags,
          { "Flags", "btobex.flags",
            FT_UINT8, BASE_HEX, NULL, 0x00,
            NULL, HFILL}
        },
        { &hf_constants,
          { "Constants", "btobex.constants",
            FT_UINT8, BASE_HEX, NULL, 0x00,
            NULL, HFILL}
        },
        { &hf_max_pkt_len,
          { "Max. Packet Length", "btobex.max_pkt_len",
            FT_UINT16, BASE_DEC, NULL, 0,
            NULL, HFILL}
        },
        { &hf_set_path_flags_0,
          { "Go back one folder (../) first", "btobex.set_path_flags_0",
            FT_BOOLEAN, 8, NULL, 0x01,
            NULL, HFILL}
        },
        { &hf_set_path_flags_1,
          { "Do not create folder, if not existing", "btobex.set_path_flags_1",
            FT_BOOLEAN, 8, NULL, 0x02,
            NULL, HFILL}
        },
        { &hf_hdr_id,
          { "Header Id", "btobex.hdr_id",
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &header_id_vals_ext, 0x00,
            NULL, HFILL}
        },
        { &hf_hdr_length,
          { "Length", "btobex.pkt_hdr_len",
            FT_UINT16, BASE_DEC, NULL, 0,
            "Header Length", HFILL}
        },
        { &hf_hdr_val_unicode,
          { "Value", "btobex.pkt_hdr_val_uc",
            FT_STRING, BASE_NONE, NULL, 0,
            "Unicode Value", HFILL }
        },
        { &hf_hdr_val_byte_seq,
          { "Value", "btobex.hdr_val_byte_seq",
            FT_BYTES, BASE_NONE, NULL, 0,
            "Byte Value", HFILL}
        },
        { &hf_hdr_val_byte,
          { "Value", "btobex.hdr_val_byte",
            FT_UINT8, BASE_HEX, NULL, 0,
            "Byte Sequence Value", HFILL}
        },
        { &hf_hdr_val_long,
          { "Value", "btobex.hdr_val_long",
            FT_UINT32, BASE_DEC, NULL, 0,
            "4-byte Value", HFILL}
        },

        /* for fragmentation */
        { &hf_btobex_fragment_overlap,
          { "Fragment overlap",   "btobex.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "Fragment overlaps with other fragments", HFILL }
        },
        { &hf_btobex_fragment_overlap_conflict,
          { "Conflicting data in fragment overlap",   "btobex.fragment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "Overlapping fragments contained conflicting data", HFILL }
        },
        { &hf_btobex_fragment_multiple_tails,
          { "Multiple tail fragments found",  "btobex.fragment.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "Several tails were found when defragmenting the packet", HFILL }
        },
        { &hf_btobex_fragment_too_long_fragment,
          { "Fragment too long",  "btobex.fragment.toolongfragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "Fragment contained data past end of packet", HFILL }
        },
        { &hf_btobex_fragment_error,
          { "Defragmentation error", "btobex.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
            "Defragmentation error due to illegal fragments", HFILL }
        },
        { &hf_btobex_fragment_count,
          { "Fragment count", "btobex.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0,
            NULL, HFILL }
        },
        { &hf_btobex_fragment,
          { "OBEX Fragment", "btobex.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
            "btobex Fragment", HFILL }
        },
        { &hf_btobex_fragments,
          { "OBEX Fragments", "btobex.fragments", FT_NONE, BASE_NONE, NULL, 0x0,
            "btobex Fragments", HFILL }
        },
        { &hf_btobex_reassembled_in,
          { "Reassembled OBEX in frame", "btobex.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
            "This OBEX frame is reassembled in this frame", HFILL }
        },
        { &hf_btobex_reassembled_length,
          { "Reassembled OBEX length", "btobex.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0,
            "The total length of the reassembled payload", HFILL }
        }
    };

    /* Setup protocol subtree array */
    static gint *ett[] = {
        &ett_btobex,
        &ett_btobex_hdrs,
        &ett_btobex_hdr,
        &ett_btobex_fragment,
        &ett_btobex_fragments
    };

    proto_btobex = proto_register_protocol("Bluetooth OBEX Protocol", "OBEX", "btobex");

    register_dissector("btobex", dissect_btobex, proto_btobex);

    /* Required function calls to register the header fields and subtrees used */
    proto_register_field_array(proto_btobex, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    register_init_routine(&defragment_init);
}
Ejemplo n.º 29
0
/*--- proto_register_sv -------------------------------------------*/
void proto_register_sv(void) {

	/* List of fields */
	static hf_register_info hf[] = {
		{ &hf_sv_appid,
		{ "APPID",	"sv.appid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},

		{ &hf_sv_length,
		{ "Length",	"sv.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},

		{ &hf_sv_reserve1,
		{ "Reserved 1",	"sv.reserve1", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},

		{ &hf_sv_reserve2,
		{ "Reserved 2",	"sv.reserve2", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},

		{ &hf_sv_phmeas_instmag_i,
		{ "value", "sv.meas_value", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},

		{ &hf_sv_phsmeas_q,
		{ "quality", "sv.meas_quality", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_validity,
		{ "validity", "sv.meas_quality.validity", FT_UINT32, BASE_HEX, VALS(sv_q_validity_vals), Q_VALIDITY_MASK, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_overflow,
		{ "overflow", "sv.meas_quality.overflow", FT_BOOLEAN, 32, NULL, Q_OVERFLOW, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_outofrange,
		{ "out of range", "sv.meas_quality.outofrange", FT_BOOLEAN, 32, NULL, Q_OUTOFRANGE, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_badreference,
		{ "bad reference", "sv.meas_quality.badreference", FT_BOOLEAN, 32, NULL, Q_BADREFERENCE, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_oscillatory,
		{ "oscillatory", "sv.meas_quality.oscillatory", FT_BOOLEAN, 32, NULL, Q_OSCILLATORY, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_failure,
		{ "failure", "sv.meas_quality.failure", FT_BOOLEAN, 32, NULL, Q_FAILURE, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_olddata,
		{ "old data", "sv.meas_quality.olddata", FT_BOOLEAN, 32, NULL, Q_OLDDATA, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_inconsistent,
		{ "inconsistent", "sv.meas_quality.inconsistent", FT_BOOLEAN, 32, NULL, Q_INCONSISTENT, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_inaccurate,
		{ "inaccurate", "sv.meas_quality.inaccurate", FT_BOOLEAN, 32, NULL, Q_INACCURATE, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_source,
		{ "source", "sv.meas_quality.source", FT_UINT32, BASE_HEX, VALS(sv_q_source_vals), Q_SOURCE_MASK, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_test,
		{ "test", "sv.meas_quality.teset", FT_BOOLEAN, 32, NULL, Q_TEST, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_operatorblocked,
		{ "operator blocked", "sv.meas_quality.operatorblocked", FT_BOOLEAN, 32, NULL, Q_OPERATORBLOCKED, NULL, HFILL}},

		{ &hf_sv_phsmeas_q_derived,
		{ "derived", "sv.meas_quality.derived", FT_BOOLEAN, 32, NULL, Q_DERIVED, NULL, HFILL}},


#include "packet-sv-hfarr.c"
	};

	/* List of subtrees */
	static gint *ett[] = {
		&ett_sv,
		&ett_phsmeas,
		&ett_phsmeas_q,
#include "packet-sv-ettarr.c"
	};

	static ei_register_info ei[] = {
		{ &ei_sv_mal_utctime, { "sv.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
		{ &ei_sv_zero_pdu, { "sv.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte SV PDU", EXPFILL }},
	};

	expert_module_t* expert_sv;
	module_t *sv_module;

	/* Register protocol */
	proto_sv = proto_register_protocol(PNAME, PSNAME, PFNAME);
	register_dissector("sv", dissect_sv, proto_sv);

	/* Register fields and subtrees */
	proto_register_field_array(proto_sv, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_sv = expert_register_protocol(proto_sv);
	expert_register_field_array(expert_sv, ei, array_length(ei));
	sv_module = prefs_register_protocol(proto_sv, NULL);
	prefs_register_bool_preference(sv_module, "decode_data_as_phsmeas",
		"Force decoding of seqData as PhsMeas",
		NULL, &sv_decode_data_as_phsmeas);

	/* Register tap */
	sv_tap = register_tap("sv");
}
Ejemplo n.º 30
0
/*--- proto_register_rtse -------------------------------------------*/
void proto_register_rtse(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
    /* Fragment entries */
    { &hf_rtse_fragments,
      { "RTSE fragments", "rtse.fragments", FT_NONE, BASE_NONE,
	NULL, 0x00, "Message fragments", HFILL } },
    { &hf_rtse_fragment,
      { "RTSE fragment", "rtse.fragment", FT_FRAMENUM, BASE_NONE,
	NULL, 0x00, "Message fragment", HFILL } },
    { &hf_rtse_fragment_overlap,
      { "RTSE fragment overlap", "rtse.fragment.overlap", FT_BOOLEAN,
	BASE_NONE, NULL, 0x0, "Message fragment overlap", HFILL } },
    { &hf_rtse_fragment_overlap_conflicts,
      { "RTSE fragment overlapping with conflicting data",
	"rtse.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL,
	0x0, "Message fragment overlapping with conflicting data", HFILL } },
    { &hf_rtse_fragment_multiple_tails,
      { "RTSE has multiple tail fragments",
	"rtse.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE,
	NULL, 0x0, "Message has multiple tail fragments", HFILL } },
    { &hf_rtse_fragment_too_long_fragment,
      { "RTSE fragment too long", "rtse.fragment.too_long_fragment",
	FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Message fragment too long",
	HFILL } },
    { &hf_rtse_fragment_error,
      { "RTSE defragmentation error", "rtse.fragment.error", FT_FRAMENUM,
	BASE_NONE, NULL, 0x00, "Message defragmentation error", HFILL } },
    { &hf_rtse_reassembled_in,
      { "Reassembled RTSE in frame", "rtse.reassembled.in", FT_FRAMENUM, BASE_NONE,
	NULL, 0x00, "This RTSE packet is reassembled in this frame", HFILL } },

#include "packet-rtse-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_rtse,
    &ett_rtse_unknown,
    &ett_rtse_fragment,
    &ett_rtse_fragments,
#include "packet-rtse-ettarr.c"
  };

  module_t *rtse_module;

  /* Register protocol */
  proto_rtse = proto_register_protocol(PNAME, PSNAME, PFNAME);
  register_dissector("rtse", dissect_rtse, proto_rtse);
  /* Register fields and subtrees */
  proto_register_field_array(proto_rtse, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  register_init_routine (&rtse_reassemble_init);
  rtse_module = prefs_register_protocol_subtree("OSI", proto_rtse, NULL);

  prefs_register_bool_preference(rtse_module, "reassemble",
				 "Reassemble segmented RTSE datagrams",
				 "Whether segmented RTSE datagrams should be reassembled."
				 " To use this option, you must also enable"
				 " \"Allow subdissectors to reassemble TCP streams\""
				 " in the TCP protocol settings.", &rtse_reassemble);

  rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE);
  oid_table=g_hash_table_new(g_str_hash, g_str_equal);


}