aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/hdlc/hdlc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/hdlc/hdlc.h')
-rw-r--r--src/vnet/hdlc/hdlc.h37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/vnet/hdlc/hdlc.h b/src/vnet/hdlc/hdlc.h
index 8407d39dda7..a2bd6e928b2 100644
--- a/src/vnet/hdlc/hdlc.h
+++ b/src/vnet/hdlc/hdlc.h
@@ -46,16 +46,18 @@
extern vnet_hw_interface_class_t hdlc_hw_interface_class;
-typedef enum {
+typedef enum
+{
#define hdlc_error(n,s) HDLC_ERROR_##n,
#include <vnet/hdlc/error.def>
#undef hdlc_error
HDLC_N_ERROR,
} hdlc_error_t;
-typedef struct {
+typedef struct
+{
/* Name (a c string). */
- char * name;
+ char *name;
/* HDLC protocol type in host byte order. */
hdlc_protocol_t protocol;
@@ -67,19 +69,20 @@ typedef struct {
u32 next_index;
} hdlc_protocol_info_t;
-typedef struct {
- vlib_main_t * vlib_main;
+typedef struct
+{
+ vlib_main_t *vlib_main;
- hdlc_protocol_info_t * protocol_infos;
+ hdlc_protocol_info_t *protocol_infos;
/* Hash tables mapping name/protocol to protocol info index. */
- uword * protocol_info_by_name, * protocol_info_by_protocol;
+ uword *protocol_info_by_name, *protocol_info_by_protocol;
} hdlc_main_t;
always_inline hdlc_protocol_info_t *
hdlc_get_protocol_info (hdlc_main_t * em, hdlc_protocol_t protocol)
{
- uword * p = hash_get (em->protocol_info_by_protocol, protocol);
+ uword *p = hash_get (em->protocol_info_by_protocol, protocol);
return p ? vec_elt_at_index (em->protocol_infos, p[0]) : 0;
}
@@ -88,8 +91,7 @@ extern hdlc_main_t hdlc_main;
/* Register given node index to take input for given hdlc type. */
void
hdlc_register_input_type (vlib_main_t * vm,
- hdlc_protocol_t protocol,
- u32 node_index);
+ hdlc_protocol_t protocol, u32 node_index);
format_function_t format_hdlc_protocol;
format_function_t format_hdlc_header;
@@ -107,8 +109,8 @@ unformat_function_t unformat_pg_hdlc_header;
always_inline void
hdlc_setup_node (vlib_main_t * vm, u32 node_index)
{
- vlib_node_t * n = vlib_get_node (vm, node_index);
- pg_node_t * pn = pg_get_node (node_index);
+ vlib_node_t *n = vlib_get_node (vm, node_index);
+ pg_node_t *pn = pg_get_node (node_index);
n->format_buffer = format_hdlc_header_with_length;
n->unformat_buffer = unformat_hdlc_header;
@@ -117,7 +119,14 @@ hdlc_setup_node (vlib_main_t * vm, u32 node_index)
void
hdlc_register_input_protocol (vlib_main_t * vm,
- hdlc_protocol_t protocol,
- u32 node_index);
+ hdlc_protocol_t protocol, u32 node_index);
#endif /* included_hdlc_h */
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */