VPP-252 Coding standards cleanup - vnet/vnet/flow
Change-Id: I288b0eeefd22f65e80634068e4b3ce0d83fb50fc
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
diff --git a/src/vnet/flow/flow_report.h b/src/vnet/flow/flow_report.h
index 01859ce..b26345b 100644
--- a/src/vnet/flow/flow_report.h
+++ b/src/vnet/flow/flow_report.h
@@ -32,7 +32,8 @@
#include <vnet/flow/ipfix_packet.h>
/* Used to build the rewrite */
-typedef struct {
+typedef struct
+{
ip4_header_t ip4;
udp_header_t udp;
ipfix_template_packet_t ipfix;
@@ -41,23 +42,24 @@
struct flow_report_main;
struct flow_report;
-typedef u8 * (vnet_flow_rewrite_callback_t)(struct flow_report_main *,
- struct flow_report *,
- ip4_address_t *,
- ip4_address_t *,
- u16);
+typedef u8 *(vnet_flow_rewrite_callback_t) (struct flow_report_main *,
+ struct flow_report *,
+ ip4_address_t *,
+ ip4_address_t *, u16);
-typedef vlib_frame_t * (vnet_flow_data_callback_t) (struct flow_report_main *,
- struct flow_report *,
- vlib_frame_t *, u32 *,
- u32);
+typedef vlib_frame_t *(vnet_flow_data_callback_t) (struct flow_report_main *,
+ struct flow_report *,
+ vlib_frame_t *, u32 *,
+ u32);
-typedef union {
- void * as_ptr;
+typedef union
+{
+ void *as_ptr;
uword as_uword;
} opaque_t;
-typedef struct {
+typedef struct
+{
u32 domain_id;
u32 sequence_number;
u16 src_port;
@@ -65,16 +67,17 @@
u16 next_template_no;
} flow_report_stream_t;
-typedef struct flow_report {
+typedef struct flow_report
+{
/* ipfix rewrite, set by callback */
- u8 * rewrite;
+ u8 *rewrite;
u16 template_id;
u32 stream_index;
f64 last_template_sent;
int update_rewrite;
/* Bitmap of fields to send */
- uword * fields_to_send;
+ uword *fields_to_send;
/* Opaque data */
opaque_t opaque;
@@ -86,9 +89,10 @@
vnet_flow_data_callback_t *flow_data_callback;
} flow_report_t;
-typedef struct flow_report_main {
- flow_report_t * reports;
- flow_report_stream_t * streams;
+typedef struct flow_report_main
+{
+ flow_report_t *reports;
+ flow_report_stream_t *streams;
/* ipfix collector ip address, port, our ip address, fib index */
ip4_address_t ipfix_collector;
@@ -110,8 +114,8 @@
f64 vlib_time_0;
/* convenience variables */
- vlib_main_t * vlib_main;
- vnet_main_t * vnet_main;
+ vlib_main_t *vlib_main;
+ vnet_main_t *vnet_main;
} flow_report_main_t;
extern flow_report_main_t flow_report_main;
@@ -119,28 +123,37 @@
extern vlib_node_registration_t flow_report_process_node;
int vnet_flow_report_enable_disable (u32 sw_if_index, u32 table_index,
- int enable_disable);
-typedef struct {
+ int enable_disable);
+typedef struct
+{
vnet_flow_data_callback_t *flow_data_callback;
vnet_flow_rewrite_callback_t *rewrite_callback;
opaque_t opaque;
int is_add;
u32 domain_id;
u16 src_port;
-} vnet_flow_report_add_del_args_t;
+} vnet_flow_report_add_del_args_t;
-int vnet_flow_report_add_del (flow_report_main_t *frm,
- vnet_flow_report_add_del_args_t *a,
- u16 *template_id);
+int vnet_flow_report_add_del (flow_report_main_t * frm,
+ vnet_flow_report_add_del_args_t * a,
+ u16 * template_id);
-clib_error_t * flow_report_add_del_error_to_clib_error (int error);
+clib_error_t *flow_report_add_del_error_to_clib_error (int error);
void vnet_flow_reports_reset (flow_report_main_t * frm);
void vnet_stream_reset (flow_report_main_t * frm, u32 stream_index);
int vnet_stream_change (flow_report_main_t * frm,
- u32 old_domain_id, u16 old_src_port,
- u32 new_domain_id, u16 new_src_port);
+ u32 old_domain_id, u16 old_src_port,
+ u32 new_domain_id, u16 new_src_port);
#endif /* __included_vnet_flow_report_h__ */
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */