blob: 635c41e04b1868d4df63a3c14168405f53290ecd [file] [log] [blame]
Rich Lanea06d0c32013-03-25 08:52:03 -07001:: # Copyright 2013, Big Switch Networks, Inc.
2:: #
3:: # LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
4:: # the following special exception:
5:: #
6:: # LOXI Exception
7:: #
8:: # As a special exception to the terms of the EPL, you may distribute libraries
9:: # generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
10:: # that copyright and licensing notices generated by LoxiGen are not altered or removed
11:: # from the LoxiGen Libraries and the notice provided below is (i) included in
12:: # the LoxiGen Libraries, if distributed in source code form and (ii) included in any
13:: # documentation for the LoxiGen Libraries, if distributed in binary form.
14:: #
15:: # Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
16:: #
17:: # You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
18:: # a copy of the EPL at:
19:: #
20:: # http://www.eclipse.org/legal/epl-v10.html
21:: #
22:: # Unless required by applicable law or agreed to in writing, software
23:: # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
24:: # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
25:: # EPL for the specific language governing permissions and limitations
26:: # under the EPL.
27::
Rich Laned983aa52013-06-13 11:48:37 -070028:: include('_copyright.c')
Rich Lanea06d0c32013-03-25 08:52:03 -070029
30#if !defined(_LOCI_SHOW_H_)
31#define _LOCI_SHOW_H_
32
33#include <loci/loci_base.h>
34#include <loci/of_match.h>
35#include <stdio.h>
36
37/* g++ requires this to pick up PRI, etc.
38 * See http://gcc.gnu.org/ml/gcc-help/2006-10/msg00223.html
39 */
40#if !defined(__STDC_FORMAT_MACROS)
41#define __STDC_FORMAT_MACROS
42#endif
43#include <inttypes.h>
44
45typedef int (*loci_obj_show_f)(loci_writer_f writer,
46 void *cookie, of_object_t *obj);
47
48/****************************************************************
49 *
50 * Per-datatype dump macros
51 *
52 ****************************************************************/
53#define LOCI_SHOW_u8(writer, cookie, val) writer(cookie, "%u", (val))
54#define LOCI_SHOW_u16(writer, cookie, val) writer(cookie, "%u (0x%x)", (val), (val))
55#define LOCI_SHOW_u32(writer, cookie, val) writer(cookie, "%u (0x%x)", (val), (val))
56#define LOCI_SHOW_u64(writer, cookie, val) writer(cookie, "%" PRIu64 "(0x%" PRIx64 ")", (val), (val))
57
58#define LOCI_SHOW_D_INT(cookie, macro, val) writer(cookie, "%" macro , val);
59#define LOCI_SHOW_X_INT(cookie, macro, val) writer(cookie, "0x%" macro, val);
60
61#define LOCI_SHOW_x8(writer, cookie, val) LOCI_SHOW_X_INT(cookie, PRIx8, val)
62#define LOCI_SHOW_x16(writer, cookie, val) LOCI_SHOW_X_INT(cookie, PRIx16, val)
63#define LOCI_SHOW_x32(writer, cookie, val) LOCI_SHOW_X_INT(cookie, PRIx32, val)
64#define LOCI_SHOW_x64(writer, cookie, val) LOCI_SHOW_X_INT(cookie, PRIx64, val)
65#define LOCI_SHOW_d8(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId8, val)
66#define LOCI_SHOW_d16(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId16, val)
67#define LOCI_SHOW_d32(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId32, val)
68#define LOCI_SHOW_d64(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId64, val)
69
70
71
72/**
73 * Field-specific show macros.
74 */
75#define LOCI_SHOW_u32_ipv6_flabel(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
76#define LOCI_SHOW_u8_vlan_pcp(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
Andreas Wundsamb566a162013-07-18 19:30:23 -070077#define LOCI_SHOW_ipv4_ipv4_src(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -070078#define LOCI_SHOW_ipv6_ipv6_dst(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
79#define LOCI_SHOW_u32_arp_tpa(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
80#define LOCI_SHOW_u8_icmpv6_type(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
81#define LOCI_SHOW_mac_arp_sha(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
82#define LOCI_SHOW_ipv6_ipv6_src(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
83#define LOCI_SHOW_u16_sctp_src(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
84#define LOCI_SHOW_u8_icmpv6_code(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
85#define LOCI_SHOW_mac_eth_dst(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
86#define LOCI_SHOW_mac_ipv6_nd_sll(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
87#define LOCI_SHOW_u8_mpls_tc(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
88#define LOCI_SHOW_u16_arp_op(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
89#define LOCI_SHOW_u16_eth_type(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
90#define LOCI_SHOW_ipv6_ipv6_nd_target(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
91#define LOCI_SHOW_u16_vlan_vid(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
92#define LOCI_SHOW_mac_arp_tha(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
93#define LOCI_SHOW_port_no_in_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
94#define LOCI_SHOW_u8_ip_dscp(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
95#define LOCI_SHOW_u16_sctp_dst(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
96#define LOCI_SHOW_u8_icmpv4_code(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
97#define LOCI_SHOW_u16_tcp_src(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
98#define LOCI_SHOW_u32_arp_spa(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
99#define LOCI_SHOW_u8_ip_ecn(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
100#define LOCI_SHOW_u16_udp_dst(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
101#define LOCI_SHOW_port_no_in_phy_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
Andreas Wundsamb566a162013-07-18 19:30:23 -0700102#define LOCI_SHOW_ipv4_ipv4_dst(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700103#define LOCI_SHOW_mac_eth_src(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
104#define LOCI_SHOW_u16_udp_src(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
105#define LOCI_SHOW_mac_ipv6_nd_tll(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
106#define LOCI_SHOW_u8_icmpv4_type(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
107#define LOCI_SHOW_u32_mpls_label(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
108#define LOCI_SHOW_u16_tcp_dst(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
109#define LOCI_SHOW_u8_ip_proto(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
110#define LOCI_SHOW_u64_metadata(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
Rich Laned76e4922013-03-28 09:57:54 -0700111#define LOCI_SHOW_u8_enabled(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
Dan Talaycoc0e802e2013-05-18 23:52:39 -0700112#define LOCI_SHOW_u32_vport_no(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
113#define LOCI_SHOW_u32_port_no(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
114#define LOCI_SHOW_u16_ingress_tpid(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
115#define LOCI_SHOW_u16_egress_tpid(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
116#define LOCI_SHOW_u16_ingress_vlan_id(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
117#define LOCI_SHOW_u16_egress_vlan_id(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
Dan Talaycof76f7112013-05-19 23:32:12 -0700118#define LOCI_SHOW_u32_enabled(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
119#define LOCI_SHOW_u32_enable(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700120
121
122
123
124/* @todo Add checks for special port numbers */
125#define LOCI_SHOW_port_no(writer, cookie, val) writer(cookie, "%d", val)
126#define LOCI_SHOW_fm_cmd(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
127
128/* @todo Decode wildcards */
129#define LOCI_SHOW_wc_bmap(writer, cookie, val) \
130 writer(cookie, "0x%" PRIx64, (val))
131#define LOCI_SHOW_match_bmap(writer, cookie, val) \
132 writer(cookie, "0x%" PRIx64, (val))
133
134/* @todo Dump first N bytes of data */
135#define LOCI_SHOW_octets(writer, cookie, val) \
136 writer(cookie, "%d bytes at location %p", (val).bytes, (val).data)
137
138#define LOCI_SHOW_mac(writer, cookie, val) \
139 writer(cookie, "%02x:%02x:%02x:%02x:%02x:%02x", \
140 (val).addr[0], (val).addr[1], (val).addr[2], \
141 (val).addr[3], (val).addr[4], (val).addr[5])
142
143#define LOCI_SHOW_ipv4(writer, cookie, val) \
144 writer(cookie, "%d.%d.%d.%d", val >> 24, (val >> 16) & 0xff, \
145 (val >> 8) & 0xff, val & 0xff)
146
147#define LOCI_SHOW_ipv6(writer, cookie, val) \
148 writer(cookie, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", \
149 (val).addr[0], (val).addr[1], (val).addr[2], (val).addr[3], \
150 (val).addr[4], (val).addr[5], (val).addr[6], (val).addr[7], \
151 (val).addr[8], (val).addr[9], (val).addr[10], (val).addr[11], \
152 (val).addr[12], (val).addr[13], (val).addr[14], (val).addr[15])
153
154#define LOCI_SHOW_string(writer, cookie, val) writer(cookie, "%s", val)
155
156#define LOCI_SHOW_port_name(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
Kiran Poolaa9167ff2013-09-19 16:34:54 -0700157#define LOCI_SHOW_port_name_if_name(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700158#define LOCI_SHOW_tab_name(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
159#define LOCI_SHOW_desc_str(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
160#define LOCI_SHOW_ser_num(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
161
162int loci_show_match(loci_writer_f writer, void *cookie, of_match_t *match);
163#define LOCI_SHOW_match(writer, cookie, val) loci_show_match(writer, cookie, &val)
164
Rich Lane3b2fd832013-09-24 13:44:08 -0700165#define LOCI_SHOW_bitmap_128(writer, cookie, val) writer(cookie, "%" PRIx64 "%" PRIx64, (val).hi, (val).lo)
166
Rich Lanefab0c822013-12-30 11:46:48 -0800167#define LOCI_SHOW_checksum_128(writer, cookie, val) writer(cookie, "%016" PRIx64 "%016" PRIx64, (val).hi, (val).lo)
168
Rich Lanea06d0c32013-03-25 08:52:03 -0700169/**
170 * Generic version for any object
171 */
172int of_object_show(loci_writer_f writer, void *cookie, of_object_t *obj);
173
174
175
176
177/**
178 * Choose a representation for each field that
179 * makes the most sense for display to the user.
180 */
181#define LOCI_SHOW_u32_xid(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
182#define LOCI_SHOW_u16_flags(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
183#define LOCI_SHOW_u64_packet_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
184#define LOCI_SHOW_u64_byte_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
185#define LOCI_SHOW_u32_flow_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
186#define LOCI_SHOW_match_match(writer, cookie, val) LOCI_SHOW_match(writer, cookie, val)
187#define LOCI_SHOW_u8_table_id(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
188#define LOCI_SHOW_port_no_out_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
189#define LOCI_SHOW_u32_experimenter(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
190#define LOCI_SHOW_u32_subtype(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
191#define LOCI_SHOW_u8_index(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
192#define LOCI_SHOW_u32_mask(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
193#define LOCI_SHOW_u8_report_mirror_ports(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
194#define LOCI_SHOW_desc_str_mfr_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
195#define LOCI_SHOW_desc_str_hw_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
196#define LOCI_SHOW_desc_str_sw_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
197#define LOCI_SHOW_ser_num_serial_num(writer, cookie, val) LOCI_SHOW_ser_num(writer, cookie, val)
198#define LOCI_SHOW_desc_str_dp_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
Wilson Ng27e4beb2013-12-03 12:33:01 -0800199#define LOCI_SHOW_desc_str_pipeline(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700200#define LOCI_SHOW_octets_data(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
Duc Pham9d29ed02014-01-30 16:23:16 -0800201#define LOCI_SHOW_octets_value(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700202#define LOCI_SHOW_u16_err_type(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
203#define LOCI_SHOW_u16_code(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
204#define LOCI_SHOW_u64_datapath_id(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
205#define LOCI_SHOW_u32_n_buffers(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
206#define LOCI_SHOW_u8_n_tables(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
207#define LOCI_SHOW_u32_capabilities(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
208#define LOCI_SHOW_u32_actions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
209#define LOCI_SHOW_u64_cookie(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
210#define LOCI_SHOW_u16_idle_timeout(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
211#define LOCI_SHOW_u16_hard_timeout(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
212#define LOCI_SHOW_u16_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
213#define LOCI_SHOW_u32_buffer_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
214#define LOCI_SHOW_u8_reason(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
215#define LOCI_SHOW_u32_duration_sec(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
216#define LOCI_SHOW_u32_duration_nsec(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
217#define LOCI_SHOW_u16_miss_send_len(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
218#define LOCI_SHOW_u32_role(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
219#define LOCI_SHOW_u16_total_len(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
220#define LOCI_SHOW_port_no_port_no(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
221#define LOCI_SHOW_mac_hw_addr(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
222#define LOCI_SHOW_u32_config(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
223#define LOCI_SHOW_u32_advertise(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
224#define LOCI_SHOW_port_no_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
225#define LOCI_SHOW_u32_queue_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
226#define LOCI_SHOW_u32_dest_port(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
227#define LOCI_SHOW_u32_vlan_tag(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
228#define LOCI_SHOW_u8_copy_stage(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
229#define LOCI_SHOW_u16_max_len(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
230#define LOCI_SHOW_mac_dl_addr(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
231#define LOCI_SHOW_u32_nw_addr(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
232#define LOCI_SHOW_u8_nw_tos(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
233#define LOCI_SHOW_u16_tp_port(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
234#define LOCI_SHOW_wc_bmap_wildcards(writer, cookie, val) LOCI_SHOW_wc_bmap(writer, cookie, val)
235#define LOCI_SHOW_port_name_name(writer, cookie, val) LOCI_SHOW_port_name(writer, cookie, val)
236#define LOCI_SHOW_u32_state(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
237#define LOCI_SHOW_u32_curr(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
238#define LOCI_SHOW_u32_advertised(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
239#define LOCI_SHOW_u32_supported(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
240#define LOCI_SHOW_u32_peer(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
241#define LOCI_SHOW_u64_rx_packets(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
xinwu358e6162013-12-04 16:49:48 -0800242#define LOCI_SHOW_u64_rx_packets_unicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
243#define LOCI_SHOW_u64_rx_packets_multicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
244#define LOCI_SHOW_u64_rx_packets_broadcast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
xinwuf08ef682013-12-05 18:29:20 -0800245#define LOCI_SHOW_u64_uint64_value(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700246#define LOCI_SHOW_u64_tx_packets(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
xinwu358e6162013-12-04 16:49:48 -0800247#define LOCI_SHOW_u64_tx_packets_unicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
248#define LOCI_SHOW_u64_tx_packets_multicast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
249#define LOCI_SHOW_u64_tx_packets_broadcast(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700250#define LOCI_SHOW_u64_rx_bytes(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
251#define LOCI_SHOW_u64_tx_bytes(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
252#define LOCI_SHOW_u64_rx_dropped(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
253#define LOCI_SHOW_u64_tx_dropped(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
254#define LOCI_SHOW_u64_rx_errors(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
255#define LOCI_SHOW_u64_tx_errors(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
256#define LOCI_SHOW_u64_rx_frame_err(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
257#define LOCI_SHOW_u64_rx_over_err(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
258#define LOCI_SHOW_u64_rx_crc_err(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
259#define LOCI_SHOW_u64_collisions(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
260#define LOCI_SHOW_u16_rate(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
261#define LOCI_SHOW_tab_name_name(writer, cookie, val) LOCI_SHOW_tab_name(writer, cookie, val)
262#define LOCI_SHOW_u32_max_entries(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
263#define LOCI_SHOW_u32_active_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
264#define LOCI_SHOW_u64_lookup_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
265#define LOCI_SHOW_u64_matched_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
266#define LOCI_SHOW_u32_out_group(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
267#define LOCI_SHOW_u64_cookie_mask(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
268#define LOCI_SHOW_u32_reserved(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
269#define LOCI_SHOW_u16_command(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
270#define LOCI_SHOW_u8_group_type(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
271#define LOCI_SHOW_u32_group_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
272#define LOCI_SHOW_u16_ethertype(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
273#define LOCI_SHOW_u8_mpls_ttl(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
274#define LOCI_SHOW_u8_nw_ecn(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
275#define LOCI_SHOW_u8_nw_ttl(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
276#define LOCI_SHOW_u16_weight(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
277#define LOCI_SHOW_port_no_watch_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
278#define LOCI_SHOW_u32_watch_group(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
279#define LOCI_SHOW_u32_ref_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
280#define LOCI_SHOW_u64_metadata_mask(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
281#define LOCI_SHOW_mac_eth_src_mask(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
282#define LOCI_SHOW_mac_eth_dst_mask(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
Andreas Wundsamb566a162013-07-18 19:30:23 -0700283#define LOCI_SHOW_ipv4_ipv4_src_mask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
284#define LOCI_SHOW_ipv4_ipv4_dst_mask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700285#define LOCI_SHOW_u32_curr_speed(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
286#define LOCI_SHOW_u32_max_speed(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
287#define LOCI_SHOW_match_bmap_match(writer, cookie, val) LOCI_SHOW_match_bmap(writer, cookie, val)
288#define LOCI_SHOW_u32_instructions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
289#define LOCI_SHOW_u32_write_actions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
290#define LOCI_SHOW_u32_apply_actions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
291#define LOCI_SHOW_u32_types(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
292#define LOCI_SHOW_u32_max_groups_all(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
293#define LOCI_SHOW_u32_max_groups_select(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
294#define LOCI_SHOW_u32_max_groups_indirect(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
295#define LOCI_SHOW_u32_max_groups_ff(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
296#define LOCI_SHOW_u32_actions_all(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
297#define LOCI_SHOW_u32_actions_select(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
298#define LOCI_SHOW_u32_actions_indirect(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
299#define LOCI_SHOW_u32_actions_ff(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
300#define LOCI_SHOW_u64_generation_id(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
301#define LOCI_SHOW_octets_field(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
302#define LOCI_SHOW_u16_value(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
303#define LOCI_SHOW_u16_value_mask(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
304#define LOCI_SHOW_mac_value(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
305#define LOCI_SHOW_mac_value_mask(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
306#define LOCI_SHOW_u32_value(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
307#define LOCI_SHOW_u32_value_mask(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
308#define LOCI_SHOW_u32_oxm_header(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
309#define LOCI_SHOW_u8_value(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
310#define LOCI_SHOW_u8_value_mask(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
311#define LOCI_SHOW_port_no_value(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
312#define LOCI_SHOW_port_no_value_mask(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
313#define LOCI_SHOW_ipv6_value(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
314#define LOCI_SHOW_ipv6_value_mask(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
315#define LOCI_SHOW_u64_value(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
316#define LOCI_SHOW_u64_value_mask(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
317#define LOCI_SHOW_u64_write_setfields(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
318#define LOCI_SHOW_u64_apply_setfields(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
319#define LOCI_SHOW_u64_metadata_match(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
320#define LOCI_SHOW_u64_metadata_write(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
321#define LOCI_SHOW_u32_packet_in_mask_equal_master(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
322#define LOCI_SHOW_u32_packet_in_mask_slave(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
323#define LOCI_SHOW_u32_port_status_mask_equal_master(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
324#define LOCI_SHOW_u32_port_status_mask_slave(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
325#define LOCI_SHOW_u32_flow_removed_mask_equal_master(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
326#define LOCI_SHOW_u32_flow_removed_mask_slave(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
327#define LOCI_SHOW_u8_auxiliary_id(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
328#define LOCI_SHOW_u32_meter_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
329#define LOCI_SHOW_u32_rate(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
330#define LOCI_SHOW_u32_burst_size(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
331#define LOCI_SHOW_u8_prec_level(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
332#define LOCI_SHOW_u64_packet_band_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
333#define LOCI_SHOW_u64_byte_band_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
334#define LOCI_SHOW_u32_max_meter(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
335#define LOCI_SHOW_u32_band_types(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
336#define LOCI_SHOW_u8_max_bands(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
337#define LOCI_SHOW_u8_max_color(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
338#define LOCI_SHOW_u64_packet_in_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
339#define LOCI_SHOW_u64_byte_in_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
340#define LOCI_SHOW_octets_experimenter_data(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
341#define LOCI_SHOW_u32_dst(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
342#define LOCI_SHOW_u32_service(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
343#define LOCI_SHOW_u32_status(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
344#define LOCI_SHOW_u16_subtype(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
Andreas Wundsamb566a162013-07-18 19:30:23 -0700345#define LOCI_SHOW_ipv4_ipv4_addr(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
346#define LOCI_SHOW_ipv4_ipv4_netmask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
Ken Chiang103e1472013-05-13 17:21:57 -0700347#define LOCI_SHOW_u8_l2_table_enable(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
348#define LOCI_SHOW_u16_l2_table_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
Andreas Wundsamb566a162013-07-18 19:30:23 -0700349#define LOCI_SHOW_ipv4_value(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
350#define LOCI_SHOW_ipv4_value_mask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
Ken Chiangb31fd482013-09-20 10:38:01 -0700351#define LOCI_SHOW_u8_hybrid_enable(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
352#define LOCI_SHOW_u16_hybrid_version(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
Rich Laned8d29c92013-09-24 13:46:42 -0700353#define LOCI_SHOW_bitmap_128_value(writer, cookie, val) LOCI_SHOW_bitmap_128(writer, cookie, val)
354#define LOCI_SHOW_bitmap_128_value_mask(writer, cookie, val) LOCI_SHOW_bitmap_128(writer, cookie, val)
355#define LOCI_SHOW_bitmap_128_bsn_in_ports_128(writer, cookie, val) LOCI_SHOW_bitmap_128(writer, cookie, val)
Vishnu Emmadie8158482013-09-30 18:25:44 -0700356#define LOCI_SHOW_u32_timeout_ms(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
357#define LOCI_SHOW_u32_tx_interval_ms(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
Vishnu Emmadi4b9e3062013-10-01 17:10:18 -0700358#define LOCI_SHOW_u8_slot_num(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
Rich Lane61718362013-10-24 16:59:42 -0700359#define LOCI_SHOW_u32_bsn_lag_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
Rich Laneeb21c4f2013-10-28 17:34:41 -0700360#define LOCI_SHOW_u32_bsn_vrf(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
361#define LOCI_SHOW_u8_bsn_global_vrf_allowed(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
362#define LOCI_SHOW_u32_bsn_l3_interface_class_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
363#define LOCI_SHOW_u32_bsn_l3_src_class_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
364#define LOCI_SHOW_u32_bsn_l3_dst_class_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
Vishnu Emmadiaa9af062013-11-08 18:14:34 -0800365#define LOCI_SHOW_u8_convergence_status(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
Vishnu Emmadice7ebdf2013-11-08 16:11:42 -0800366#define LOCI_SHOW_u16_actor_sys_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
367#define LOCI_SHOW_mac_actor_sys_mac(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
368#define LOCI_SHOW_u16_actor_port_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
369#define LOCI_SHOW_u16_actor_port_num(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
370#define LOCI_SHOW_u16_actor_key(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
371#define LOCI_SHOW_u16_partner_sys_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
372#define LOCI_SHOW_mac_partner_sys_mac(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
373#define LOCI_SHOW_u16_partner_port_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
374#define LOCI_SHOW_u16_partner_port_num(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
375#define LOCI_SHOW_u16_partner_key(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
Rich Lanee6f311a2013-11-18 16:59:14 -0800376#define LOCI_SHOW_u64_time_ms(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
Rich Lanee84f50d2013-12-16 14:53:25 -0800377#define LOCI_SHOW_desc_str_uri(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
378#define LOCI_SHOW_u8_state(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
Rich Lane713d9282013-12-30 15:21:35 -0800379#define LOCI_SHOW_u16_table_id(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
380#define LOCI_SHOW_u32_deleted_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
381#define LOCI_SHOW_u32_error_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
382#define LOCI_SHOW_checksum_128_checksum(writer, cookie, val) LOCI_SHOW_checksum_128(writer, cookie, val)
383#define LOCI_SHOW_checksum_128_checksum_mask(writer, cookie, val) LOCI_SHOW_checksum_128(writer, cookie, val)
384#define LOCI_SHOW_u32_buckets_size(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
385#define LOCI_SHOW_u32_entry_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
Sovietaced3d42dbe2014-01-23 15:55:48 -0800386#define LOCI_SHOW_u32_num_aux(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
Rich Lanea06d0c32013-03-25 08:52:03 -0700387
Rich Lanea06d0c32013-03-25 08:52:03 -0700388#endif /* _LOCI_SHOW_H_ */