summaryrefslogtreecommitdiffstats
path: root/src/vnet/flow/flow_report_classify.h
diff options
context:
space:
mode:
authorSwarup Nayak <swarupnpvt@gmail.com>2017-11-26 23:11:40 +0530
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-26 19:36:13 +0000
commit6bcac065b82ef2e48fc23db18534d9dc9a7833a1 (patch)
tree13aae9f6feb438835afd7e632b25173a1511e8f7 /src/vnet/flow/flow_report_classify.h
parent84517cfd1508f6da24937f310f7fffe752f22584 (diff)
VPP-252 Coding standards cleanup - vnet/vnet/flow
Change-Id: I288b0eeefd22f65e80634068e4b3ce0d83fb50fc Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
Diffstat (limited to 'src/vnet/flow/flow_report_classify.h')
-rw-r--r--src/vnet/flow/flow_report_classify.h64
1 files changed, 38 insertions, 26 deletions
diff --git a/src/vnet/flow/flow_report_classify.h b/src/vnet/flow/flow_report_classify.h
index 77d98b586ca..0533b450122 100644
--- a/src/vnet/flow/flow_report_classify.h
+++ b/src/vnet/flow/flow_report_classify.h
@@ -66,57 +66,69 @@ _(tcpudp->dst_port, ((u16[]){0xFFFF}), udpDestinationPort, 2)
} \
foreach_ipfix_transport_protocol_field
-typedef struct {
+typedef struct
+{
u32 classify_table_index;
u8 ip_version;
u8 transport_protocol;
} ipfix_classify_table_t;
-typedef struct {
+typedef struct
+{
u32 domain_id;
u16 src_port;
- ipfix_classify_table_t * tables;
+ ipfix_classify_table_t *tables;
} flow_report_classify_main_t;
extern flow_report_classify_main_t flow_report_classify_main;
-static_always_inline u8 ipfix_classify_table_index_valid (u32 index)
+static_always_inline u8
+ipfix_classify_table_index_valid (u32 index)
{
- flow_report_classify_main_t * fcm = &flow_report_classify_main;
- return index < vec_len(fcm->tables) &&
- fcm->tables[index].classify_table_index != ~0;
+ flow_report_classify_main_t *fcm = &flow_report_classify_main;
+ return index < vec_len (fcm->tables) &&
+ fcm->tables[index].classify_table_index != ~0;
}
-static_always_inline ipfix_classify_table_t * ipfix_classify_add_table (void)
+static_always_inline ipfix_classify_table_t *
+ipfix_classify_add_table (void)
{
- flow_report_classify_main_t * fcm = &flow_report_classify_main;
+ flow_report_classify_main_t *fcm = &flow_report_classify_main;
u32 i;
- for (i = 0; i < vec_len(fcm->tables); i++)
- if (!ipfix_classify_table_index_valid(i))
+ for (i = 0; i < vec_len (fcm->tables); i++)
+ if (!ipfix_classify_table_index_valid (i))
return &fcm->tables[i];
- u32 index = vec_len(fcm->tables);
- vec_validate(fcm->tables, index);
+ u32 index = vec_len (fcm->tables);
+ vec_validate (fcm->tables, index);
return &fcm->tables[index];
}
-static_always_inline void ipfix_classify_delete_table (u32 index)
+static_always_inline void
+ipfix_classify_delete_table (u32 index)
{
- flow_report_classify_main_t * fcm = &flow_report_classify_main;
- ASSERT (index < vec_len(fcm->tables));
+ flow_report_classify_main_t *fcm = &flow_report_classify_main;
+ ASSERT (index < vec_len (fcm->tables));
ASSERT (fcm->tables[index].classify_table_index != ~0);
fcm->tables[index].classify_table_index = ~0;
}
-u8 * ipfix_classify_template_rewrite (flow_report_main_t * frm,
- flow_report_t * fr,
- ip4_address_t * collector_address,
- ip4_address_t * src_address,
- u16 collector_port);
+u8 *ipfix_classify_template_rewrite (flow_report_main_t * frm,
+ flow_report_t * fr,
+ ip4_address_t * collector_address,
+ ip4_address_t * src_address,
+ u16 collector_port);
-vlib_frame_t * ipfix_classify_send_flows (flow_report_main_t * frm,
- flow_report_t * fr,
- vlib_frame_t * f,
- u32 * to_next,
- u32 node_index);
+vlib_frame_t *ipfix_classify_send_flows (flow_report_main_t * frm,
+ flow_report_t * fr,
+ vlib_frame_t * f,
+ u32 * to_next, u32 node_index);
#endif /* __included_flow_report_classify_h__ */
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */