35 #define _(sym,string) string, 59 u32 n_left_from, *from;
65 while (n_left_from > 0)
81 if (b0->
flags & VLIB_BUFFER_IS_TRACED)
107 .vector_size =
sizeof (
u32),
129 f64 poll_time_remaining;
130 uword event_type, *event_data = 0;
133 poll_time_remaining = 86400.0;
138 poll_time_remaining =
176 poll_time_remaining = 10.0;
180 poll_time_remaining = 86400.0;
193 poll_time_remaining = 10.0;
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
static void vlib_set_next_frame_buffer(vlib_main_t *vm, vlib_node_runtime_t *node, u32 next_index, u32 buffer_index)
void vnet_cdp_create_periodic_process(cdp_main_t *cmp)
static uword cdp_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
cdp_error_t cdp_input(vlib_main_t *vm, vlib_buffer_t *b0, u32 bi0)
u16 current_length
Nbytes between current data and the end of this buffer.
u32 cdp_process_node_index
vlib_error_t * errors
Vector of errors for this node.
static uword vlib_process_suspend_time_is_zero(f64 dt)
Returns TRUE if a process suspend time is less than 10us.
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
#define clib_memcpy(d, s, n)
void cdp_periodic(vlib_main_t *vm)
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type...
static vlib_node_registration_t cdp_input_node
(constructor) VLIB_REGISTER_NODE (cdp_input_node)
u8 * cdp_input_format_trace(u8 *s, va_list *args)
vl_api_fib_path_type_t type
vlib_error_t error
Error code for buffers to be enqueued to error handler.
u32 vlib_process_create(vlib_main_t *vm, char *name, vlib_node_function_t *f, u32 log2_n_stack_bytes)
Create a vlib process.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static char * cdp_error_strings[]
#define foreach_cdp_error
#define VLIB_REGISTER_NODE(x,...)
#define clib_warning(format, args...)
void hdlc_register_input_protocol(vlib_main_t *vm, hdlc_protocol_t protocol, u32 node_index)
vlib_main_t vlib_node_runtime_t * node
void ethernet_register_input_type(vlib_main_t *vm, ethernet_type_t type, u32 node_index)
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
void snap_register_input_protocol(vlib_main_t *vm, char *name, u32 ieee_oui, u16 protocol, u32 node_index)
int cdp_protocol_registered
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static uword cdp_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.