aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rpcap.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-06-18 21:30:42 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-06-18 21:30:42 +0000
commitb228488bc0b9d5e0c63b15814836f7332f35ce04 (patch)
tree62ba2a1b91519fc94d9c3213b328889b969e0c78 /epan/dissectors/packet-rpcap.c
parentdec6ea57aefdcebc4bacd3934606ad0d78da446e (diff)
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
Diffstat (limited to 'epan/dissectors/packet-rpcap.c')
-rw-r--r--epan/dissectors/packet-rpcap.c122
1 files changed, 61 insertions, 61 deletions
diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c
index 9dbcb37888..bd76fc89d5 100644
--- a/epan/dissectors/packet-rpcap.c
+++ b/epan/dissectors/packet-rpcap.c
@@ -1035,24 +1035,24 @@ proto_register_rpcap (void)
/* Common header for all messages */
{ &hf_version,
{ "Version", "rpcap.version", FT_UINT8, BASE_DEC,
- NULL, 0x0, "Version", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_type,
{ "Message type", "rpcap.type", FT_UINT8, BASE_DEC,
- VALS(message_type), 0x0, "Message type", HFILL } },
+ VALS(message_type), 0x0, NULL, HFILL } },
{ &hf_value,
{ "Message value", "rpcap.value", FT_UINT16, BASE_DEC,
- NULL, 0x0, "Message value", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_plen,
{ "Payload length", "rpcap.len", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Payload length", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* Error */
{ &hf_error,
- { "Error", "rpcap.error", FT_STRING, BASE_DEC,
+ { "Error", "rpcap.error", FT_STRING, BASE_NONE,
NULL, 0x0, "Error text", HFILL } },
{ &hf_error_value,
{ "Error value", "rpcap.error_value", FT_UINT16, BASE_DEC,
- VALS(error_codes), 0x0, "Error value", HFILL } },
+ VALS(error_codes), 0x0, NULL, HFILL } },
/* Packet header */
{ &hf_packet,
@@ -1060,84 +1060,84 @@ proto_register_rpcap (void)
NULL, 0x0, "Packet data", HFILL } },
{ &hf_timestamp,
{ "Arrival time", "rpcap.time", FT_ABSOLUTE_TIME, BASE_NONE,
- NULL, 0x0, "Arrival time", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_caplen,
{ "Capture length", "rpcap.cap_len", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Capture length", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_len,
{ "Frame length", "rpcap.len", FT_UINT32, BASE_DEC,
NULL, 0x0, "Frame length (off wire)", HFILL } },
{ &hf_npkt,
{ "Frame number", "rpcap.number", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Frame number", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* Authentication request */
{ &hf_auth_request,
{ "Authentication", "rpcap.auth", FT_NONE, BASE_NONE,
- NULL, 0x0, "Authentication", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_auth_type,
{ "Authentication type", "rpcap.auth_type", FT_UINT16, BASE_DEC,
- VALS(auth_type), 0x0, "Authentication type", HFILL } },
+ VALS(auth_type), 0x0, NULL, HFILL } },
{ &hf_auth_slen1,
{ "Authentication item length 1", "rpcap.auth_len1", FT_UINT16, BASE_DEC,
- NULL, 0x0, "Authentication item length 1", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_auth_slen2,
{ "Authentication item length 2", "rpcap.auth_len2", FT_UINT16, BASE_DEC,
- NULL, 0x0, "Authentication item length 2", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_auth_username,
- { "Username", "rpcap.username", FT_STRING, BASE_DEC,
- NULL, 0x0, "Username", HFILL } },
+ { "Username", "rpcap.username", FT_STRING, BASE_NONE,
+ NULL, 0x0, NULL, HFILL } },
{ &hf_auth_password,
- { "Password", "rpcap.password", FT_STRING, BASE_DEC,
- NULL, 0x0, "Password", HFILL } },
+ { "Password", "rpcap.password", FT_STRING, BASE_NONE,
+ NULL, 0x0, NULL, HFILL } },
/* Open request */
{ &hf_open_request,
- { "Open request", "rpcap.open_request", FT_STRING, BASE_DEC,
- NULL, 0x0, "Open request", HFILL } },
+ { "Open request", "rpcap.open_request", FT_STRING, BASE_NONE,
+ NULL, 0x0, NULL, HFILL } },
/* Open reply */
{ &hf_open_reply,
{ "Open reply", "rpcap.open_reply", FT_NONE, BASE_NONE,
- NULL, 0x0, "Open reply", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_linktype,
{ "Link type", "rpcap.linktype", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Link type", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_tzoff,
{ "Timezone offset", "rpcap.tzoff", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Timezone offset", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* Start capture request */
{ &hf_startcap_request,
{ "Start capture request", "rpcap.startcap_request", FT_NONE, BASE_NONE,
- NULL, 0x0, "Start capture request", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_snaplen,
{ "Snap length", "rpcap.snaplen", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Snap length", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_read_timeout,
{ "Read timeout", "rpcap.read_timeout", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Read timeout", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_flags,
{ "Flags", "rpcap.flags", FT_UINT16, BASE_DEC,
NULL, 0x0, "Capture flags", HFILL } },
{ &hf_flags_promisc,
{ "Promiscuous mode", "rpcap.flags.promisc", FT_BOOLEAN, 16,
- TFS(&tfs_enabled_disabled), FLAG_PROMISC, "Promiscuous mode", HFILL } },
+ TFS(&tfs_enabled_disabled), FLAG_PROMISC, NULL, HFILL } },
{ &hf_flags_dgram,
{ "Use Datagram", "rpcap.flags.dgram", FT_BOOLEAN, 16,
- TFS(&tfs_yes_no), FLAG_DGRAM, "", HFILL } },
+ TFS(&tfs_yes_no), FLAG_DGRAM, NULL, HFILL } },
{ &hf_flags_serveropen,
{ "Server open", "rpcap.flags.serveropen", FT_BOOLEAN, 16,
- TFS(&open_closed), FLAG_SERVEROPEN, "Server open", HFILL } },
+ TFS(&open_closed), FLAG_SERVEROPEN, NULL, HFILL } },
{ &hf_flags_inbound,
{ "Inbound", "rpcap.flags.inbound", FT_BOOLEAN, 16,
- TFS(&tfs_yes_no), FLAG_INBOUND, "Inbound", HFILL } },
+ TFS(&tfs_yes_no), FLAG_INBOUND, NULL, HFILL } },
{ &hf_flags_outbound,
{ "Outbound", "rpcap.flags.outbound", FT_BOOLEAN, 16,
- TFS(&tfs_yes_no), FLAG_OUTBOUND, "Outbound", HFILL } },
+ TFS(&tfs_yes_no), FLAG_OUTBOUND, NULL, HFILL } },
{ &hf_client_port,
{ "Client Port", "rpcap.client_port", FT_UINT16, BASE_DEC,
- NULL, 0x0, "Client Port", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* Start capture reply */
{ &hf_startcap_reply,
@@ -1145,38 +1145,38 @@ proto_register_rpcap (void)
NULL, 0x0, "Start Capture Reply", HFILL } },
{ &hf_bufsize,
{ "Buffer size", "rpcap.bufsize", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Buffer size", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_server_port,
{ "Server port", "rpcap.server_port", FT_UINT16, BASE_DEC,
- NULL, 0x0, "Server port", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_dummy,
{ "Dummy", "rpcap.dummy", FT_UINT16, BASE_DEC,
- NULL, 0x0, "", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* Filter */
{ &hf_filter,
{ "Filter", "rpcap.filter", FT_NONE, BASE_NONE,
- NULL, 0x0, "Filter", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_filtertype,
{ "Filter type", "rpcap.filtertype", FT_UINT16, BASE_DEC,
NULL, 0x0, "Filter type (BPF)", HFILL } },
{ &hf_nitems,
{ "Number of items", "rpcap.nitems", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Number of items", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* Filter BPF instruction */
{ &hf_filterbpf_insn,
{ "Filter BPF instruction", "rpcap.filterbpf_insn", FT_NONE, BASE_NONE,
- NULL, 0x0, "", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_code,
{ "Op code", "rpcap.opcode", FT_UINT16, BASE_DEC,
NULL, 0x0, "Operation code", HFILL } },
{ &hf_jt,
{ "JT", "rpcap.jt", FT_UINT8, BASE_DEC,
- NULL, 0x0, "JT", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_jf,
{ "JF", "rpcap.jf", FT_UINT8, BASE_DEC,
- NULL, 0x0, "JF", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_instr_value,
{ "Instruction value", "rpcap.instr_value", FT_UINT32, BASE_DEC,
NULL, 0x0, "Instruction-Dependent value", HFILL } },
@@ -1190,10 +1190,10 @@ proto_register_rpcap (void)
NULL, 0x0, "Received by kernel", HFILL } },
{ &hf_ifdrop,
{ "Dropped by network interface", "rpcap.ifdrop", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Dropped by network interface", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_krnldrop,
{ "Dropped by kernel filter", "rpcap.krnldrop", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Dropped by kernel filter", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_srvcapt,
{ "Captured by rpcapd", "rpcap.srvcapt", FT_UINT32, BASE_DEC,
NULL, 0x0, "Captured by RPCAP daemon", HFILL } },
@@ -1201,77 +1201,77 @@ proto_register_rpcap (void)
/* Find all devices reply */
{ &hf_findalldevs_reply,
{ "Find all devices", "rpcap.findalldevs_reply", FT_NONE, BASE_NONE,
- NULL, 0x0, "Find all devices", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_findalldevs_if,
{ "Interface", "rpcap.if", FT_NONE, BASE_NONE,
- NULL, 0x0, "Interface", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_namelen,
{ "Name length", "rpcap.namelen", FT_UINT16, BASE_DEC,
- NULL, 0x0, "Name length", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_desclen,
{ "Description length", "rpcap.desclen", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Description length", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_flags,
{ "Interface flags", "rpcap.if.flags", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Interface flags", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_naddr,
{ "Number of addresses", "rpcap.naddr", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Number of addresses", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_name,
- { "Name", "rpcap.ifname", FT_STRING, BASE_DEC,
+ { "Name", "rpcap.ifname", FT_STRING, BASE_NONE,
NULL, 0x0, "Interface name", HFILL } },
{ &hf_if_desc,
- { "Description", "rpcap.ifdesc", FT_STRING, BASE_DEC,
+ { "Description", "rpcap.ifdesc", FT_STRING, BASE_NONE,
NULL, 0x0, "Interface description", HFILL } },
/* Find all devices / Interface addresses */
{ &hf_findalldevs_ifaddr,
{ "Interface address", "rpcap.ifaddr", FT_NONE, BASE_NONE,
- NULL, 0x0, "Interface address", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_addr,
{ "Address", "rpcap.addr", FT_NONE, BASE_NONE,
NULL, 0x0, "Network address", HFILL } },
{ &hf_if_netmask,
{ "Netmask", "rpcap.netmask", FT_NONE, BASE_NONE,
- NULL, 0x0, "Netmask", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_broadaddr,
{ "Broadcast", "rpcap.broadaddr", FT_NONE, BASE_NONE,
- NULL, 0x0, "", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_dstaddr,
{ "P2P destination address", "rpcap.dstaddr", FT_NONE, BASE_NONE,
- NULL, 0x0, "P2P destination address", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_af,
{ "Address family", "rpcap.if.af", FT_UINT16, BASE_HEX,
- VALS(address_family), 0x0, "Address family", HFILL } },
+ VALS(address_family), 0x0, NULL, HFILL } },
{ &hf_if_port,
{ "Port", "rpcap.if.port", FT_UINT16, BASE_DEC,
NULL, 0x0, "Port number", HFILL } },
{ &hf_if_ip,
{ "IP address", "rpcap.if.ip", FT_IPv4, BASE_NONE,
- NULL, 0x0, "IP address", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_padding,
{ "Padding", "rpcap.if.padding", FT_BYTES, BASE_NONE,
- NULL, 0x0, "Padding", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_if_unknown,
{ "Unknown address", "rpcap.if.unknown", FT_BYTES, BASE_NONE,
- NULL, 0x0, "Unknown address", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* Sampling request */
{ &hf_sampling_request,
{ "Sampling", "rpcap.sampling_request", FT_NONE, BASE_NONE,
- NULL, 0x0, "Sampling", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_sampling_method,
{ "Method", "rpcap.sampling_method", FT_UINT8, BASE_DEC,
VALS(sampling_method), 0x0, "Sampling method", HFILL } },
{ &hf_sampling_dummy1,
{ "Dummy1", "rpcap.dummy", FT_UINT8, BASE_DEC,
- NULL, 0x0, "Dummy1", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_sampling_dummy2,
{ "Dummy2", "rpcap.dummy", FT_UINT16, BASE_DEC,
- NULL, 0x0, "Dummy2", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_sampling_value,
{ "Value", "rpcap.sampling_value", FT_UINT32, BASE_DEC,
- NULL, 0x0, "", HFILL } },
+ NULL, 0x0, NULL, HFILL } },
};
static gint *ett[] = {