本文整理汇总了C++中VALS函数的典型用法代码示例。如果您正苦于以下问题:C++ VALS函数的具体用法?C++ VALS怎么用?C++ VALS使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VALS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proto_register_ppcap
void proto_register_ppcap(void)
{
static hf_register_info hf[] = {
{ &hf_ppcap_length,
{ "Length", "ppcap.length",
FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_payload_type,
{ "Payload Type" , "ppcap.payload_type", FT_STRING,
BASE_NONE, NULL, 0x0 , NULL, HFILL}},
{ &hf_ppcap_reserved,
{ "Reserved", "ppcap.reserved", FT_UINT16,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_address_type,
{ "Address Type", "ppcap.address_type", FT_UINT16,
BASE_DEC, VALS(address_type_values), 0x00 , NULL, HFILL}},
#if 0
{ &hf_ppcap_source_address_type,
{ "Source Address Type", "ppcap.source_address_type", FT_UINT16,
BASE_DEC, VALS(address_type_values), 0x00 , NULL, HFILL}},
#endif
{ &hf_ppcap_ssn,
{ "SSN", "ppcap.ssn", FT_UINT16,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_spc,
{"OPC", "ppcap.spc", FT_UINT16,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_opc,
{ "OPC", "ppcap.opc", FT_UINT16,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_source_ip_address1,
{ "Source IP Addresss", "ppcap.source_ip_address1", FT_IPv4,
BASE_NONE, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_source_ip_address2,
{ "Source IP Address", "ppcap.source_ip_address2", FT_IPv6,
BASE_NONE, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_destreserved,
{ "Reserved", "ppcap.destreserved", FT_UINT16,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
#if 0
{ &hf_ppcap_destination_address_type,
{ "Destination Address Type", "ppcap.destination_address_type", FT_UINT16,
BASE_DEC, VALS(address_type_values), 0x00, NULL, HFILL}},
#endif
{ &hf_ppcap_ssn1,
{ "SSN", "ppcap.ssn1", FT_UINT8,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_spc1,
{ "DPC", "ppcap.spc1", FT_UINT24,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_dpc,
{ "DPC", "ppcap.dpc", FT_UINT32,
BASE_DEC, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_destination_ip_address1,
{ "Destination IP Address", "ppcap.destination_ip_address1", FT_IPv4,
BASE_NONE, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_destination_ip_address2,
{ "Destination IP Address", "ppcap.destination_ip_address2", FT_IPv6,
BASE_NONE, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_source_nodeid,
{ "Source Node ID", "ppcap.source_nodeid", FT_STRING,
BASE_NONE, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_destination_nodeid,
{ "Destination Node ID", "ppcap.destination_address_value", FT_STRING,
BASE_NONE, NULL, 0x00, NULL, HFILL}},
{ &hf_ppcap_info,
{ "Info", "ppcap.info", FT_STRING,
BASE_NONE, NULL, 0x0000, NULL, HFILL}},
{ &hf_ppcap_payload_data,
{ "Payload Data", "ppcap.payload_data", FT_BYTES,
BASE_NONE, NULL, 0x0000, NULL, HFILL}},
};
static gint *ett[]= {
&ett_ppcap,
&ett_ppcap1,
&ett_ppcap_new,
};
proto_ppcap = proto_register_protocol("Proprietary PCAP", "PPCAP", "ppcap");
proto_register_field_array(proto_ppcap , hf , array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("ppcap", dissect_ppcap, proto_ppcap);
}
示例2: proto_register_fddi
void
proto_register_fddi(void)
{
static hf_register_info hf[] = {
/*
* XXX - we want this guy to have his own private formatting
* routine, using "fc_to_str()"; if "fc_to_str()" returns
* NULL, just show the hex value, else show the string.
*/
{ &hf_fddi_fc,
{ "Frame Control", "fddi.fc", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_fddi_fc_clf,
{ "Class/Length/Format", "fddi.fc.clf", FT_UINT8, BASE_HEX, VALS(clf_vals), FDDI_FC_CLFF,
NULL, HFILL }},
{ &hf_fddi_fc_prio,
{ "Priority", "fddi.fc.prio", FT_UINT8, BASE_DEC, NULL, FDDI_FC_ASYNC_PRI,
NULL, HFILL }},
{ &hf_fddi_fc_smt_subtype,
{ "SMT Subtype", "fddi.fc.smt_subtype", FT_UINT8, BASE_DEC, VALS(smt_subtype_vals), FDDI_FC_ZZZZ,
NULL, HFILL }},
{ &hf_fddi_fc_mac_subtype,
{ "MAC Subtype", "fddi.fc.mac_subtype", FT_UINT8, BASE_DEC, VALS(mac_subtype_vals), FDDI_FC_ZZZZ,
NULL, HFILL }},
{ &hf_fddi_dst,
{ "Destination", "fddi.dst", FT_ETHER, BASE_NONE, NULL, 0x0,
"Destination Hardware Address", HFILL }},
{ &hf_fddi_src,
{ "Source", "fddi.src", FT_ETHER, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_fddi_addr,
{ "Source or Destination Address", "fddi.addr", FT_ETHER, BASE_NONE, NULL, 0x0,
"Source or Destination Hardware Address", HFILL }},
};
static gint *ett[] = {
&ett_fddi,
&ett_fddi_fc,
};
module_t *fddi_module;
proto_fddi = proto_register_protocol("Fiber Distributed Data Interface",
"FDDI", "fddi");
proto_register_field_array(proto_fddi, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
/*
* Called from various dissectors for encapsulated FDDI frames.
* We assume the MAC addresses in them aren't bitswapped.
*/
register_dissector("fddi", dissect_fddi_not_bitswapped, proto_fddi);
fddi_module = prefs_register_protocol(proto_fddi, NULL);
prefs_register_bool_preference(fddi_module, "padding",
"Add 3-byte padding to all FDDI packets",
"Whether the FDDI dissector should add 3-byte padding to all "
"captured FDDI packets (useful with e.g. Tru64 UNIX tcpdump)",
&fddi_padding);
fddi_tap = register_tap("fddi");
}
示例3: proto_register_nsrp
void
proto_register_nsrp(void)
{
static hf_register_info hf[] = {
{ &hf_nsrp_version,
{ "Version", "nsrp.version",
FT_UINT8, BASE_DEC, NULL, 0,
"NSRP Version", HFILL }
},
{ &hf_nsrp_msg_type,
{ "Type", "nsrp.type",
FT_UINT8, BASE_DEC, nsrp_msg_type_vals, 0,
"NSRP Message Type", HFILL }
},
{ &hf_nsrp_clust_id,
{ "Clust ID", "nsrp.clustid",
FT_UINT8, BASE_DEC, NULL, 0,
"NSRP CLUST ID", HFILL }
},
{ &hf_nsrp_msg_flag,
{ "Flag", "nsrp.flag",
FT_UINT8, BASE_DEC, NULL, 0,
"NSRP FLAG", HFILL }
},
{ &hf_nsrp_len,
{ "Length", "nsrp.length",
FT_UINT16, BASE_DEC, NULL, 0,
"NSRP Length", HFILL }
},
{ &hf_nsrp_ha_port,
{ "Port", "nsrp.haport",
FT_UINT8, BASE_DEC, NULL, 0,
"NSRP HA Port", HFILL }
},
{ &hf_nsrp_not_used,
{ "Not used", "nsrp.notused",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_nsrp_dst_unit,
{ "Destination", "nsrp.dst",
FT_UINT32, BASE_DEC, NULL, 0,
"DESTINATION UNIT INFORMATION", HFILL }
},
{ &hf_nsrp_src_unit,
{ "Source", "nsrp.src",
FT_UINT32, BASE_DEC, NULL, 0,
"SOURCE UNIT INFORMATION", HFILL }
},
{ &hf_nsrp_msgtype,
{ "MsgType", "nsrp.msgtype",
FT_UINT8, BASE_DEC, VALS(nsrp_msgtype_vals), 0,
"Message Type", HFILL }
},
{ &hf_nsrp_wst_group,
{ "Wst group", "nsrp.wst",
FT_UINT8, BASE_DEC, NULL, 0,
"NSRP WST GROUP", HFILL }
},
{ &hf_nsrp_hst_group,
{ "Hst group", "nsrp.hst",
FT_UINT8, BASE_DEC, NULL, 0,
"NSRP HST GROUP", HFILL }
},
{ &hf_nsrp_msgflag,
{ "Msgflag", "nsrp.msgflag",
FT_UINT8, BASE_DEC, VALS(nsrp_flag_vals), 0,
"NSRP MSG FLAG", HFILL }
},
{ &hf_nsrp_msglen,
{ "Msg Length", "nsrp.msglen",
FT_UINT16, BASE_DEC, NULL, 0,
"NSRP MESSAGE LENGTH", HFILL }
},
{ &hf_nsrp_encflag,
{ "Enc Flag", "nsrp.encflag",
FT_UINT8, BASE_DEC, VALS(nsrp_encflag_vals), 0,
"NSRP ENCRYPT FLAG", HFILL }
},
{ &hf_nsrp_notused,
{ "Not Used", "nsrp.notused",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_nsrp_total_size,
{ "Total Size", "nsrp.totalsize",
FT_UINT32, BASE_DEC, NULL, 0,
"NSRP MSG TOTAL MESSAGE", HFILL }
},
{ &hf_nsrp_ns,
{ "Ns", "nsrp.ns",
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_nsrp_nr,
{ "Nr", "nsrp.nr",
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }
//.........这里部分代码省略.........
示例4: VALS
static header_field_info hfi_png_ihdr_bitdepth PNG_HFI_INIT = {
"Bit Depth", "png.ihdr.bitdepth", FT_UINT8, BASE_DEC,
NULL, 0, NULL, HFILL };
static const value_string colour_type_vals[] = {
{ 0, "Greyscale"},
{ 2, "Truecolour"},
{ 3, "Indexed-colour"},
{ 4, "Greyscale with alpha"},
{ 6, "Truecolour with alpha"},
{ 0, NULL }
};
static header_field_info hfi_png_ihdr_colour_type PNG_HFI_INIT = {
"Colour Type", "png.ihdr.colour_type", FT_UINT8, BASE_DEC,
VALS(colour_type_vals), 0, NULL, HFILL };
static const value_string compression_method_vals[] = {
{ 0, "Deflate"},
{ 0, NULL }
};
static header_field_info hfi_png_ihdr_compression_method PNG_HFI_INIT = {
"Compression Method", "png.ihdr.compression_method", FT_UINT8, BASE_DEC,
VALS(compression_method_vals), 0, NULL, HFILL };
static const value_string filter_method_vals[] = {
{ 0, "Adaptive"},
{ 0, NULL }
};
示例5: proto_register_dcc
void
proto_register_dcc(void)
{
static hf_register_info hf[] = {
{ &hf_dcc_len, {
"Packet Length", "dcc.len", FT_UINT16, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_pkt_vers, {
"Packet Version", "dcc.pkt_vers", FT_UINT16, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_op, {
"Operation Type", "dcc.op", FT_UINT8, BASE_DEC,
VALS(dcc_op_vals), 0, NULL, HFILL }},
{ &hf_dcc_clientid, {
"Client ID", "dcc.clientid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_opnums_host, {
"Host", "dcc.opnums.host", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_opnums_pid, {
"Process ID", "dcc.opnums.pid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_opnums_report, {
"Report", "dcc.opnums.report", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_opnums_retrans, {
"Retransmission", "dcc.opnums.retrans", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_signature, {
"Signature", "dcc.signature", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_max_pkt_vers, {
"Maximum Packet Version", "dcc.max_pkt_vers", FT_UINT8, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_qdelay_ms, {
"Client Delay", "dcc.qdelay_ms", FT_UINT16, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_brand, {
"Server Brand", "dcc.brand", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_ck_type, {
"Type", "dcc.checksum.type", FT_UINT8, BASE_DEC,
VALS(dcc_cktype_vals), 0, "Checksum Type", HFILL }},
{ &hf_dcc_ck_len, {
"Length", "dcc.checksum.length", FT_UINT8, BASE_DEC,
NULL, 0, "Checksum Length", HFILL }},
{ &hf_dcc_ck_sum, {
"Sum", "dcc.checksum.sum", FT_BYTES, BASE_NONE,
NULL, 0, "Checksum", HFILL }},
{ &hf_dcc_target, {
"Target", "dcc.target", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_date, {
"Date", "dcc.date", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_adminop, {
"Admin Op", "dcc.adminop", FT_UINT8, BASE_DEC,
VALS(dcc_adminop_vals), 0, NULL, HFILL }},
{ &hf_dcc_adminval, {
"Admin Value", "dcc.adminval", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_trace, {
"Trace Bits", "dcc.trace", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
{ &hf_dcc_trace_admin, {
"Admin Requests", "dcc.trace.admin", FT_BOOLEAN, 32,
NULL, 0x00000001, NULL, HFILL }},
{ &hf_dcc_trace_anon, {
"Anonymous Requests", "dcc.trace.anon", FT_BOOLEAN, 32,
NULL, 0x00000002, NULL, HFILL }},
{ &hf_dcc_trace_client, {
"Authenticated Client Requests", "dcc.trace.client", FT_BOOLEAN, 32,
NULL, 0x00000004, NULL, HFILL }},
{ &hf_dcc_trace_rlim, {
"Rate-Limited Requests", "dcc.trace.rlim", FT_BOOLEAN, 32,
NULL, 0x00000008, NULL, HFILL }},
//.........这里部分代码省略.........
示例6: proto_register_forces
void
proto_register_forces(void)
{
module_t *forces_module;
expert_module_t* expert_forces;
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_forces_version,
{ "Version", "forces.flags.version",
FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
}
},
{ &hf_forces_rsvd,
{ "Rsvd", "forces.flags.rsvd",
FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
}
},
{ &hf_forces_messagetype,
{ "Message Type", "forces.messagetype",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{ &hf_forces_length,
{ "Header Length", "forces.length",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{ &hf_forces_sid,
{ "Source ID", "forces.sid",
FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
{ &hf_forces_did,
{ "Destination ID", "forces.did",
FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
{ &hf_forces_correlator,
{ "Correlator", "forces.correlator",
FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_forces_tlv_type,
{ "Type", "forces.tlv.type",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{ &hf_forces_tlv_length,
{ "Length", "forces.tlv.length",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
/*flags*/
{ &hf_forces_flags,
{ "Flags", "forces.Flags",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{ &hf_forces_flags_ack,
{ "ACK indicator", "forces.flags.ack",
FT_UINT32, BASE_DEC, VALS(main_header_flags_ack_vals), 0xC0000000, NULL, HFILL
}
},
{ &hf_forces_flags_pri,
{ "Priority", "forces.flags.pri",
FT_UINT32, BASE_DEC, NULL, 0x38000000, NULL, HFILL
}
},
{ &hf_forces_flags_rsrvd,
{ "Rsrvd", "forces.Flags",
FT_UINT32, BASE_DEC,NULL, 0x07000000, NULL, HFILL
}
},
{ &hf_forces_flags_em,
{ "Execution mode", "forces.flags.em",
FT_UINT32, BASE_DEC, VALS(main_header_flags_em_vals), 0x00C00000, NULL, HFILL
}
},
{ &hf_forces_flags_at,
{ "Atomic Transaction", "forces.flags.at",
FT_UINT32, BASE_DEC, VALS(main_header_flags_at_vals), 0x00200000, NULL, HFILL
}
},
{ &hf_forces_flags_tp,
{ "Transaction phase", "forces.flags.tp",
FT_UINT32, BASE_DEC, VALS(main_header_flags_tp_vals), 0x00180000, NULL, HFILL
}
},
{ &hf_forces_flags_reserved,
{ "Reserved", "forces.flags.reserved",
FT_UINT32, BASE_DEC,NULL, 0x0007ffff, NULL, HFILL
}
},
/*LFBSelectTLV*/
{ &hf_forces_lfbselect_tlv_type_lfb_classid,
{ "Class ID", "forces.lfbselect.tlv.type.lfb.classid",
FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
//.........这里部分代码省略.........
示例7: VALS
{ 3, "CMT/RPv2" },
{ 4, "MPTCP-Like" },
{ 0, NULL }
};
/* Setup list of random number generator types */
static const value_string rng_type_values[] = {
{ 0, "Constant" },
{ 1, "Uniform" },
{ 2, "Neg. Exponential" },
{ 0, NULL }
};
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_message_type, { "Type", "npmp.message_type", FT_UINT8, BASE_DEC, VALS(message_type_values), 0x0, NULL, HFILL } },
{ &hf_message_flags, { "Flags", "npmp.message_flags", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_message_length, { "Length", "npmp.message_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_acknowledge_flowid, { "Flow ID", "npmp.acknowledge_flowid", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_acknowledge_measurementid, { "Measurement ID", "npmp.acknowledge_measurementid", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_acknowledge_streamid, { "Stream ID", "npmp.acknowledge_streamid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
#if 0
{ &hf_acknowledge_padding, { "Padding", "npmp.acknowledge_padding", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
#endif
{ &hf_acknowledge_status, { "Status", "npmp.acknowledge_status", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_addflow_flowid, { "Flow ID", "npmp.addflow_flowid", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_addflow_measurementid, { "Measurement ID", "npmp.addflow_measurementid", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_addflow_streamid, { "Stream ID", "npmp.addflow_streamid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_addflow_protocol, { "Protocol", "npmp.addflow_protocol", FT_UINT8, BASE_DEC, VALS(proto_type_values), 0x0, NULL, HFILL } },
示例8: proto_register_pgm
/* Register all the bits needed with the filtering engine */
void
proto_register_pgm(void)
{
static hf_register_info hf[] = {
{ &hf_pgm_main_sport,
{ "Source Port", "pgm.hdr.sport", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_main_dport,
{ "Destination Port", "pgm.hdr.dport", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_port,
{ "Port", "pgm.port", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_main_type,
{ "Type", "pgm.hdr.type", FT_UINT8, BASE_HEX,
VALS(type_vals), 0x0, NULL, HFILL }},
{ &hf_pgm_main_opts,
{ "Options", "pgm.hdr.opts", FT_UINT8, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_main_opts_opt,
{ "Options", "pgm.hdr.opts.opt", FT_BOOLEAN, 8,
TFS(&opts_present), PGM_OPT, NULL, HFILL }},
{ &hf_pgm_main_opts_netsig,
{ "Network Significant Options", "pgm.hdr.opts.netsig",
FT_BOOLEAN, 8,
TFS(&opts_present), PGM_OPT_NETSIG, NULL, HFILL }},
{ &hf_pgm_main_opts_varlen,
{ "Variable length Parity Packet Option", "pgm.hdr.opts.varlen",
FT_BOOLEAN, 8,
TFS(&opts_present), PGM_OPT_VAR_PKTLEN, NULL, HFILL }},
{ &hf_pgm_main_opts_parity,
{ "Parity", "pgm.hdr.opts.parity", FT_BOOLEAN, 8,
TFS(&opts_present), PGM_OPT_PARITY, NULL, HFILL }},
{ &hf_pgm_main_cksum,
{ "Checksum", "pgm.hdr.cksum", FT_UINT16, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_main_cksum_bad,
{ "Bad Checksum", "pgm.hdr.cksum_bad", FT_BOOLEAN, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_main_gsi,
{ "Global Source Identifier", "pgm.hdr.gsi", FT_BYTES, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_main_tsdulen,
{ "Transport Service Data Unit Length", "pgm.hdr.tsdulen", FT_UINT16,
BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_spm_sqn,
{ "Sequence number", "pgm.spm.sqn", FT_UINT32, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_spm_trail,
{ "Trailing Edge Sequence Number", "pgm.spm.trail", FT_UINT32, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_spm_lead,
{ "Leading Edge Sequence Number", "pgm.spm.lead", FT_UINT32, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_spm_pathafi,
{ "Path NLA AFI", "pgm.spm.pathafi", FT_UINT16, BASE_DEC,
VALS(afn_vals), 0x0, NULL, HFILL }},
{ &hf_pgm_spm_res,
{ "Reserved", "pgm.spm.res", FT_UINT16, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_spm_path,
{ "Path NLA", "pgm.spm.path", FT_IPv4, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_spm_path6,
{ "Path NLA", "pgm.spm.path", FT_IPv6, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_data_sqn,
{ "Data Packet Sequence Number", "pgm.data.sqn", FT_UINT32, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_data_trail,
{ "Trailing Edge Sequence Number", "pgm.data.trail", FT_UINT32, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_nak_sqn,
{ "Requested Sequence Number", "pgm.nak.sqn", FT_UINT32, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_nak_srcafi,
{ "Source NLA AFI", "pgm.nak.srcafi", FT_UINT16, BASE_DEC,
VALS(afn_vals), 0x0, NULL, HFILL }},
{ &hf_pgm_nak_srcres,
{ "Reserved", "pgm.nak.srcres", FT_UINT16, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_nak_src,
{ "Source NLA", "pgm.nak.src", FT_IPv4, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_nak_src6,
{ "Source NLA", "pgm.nak.src", FT_IPv6, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_nak_grpafi,
{ "Multicast Group AFI", "pgm.nak.grpafi", FT_UINT16, BASE_DEC,
VALS(afn_vals), 0x0, NULL, HFILL }},
{ &hf_pgm_nak_grpres,
{ "Reserved", "pgm.nak.grpres", FT_UINT16, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_nak_grp,
{ "Multicast Group NLA", "pgm.nak.grp", FT_IPv4, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_nak_grp6,
{ "Multicast Group NLA", "pgm.nak.grp", FT_IPv6, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
//.........这里部分代码省略.........
示例9: proto_register_wimax_fch
/* Register Wimax FCH Protocol */
void proto_register_wimax_fch(void)
{
/* TLV display */
static hf_register_info hf[] =
{
{
&hf_fch_used_subchannel_group0,
{
"Sub-Channel Group 0", "wmx.fch.subchannel_group0",
FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_0,
NULL, HFILL
}
},
{
&hf_fch_used_subchannel_group1,
{
"Sub-Channel Group 1", "wmx.fch.subchannel_group1",
FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_1,
NULL, HFILL
}
},
{
&hf_fch_used_subchannel_group2,
{
"Sub-Channel Group 2", "wmx.fch.subchannel_group2",
FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_2,
NULL, HFILL
}
},
{
&hf_fch_used_subchannel_group3,
{
"Sub-Channel Group 3", "wmx.fch.subchannel_group3",
FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_3,
NULL, HFILL
}
},
{
&hf_fch_used_subchannel_group4,
{
"Sub-Channel Group 4", "wmx.fch.subchannel_group4",
FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_4,
NULL, HFILL
}
},
{
&hf_fch_used_subchannel_group5,
{
"Sub-Channel Group 5", "wmx.fch.subchannel_group5",
FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_5,
NULL, HFILL
}
},
{
&hf_fch_reserved_1,
{
"Reserved", "wmx.fch.reserved1",
FT_UINT24, BASE_DEC, NULL, FCH_RESERVED_1,
NULL, HFILL
}
},
{
&hf_fch_repetition_coding_indication,
{
"Repetition Coding Indication", "wmx.fch.repetition_coding_indication",
FT_UINT24, BASE_DEC, VALS(repetition_coding_indications), REPETITION_CODING_INDICATION,
NULL, HFILL
}
},
{
&hf_fch_coding_indication,
{
"Coding Indication", "wmx.fch.coding_indication",
FT_UINT24, BASE_DEC, VALS(coding_indications), CODING_INDICATION,
NULL, HFILL
}
},
{
&hf_fch_dlmap_length,
{
"DL Map Length", "wmx.fch.dl_map_length",
FT_UINT24, BASE_DEC, NULL, DL_MAP_LENGTH,
NULL, HFILL
}
},
{
&hf_fch_reserved_2,
{
"Reserved", "wmx.fch.reserved2",
FT_UINT24, BASE_DEC, NULL, FCH_RESERVED_2,
NULL, HFILL
}
}
};
/* Setup protocol subtree array */
static gint *ett[] =
{
&ett_wimax_fch_decoder,
//.........这里部分代码省略.........
示例10: proto_register_dvb_sdt
void
proto_register_dvb_sdt(void)
{
static hf_register_info hf[] = {
{ &hf_dvb_sdt_transport_stream_id, {
"Transport Stream ID", "dvb_sdt.tsid",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
} },
{ &hf_dvb_sdt_reserved1, {
"Reserved", "dvb_sdt.reserved1",
FT_UINT8, BASE_HEX, NULL, DVB_SDT_RESERVED1_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_version_number, {
"Version Number", "dvb_sdt.version",
FT_UINT8, BASE_HEX, NULL, DVB_SDT_VERSION_NUMBER_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_current_next_indicator, {
"Current/Next Indicator", "dvb_sdt.cur_next_ind",
FT_UINT8, BASE_DEC, VALS(dvb_sdt_cur_next_vals), DVB_SDT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_section_number, {
"Section Number", "dvb_sdt.sect_num",
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
} },
{ &hf_dvb_sdt_last_section_number, {
"Last Section Number", "dvb_sdt.last_sect_num",
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
} },
{ &hf_dvb_sdt_original_network_id, {
"Original Network ID", "dvb_sdt.original_nid",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
} },
{ &hf_dvb_sdt_reserved2, {
"Reserved", "dvb_sdt.reserved2",
FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
} },
{ &hf_dvb_sdt_service_id, {
"Service ID", "dvb_sdt.svc.id",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
} },
{ &hf_dvb_sdt_reserved3, {
"Reserved", "dvb_sdt.svc.reserved",
FT_UINT8, BASE_HEX, NULL, DVB_SDT_RESERVED3_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_eit_schedule_flag, {
"EIT Schedule Flag", "dvb_sdt.svc.eit_schedule_flag",
FT_UINT8, BASE_DEC, NULL, DVB_SDT_EIT_SCHEDULE_FLAG_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_eit_present_following_flag, {
"EIT Present Following Flag", "dvb_sdt.svc.eit_present_following_flag",
FT_UINT8, BASE_DEC, NULL, DVB_SDT_EIT_PRESENT_FOLLOWING_FLAG_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_running_status, {
"Running Status", "dvb_sdt.svc.running_status",
FT_UINT16, BASE_HEX, VALS(dvb_sdt_running_status_vals), DVB_SDT_RUNNING_STATUS_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_free_ca_mode, {
"Free CA Mode", "dvb_sdt.svc.free_ca_mode",
FT_UINT16, BASE_HEX, VALS(dvb_sdt_free_ca_mode_vals), DVB_SDT_FREE_CA_MODE_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_descriptors_loop_length, {
"Descriptors Loop Length", "dvb_sdt.svc.descr_loop_len",
FT_UINT16, BASE_HEX, NULL, DVB_SDT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
} }
};
static gint *ett[] = {
&ett_dvb_sdt,
&ett_dvb_sdt_service
};
proto_dvb_sdt = proto_register_protocol("DVB Service Description Table", "DVB SDT", "dvb_sdt");
proto_register_field_array(proto_dvb_sdt, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
示例11: HFI_INIT
#define STAT_HFI_INIT HFI_INIT(proto_stat)
static const value_string stat1_proc_vals[] = {
{ 0, "NULL" },
{ STATPROC_STAT, "STAT" },
{ STATPROC_MON, "MON" },
{ STATPROC_UNMON, "UNMON" },
{ STATPROC_UNMON_ALL, "UNMON_ALL" },
{ STATPROC_SIMU_CRASH, "SIMU_CRASH" },
{ STATPROC_NOTIFY, "NOTIFY" },
{ 0, NULL }
};
static header_field_info hfi_stat_procedure_v1 STAT_HFI_INIT = {
"V1 Procedure", "stat.procedure_v1", FT_UINT32, BASE_DEC,
VALS(stat1_proc_vals), 0, NULL, HFILL };
static header_field_info hfi_stat_mon_name STAT_HFI_INIT = {
"Name", "stat.name", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL };
static header_field_info hfi_stat_stat_res STAT_HFI_INIT = {
"Status Result", "stat.stat_res", FT_NONE,BASE_NONE,
NULL, 0, NULL, HFILL };
static const value_string stat_res[] =
{
{ 0, "STAT_SUCC" },
{ 1, "STAT_FAIL" },
{ 0, NULL }
};
示例12: proto_register_cmip
/*--- proto_register_cmip ----------------------------------------------*/
void proto_register_cmip(void) {
/* List of fields */
static hf_register_info hf[] = {
{ &hf_cmip_actionType_OID,
{ "actionType", "cmip.actionType_OID",
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_cmip_eventType_OID,
{ "eventType", "cmip.eventType_OID",
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_cmip_attributeId_OID,
{ "attributeId", "cmip.attributeId_OID",
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_cmip_errorId_OID,
{ "errorId", "cmip.errorId_OID",
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_DiscriminatorConstruct,
{ "DiscriminatorConstruct", "cmip.DiscriminatorConstruct",
FT_UINT32, BASE_DEC, NULL, 0,
NULL, HFILL }},
{ &hf_Destination,
{ "Destination", "cmip.Destination",
FT_UINT32, BASE_DEC, NULL, 0,
NULL, HFILL }},
{ &hf_NameBinding,
{ "NameBinding", "cmip.NameBinding",
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_ObjectClass,
{ "ObjectClass", "cmip.ObjectClass",
FT_UINT32, BASE_DEC, VALS(cmip_ObjectClass_vals), 0,
NULL, HFILL }},
#include "packet-cmip-hfarr.c"
};
/* List of subtrees */
static gint *ett[] = {
&ett_cmip,
#include "packet-cmip-ettarr.c"
};
static ei_register_info ei[] = {
{ &ei_wrong_spdu_type, { "cmip.wrong_spdu_type", PI_PROTOCOL, PI_ERROR, "Internal error: wrong spdu type", EXPFILL }},
};
expert_module_t* expert_cmip;
/* Register protocol */
proto_cmip = proto_register_protocol(PNAME, PSNAME, PFNAME);
new_register_dissector("cmip", dissect_cmip, proto_cmip);
/* Register fields and subtrees */
proto_register_field_array(proto_cmip, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_cmip = expert_register_protocol(proto_cmip);
expert_register_field_array(expert_cmip, ei, array_length(ei));
#include "packet-cmip-dis-tab.c"
oid_add_from_string("discriminatorId(1)","2.9.3.2.7.1");
attribute_id_dissector_table = register_dissector_table("cmip.attribute_id", "CMIP Attribute Id", FT_UINT32, BASE_DEC);
}
示例13: VALS
static header_field_info hfi_yami_message_hdr YAMI_HFI_INIT =
{ "Header message", "yami.msg_hdr", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL };
static header_field_info hfi_yami_message_data YAMI_HFI_INIT =
{ "Data message", "yami.msg_data", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL };
/* Parameter */
static header_field_info hfi_yami_param YAMI_HFI_INIT =
{ "Parameter", "yami.param", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL };
static header_field_info hfi_yami_param_name YAMI_HFI_INIT =
{ "Name", "yami.param.name", FT_STRING, BASE_NONE, NULL, 0x00, "Parameter name", HFILL };
static header_field_info hfi_yami_param_type YAMI_HFI_INIT =
{ "Type", "yami.param.type", FT_INT32, BASE_DEC, VALS(yami_param_type_vals), 0x00, "Parameter type", HFILL };
static header_field_info hfi_yami_param_value_bool YAMI_HFI_INIT =
{ "Value", "yami.param.value_bool", FT_BOOLEAN, BASE_NONE, NULL, 0x00, "Parameter value (bool)", HFILL };
static header_field_info hfi_yami_param_value_int YAMI_HFI_INIT =
{ "Value", "yami.param.value_int", FT_INT32, BASE_DEC, NULL, 0x00, "Parameter value (int)", HFILL };
static header_field_info hfi_yami_param_value_long YAMI_HFI_INIT =
{ "Value", "yami.param.value_long", FT_INT64, BASE_DEC, NULL, 0x00, "Parameter value (long)", HFILL };
static header_field_info hfi_yami_param_value_double YAMI_HFI_INIT =
{ "Value", "yami.param.value_double", FT_DOUBLE, BASE_NONE, NULL, 0x00, "Parameter value (double)", HFILL };
static header_field_info hfi_yami_param_value_str YAMI_HFI_INIT =
{ "Value", "yami.param.value_str", FT_STRING, BASE_NONE, NULL, 0x00, "Parameter value (string)", HFILL };
示例14: proto_register_mac_mgmt_msg_rng_rsp
//.........这里部分代码省略.........
{
&hf_rng_rsp_frame_number2,
{
"The 8 least significant bits of the frame number of the OFDMA frame where the SS sent the ranging code", "wmx.rng_rsp.eight_bit_frame_num",
FT_UINT32, BASE_DEC, NULL, 0x000000FF, NULL, HFILL
}
},
{
&hf_rng_rsp_frame_number,
{
"Frame number", "wmx.rng_rsp.frame_number",
FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
}
},
/* Added the following to help implement RNG-RSP message encoding 22 (IEEE 802.16e-2007) */
{
&hf_rng_rsp_ho_id,
{
"HO ID", "wmx.rng_rsp.ho_id",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_rng_rsp_ho_process_optimization,
{
"HO Process Optimization", "wmx.rng_rsp.ho_process_optimization",
FT_UINT16, BASE_HEX, NULL, 0x0000, NULL, HFILL
}
},
{
&hf_rng_rsp_ho_process_optimization_0,
{
"Bit #0", "wmx.rng_rsp.ho_process_optimization.omit_sbc_req",
FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_0), 0x0001, NULL, HFILL
}
},
{
&hf_rng_rsp_ho_process_optimization_1_2,
{
"Bits #1-2", "wmx.rng_rsp.ho_process_optimization.perform_reauthentication",
FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_1_2), 0x0006, NULL, HFILL
}
},
{
&hf_rng_rsp_ho_process_optimization_3,
{
"Bit #3", "wmx.rng_rsp.ho_process_optimization.omit_network_address",
FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_3), 0x0008, NULL, HFILL
}
},
{
&hf_rng_rsp_ho_process_optimization_4,
{
"Bit #4", "wmx.rng_rsp.ho_process_optimization.omit_time_of_day",
FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_4), 0x0010, NULL, HFILL
}
},
{
&hf_rng_rsp_ho_process_optimization_5,
{
"Bit #5", "wmx.rng_rsp.ho_process_optimization.omit_tftp",
FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_5), 0x0020, NULL, HFILL
}
},
{
&hf_rng_rsp_ho_process_optimization_6,
示例15: proto_register_ipx
void
proto_register_ipx(void)
{
static hf_register_info hf_ipx[] = {
{ &hf_ipx_checksum,
{ "Checksum", "ipx.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_src,
{ "Source Address", "ipx.src", FT_STRING, BASE_NONE, NULL, 0x0,
"Source IPX Address \"network.node\"", HFILL }},
{ &hf_ipx_dst,
{ "Destination Address", "ipx.dst", FT_STRING, BASE_NONE, NULL, 0x0,
"Destination IPX Address \"network.node\"", HFILL }},
{ &hf_ipx_addr,
{ "Src/Dst Address", "ipx.addr", FT_STRING, BASE_NONE, NULL, 0x0,
"Source or Destination IPX Address \"network.node\"", HFILL }},
{ &hf_ipx_len,
{ "Length", "ipx.len", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_hops,
{ "Transport Control (Hops)", "ipx.hops", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_packet_type,
{ "Packet Type", "ipx.packet_type", FT_UINT8, BASE_HEX, VALS(ipx_packet_type_vals),
0x0,
NULL, HFILL }},
{ &hf_ipx_dnet,
{ "Destination Network","ipx.dst.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_dnode,
{ "Destination Node", "ipx.dst.node", FT_ETHER, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_dsocket,
{ "Destination Socket", "ipx.dst.socket", FT_UINT16, BASE_HEX|BASE_EXT_STRING,
&ipx_socket_vals_ext, 0x0,
NULL, HFILL }},
{ &hf_ipx_snet,
{ "Source Network","ipx.src.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_snode,
{ "Source Node", "ipx.src.node", FT_ETHER, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_ssocket,
{ "Source Socket", "ipx.src.socket", FT_UINT16, BASE_HEX|BASE_EXT_STRING,
&ipx_socket_vals_ext, 0x0,
NULL, HFILL }},
{ &hf_ipx_net,
{ "Source or Destination Network","ipx.net", FT_IPXNET, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_node,
{ "Source or Destination Node", "ipx.node", FT_ETHER, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipx_socket,
{ "Source or Destination Socket", "ipx.socket", FT_UINT16, BASE_HEX|BASE_EXT_STRING,
&ipx_socket_vals_ext, 0x0,
NULL, HFILL }},
};
static hf_register_info hf_spx[] = {
{ &hf_spx_connection_control,
{ "Connection Control", "spx.ctl",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_spx_connection_control_sys,
{ "System Packet", "spx.ctl.sys",
FT_BOOLEAN, 8, NULL, SPX_SYS_PACKET,
NULL, HFILL }},
{ &hf_spx_connection_control_send_ack,
{ "Send Ack", "spx.ctl.send_ack",
FT_BOOLEAN, 8, NULL, SPX_SEND_ACK,
NULL, HFILL }},
{ &hf_spx_connection_control_attn,
{ "Attention", "spx.ctl.attn",
FT_BOOLEAN, 8, NULL, SPX_ATTN,
NULL, HFILL }},
{ &hf_spx_connection_control_eom,
{ "End of Message", "spx.ctl.eom",
FT_BOOLEAN, 8, NULL, SPX_EOM,
NULL, HFILL }},
{ &hf_spx_datastream_type,
{ "Datastream type", "spx.type",
//.........这里部分代码省略.........