|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
26 #include <vpp/app/version.h>
59 format (s,
"ICMP%s echo id %d seq %d", t->
is_ip6 ?
"6" :
"4", t->
id,
63 s =
format (s,
" (unknown)");
81 #define _(v, n) case SEND_PING_##v: s = format(s, "%s", n);break;
120 return cli_process_id;
126 uword cli_process_id)
137 goto have_found_and_set;
174 if (
ip6->protocol != IP_PROTOCOL_ICMP6)
178 l4_offset =
sizeof (*ip6);
187 icmp46_echo_request_t *icmp46_echo = (icmp46_echo_request_t *) (icmp46 + 1);
189 *out_icmp_id = clib_net_to_host_u16 (icmp46_echo->id);
190 *out_icmp_seq = clib_net_to_host_u16 (icmp46_echo->seq);
209 sizeof (
vnet_buffer (b0)->unused[0]) >
sizeof (nowts),
210 "ping reply timestamp fits within remaining space of vnet_buffer unused data");
284 icmp_id, icmp_seq, b0,
287 if (~0 == cli_process_id)
296 to_next, n_left_to_next,
307 return frame->n_vectors;
346 .name =
"ip6-icmp-echo-reply",
347 .vector_size =
sizeof (
u32),
359 .name =
"ip4-icmp-echo-reply",
360 .vector_size =
sizeof (
u32),
378 u16 *fragment_ids, *fid;
393 sizeof (fragment_ids[0]));
403 icmp46_header_t *icmp0, *icmp1;
408 bi0 = to_next[0] =
from[0];
409 bi1 = to_next[1] =
from[1];
429 sum0 = icmp0->checksum;
430 sum1 = icmp1->checksum;
432 ASSERT (icmp0->type == ICMP4_echo_request);
433 ASSERT (icmp1->type == ICMP4_echo_request);
434 sum0 =
ip_csum_update (sum0, ICMP4_echo_request, ICMP4_echo_reply,
435 icmp46_header_t,
type);
436 sum1 =
ip_csum_update (sum1, ICMP4_echo_request, ICMP4_echo_reply,
437 icmp46_header_t,
type);
438 icmp0->type = ICMP4_echo_reply;
439 icmp1->type = ICMP4_echo_reply;
464 ip0->
ttl = host_config_ttl;
465 ip1->
ttl = host_config_ttl;
482 p0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
483 p1->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
490 icmp46_header_t *icmp0;
494 bi0 = to_next[0] =
from[0];
509 sum0 = icmp0->checksum;
511 ASSERT (icmp0->type == ICMP4_echo_request);
512 sum0 =
ip_csum_update (sum0, ICMP4_echo_request, ICMP4_echo_reply,
513 icmp46_header_t,
type);
514 icmp0->type = ICMP4_echo_reply;
527 ip0->
ttl = host_config_ttl;
538 p0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
545 ICMP4_ERROR_ECHO_REPLIES_SENT,
frame->n_vectors);
547 return frame->n_vectors;
566 .name =
"ip4-icmp-echo-request",
568 .vector_size =
sizeof (
u32),
574 [0] =
"ip4-load-balance",
597 int l4_header_offset,
598 icmp46_echo_request_t * icmp46_echo,
u16 seq_host,
605 l4_header_offset +
sizeof (icmp46_header_t) +
606 offsetof (icmp46_echo_request_t,
data);
611 int payload_offset = 0;
612 for (
i = 0;
i < first_buf_data_len;
i++)
617 int remaining_data_len =
data_len - first_buf_data_len;
618 while (remaining_data_len)
620 int this_buf_data_len =
628 return (
data_len - remaining_data_len);
630 b0->
flags |= VLIB_BUFFER_NEXT_PRESENT;
634 for (
i = 0;
i < this_buf_data_len;
i++)
640 remaining_data_len -= this_buf_data_len;
642 hb->
flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
646 icmp46_echo->time_sent =
now;
647 icmp46_echo->seq = clib_host_to_net_u16 (seq_host);
648 icmp46_echo->id = clib_host_to_net_u16 (id_host);
668 return fib_entry_index;
687 ip46_address_t *pa46)
706 ip6->ip_version_traffic_class_and_flow_label =
707 clib_host_to_net_u32 (0x6 << 28);
708 ip6->payload_length = 0;
709 ip6->protocol = IP_PROTOCOL_ICMP6;
710 ip6->hop_limit = 255;
711 ip6->dst_address = pa46->ip6;
712 ip6->src_address = pa46->ip6;
720 ip4->ip_version_and_header_length = 0x45;
723 ip4->fragment_id = 0;
724 ip4->flags_and_fragment_offset = 0;
726 ip4->protocol = IP_PROTOCOL_ICMP;
727 ip4->src_address = pa46->ip4;
728 ip4->dst_address = pa46->ip4;
759 void *format_addr_func;
765 paddr = &
ip6->src_address;
771 paddr = &
ip4->src_address;
783 icmp46->type =
is_ip6 ? ICMP6_echo_request : ICMP4_echo_request;
785 icmp46->checksum = 0;
787 icmp46_echo_request_t *icmp46_echo = (icmp46_echo_request_t *) (icmp46 + 1);
802 u32 ip_header_length, payload_length_host_byte_order;
803 u32 n_this_buffer, n_bytes_left, n_ip_bytes_this_buffer;
805 void *data_this_buffer;
808 payload_length_host_byte_order =
809 clib_net_to_host_u16 (ip0->
length) - ip_header_length;
814 n_bytes_left = n_this_buffer = payload_length_host_byte_order;
815 data_this_buffer = (
void *) ip0 + ip_header_length;
816 n_ip_bytes_this_buffer =
818 if (n_this_buffer + ip_header_length > n_ip_bytes_this_buffer)
820 n_this_buffer = n_ip_bytes_this_buffer > ip_header_length ?
821 n_ip_bytes_this_buffer - ip_header_length : 0;
826 n_bytes_left -= n_this_buffer;
827 if (n_bytes_left == 0)
847 data_len +
sizeof (icmp46_header_t) + offsetof (icmp46_echo_request_t,
849 u16 total_length = payload_length + l4_offset;
851 icmp46->checksum = 0;
856 ip6->payload_length = clib_host_to_net_u16 (payload_length);
858 int bogus_length = 0;
865 ip4->length = clib_host_to_net_u16 (total_length);
880 u32 lookup_node_index)
893 for (n_to_send =
at_most_a_frame (burst), burst -= n_to_send; n_to_send > 0;
902 while (n_to_send > 1)
951 #define ERROR_OUT(e) do { err = e; goto done; } while (0)
956 ip46_address_t * pa46,
961 int err = SEND_PING_OK;
1012 if (pa46->ip6.as_u32[0] == clib_host_to_net_u32 (0xff020000))
1027 err = SEND_PING_NO_BUFFERS;
1030 if (err != SEND_PING_OK)
1042 u32 burst,
u8 verbose)
1044 ip46_address_t target;
1047 id_host,
data_len, burst, verbose, 1 );
1054 u32 burst,
u8 verbose)
1056 ip46_address_t target;
1059 id_host,
data_len, burst, verbose, 0 );
1068 void *format_addr_func;
1074 paddr = (
void *) &
ip6->src_address;
1078 payload_length = clib_net_to_host_u16 (
ip6->payload_length);
1083 paddr = (
void *) &
ip4->src_address;
1091 icmp46_echo_request_t *icmp_echo = (icmp46_echo_request_t *) (
icmp + 1);
1096 ((
f64) (*dataplane_ts - icmp_echo->time_sent)) / clocks_per_second;
1099 "%d bytes from %U: icmp_seq=%d ttl=%d time=%.4f ms",
1103 clib_host_to_net_u16 (icmp_echo->seq),
ttl, rtt * 1000.0);
1117 u32 ping_burst,
u32 verbose)
1125 static u32 rand_seed = 0;
1140 for (
i = 1;
i <= ping_repeat;
i++)
1150 if (SEND_PING_OK == res)
1151 n_requests += ping_burst;
1159 ping_burst, verbose);
1160 if (SEND_PING_OK == res)
1161 n_requests += ping_burst;
1168 while ((
i <= ping_repeat)
1173 uword event_type, *event_data = 0;
1186 for (ii = 0; ii <
vec_len (event_data); ii++)
1188 u32 bi0 = event_data[ii];
1210 n_requests) ? 0 : 100.0 * ((
float) n_requests -
1211 (float) n_replies) / (float) n_requests;
1213 "Statistics: %u sent, %u received, %f%% packet loss\n",
1214 n_requests, n_replies, loss);
1228 u32 ping_repeat = 5;
1230 u8 ping_ip4, ping_ip6;
1238 ping_ip4 = ping_ip6 = 0;
1259 "expecting IPv4 address but got `%U'",
1273 "expecting IPv6 address but got `%U'",
1281 "expecting IP4/IP6 address `%U'. Usage: ping <addr> [source <intf>] [size <datasz>] [repeat <count>] [verbose]",
1287 if (!ping_ip4 && (
unformat (input,
"ipv4")))
1294 else if (!ping_ip6 && (
unformat (input,
"ipv6")))
1312 "unknown interface `%U'",
1323 "expecting size but got `%U'",
1331 "%d is bigger than maximum allowed payload size %d",
1336 else if (
unformat (input,
"table-id"))
1342 "expecting table-id but got `%U'",
1347 else if (
unformat (input,
"interval"))
1349 if (!
unformat (input,
"%f", &ping_interval))
1353 "expecting interval (floating point number) got `%U'",
1358 else if (
unformat (input,
"repeat"))
1360 if (!
unformat (input,
"%u", &ping_repeat))
1364 "expecting repeat count but got `%U'",
1369 else if (
unformat (input,
"burst"))
1371 if (!
unformat (input,
"%u", &ping_burst))
1375 "expecting burst count but got `%U'",
1380 else if (
unformat (input,
"verbose"))
1398 #define MAX_PING_BURST (10*VLIB_FRAME_SIZE)
1400 #define MAX_PING_BURST (VLIB_FRAME_SIZE)
1408 ping_ip6 ? &a6 : NULL,
sw_if_index, ping_interval,
1409 ping_repeat,
data_len, ping_burst, verbose);
1460 .short_help =
"ping {<ip-addr> | ipv4 <ip4-addr> | ipv6 <ip6-addr>}"
1461 " [ipv4 <ip4-addr> | ipv6 <ip6-addr>] [source <interface>]"
1462 " [size <pktsize:60>] [interval <sec:1>] [repeat <cnt:5>] [table-id <id:0>]"
1463 " [burst <count:1>] [verbose]",
1492 .version = VPP_BUILD_VER,
1493 .description =
"Ping (ping)",
static void vlib_process_signal_event_mt(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
Signal event to process from any thread.
@ ICMP46_ECHO_REPLY_NEXT_DROP
u8 ttl
TTL to use for host generated packets.
ping_run_t * active_ping_runs
static void clib_spinlock_init(clib_spinlock_t *p)
static_always_inline void clear_cli_process_id_by_icmp_id_mt(vlib_main_t *vm, u16 icmp_id)
u32 next_buffer
Next buffer for this linked-list of buffers.
vlib_node_registration_t ip4_lookup_node
(constructor) VLIB_REGISTER_NODE (ip4_lookup_node)
static uword ip6_address_is_link_local_unicast(const ip6_address_t *a)
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
clib_random_buffer_t random_buffer
static u32 ip46_get_resolving_interface(u32 fib_index, ip46_address_t *pa46, int is_ip6)
static uword ip4_icmp_echo_reply_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static_always_inline uword ip46_icmp_echo_reply_inner_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int do_trace, int is_ip6)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static int ip46_fill_l3_header(ip46_address_t *pa46, vlib_buffer_t *b0, int is_ip6)
static_always_inline void set_cli_process_id_by_icmp_id_mt(vlib_main_t *vm, u16 icmp_id, uword cli_process_id)
static void run_ping_ip46_address(vlib_main_t *vm, u32 table_id, ip4_address_t *pa4, ip6_address_t *pa6, u32 sw_if_index, f64 ping_interval, u32 ping_repeat, u32 data_len, u32 ping_burst, u32 verbose)
static u16 init_icmp46_echo_request(vlib_main_t *vm, vlib_buffer_t *b0, int l4_header_offset, icmp46_echo_request_t *icmp46_echo, u16 seq_host, u16 id_host, u64 now, u16 data_len)
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
static vlib_buffer_t * vlib_buffer_copy(vlib_main_t *vm, vlib_buffer_t *b)
nat44_ei_hairpin_src_next_t next_index
ip4_main_t ip4_main
Global ip4 main structure.
static_always_inline void clib_spinlock_lock_if_init(clib_spinlock_t *p)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static uword ip6_icmp_echo_reply_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static void ip46_address_set_ip4(ip46_address_t *ip46, const ip4_address_t *ip)
static u8 * format_ip46_ping_result(u8 *s, va_list *args)
@ ICMP46_ECHO_REPLY_NEXT_PUNT
static send_ip46_ping_result_t send_ip6_ping(vlib_main_t *vm, u32 table_id, ip6_address_t *pa6, u32 sw_if_index, u16 seq_host, u16 id_host, u16 data_len, u32 burst, u8 verbose)
static uword ip4_header_checksum_is_valid(ip4_header_t *i)
void vlib_trace_frame_buffers_only(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, uword n_buffers, uword next_buffer_stride, uword n_buffer_data_bytes_in_trace)
vlib_main_t vlib_node_runtime_t * node
struct ip4_main_t::@378 host_config
Template information for VPP generated packets.
#define clib_error_return(e, args...)
static u16 ip46_fill_icmp_request_at(vlib_main_t *vm, int l4_offset, u16 seq_host, u16 id_host, u16 data_len, vlib_buffer_t *b0, int is_ip6)
u8 * format_icmp_echo_trace(u8 *s, va_list *va)
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
static send_ip46_ping_result_t send_ip4_ping(vlib_main_t *vm, u32 table_id, ip4_address_t *pa4, u32 sw_if_index, u16 seq_host, u16 id_host, u16 data_len, u32 burst, u8 verbose)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static uword vlib_current_process(vlib_main_t *vm)
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
static u32 ip6_fib_index_from_table_id(u32 table_id)
vlib_node_registration_t ip6_lookup_node
(constructor) VLIB_REGISTER_NODE (ip6_lookup_node)
static_always_inline u8 get_icmp_echo_payload_byte(int offset)
static u16 at_most_a_frame(u32 count)
void ip4_icmp_register_type(vlib_main_t *vm, icmp4_type_t type, u32 node_index)
static uword ip4_icmp_echo_request(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static u32 random_u32(u32 *seed)
32-bit random number generator
void icmp6_register_type(vlib_main_t *vm, icmp6_type_t type, u32 node_index)
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,...
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
bool ip4_sas_by_sw_if_index(u32 sw_if_index, const ip4_address_t *dst, ip4_address_t *src)
static bool ip46_set_src_address(u32 sw_if_index, vlib_buffer_t *b0, int is_ip6)
static vlib_node_registration_t ip6_icmp_echo_reply_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_echo_reply_node)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define PING_MAXIMUM_DATA_SIZE
static __clib_warn_unused_result u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
vnet_main_t * vnet_get_main(void)
#define VLIB_NODE_FLAG_TRACE
static ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
static u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define PING_CLI_UNKNOWN_NODE
#define static_always_inline
static void ip46_fix_len_and_csum(vlib_main_t *vm, int l4_offset, u16 data_len, vlib_buffer_t *b0, int is_ip6)
static vlib_node_registration_t ip4_icmp_echo_request_node
(constructor) VLIB_REGISTER_NODE (ip4_icmp_echo_request_node)
vlib_node_registration_t ip6_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip6_rewrite_mcast_node)
@ UNIX_CLI_PROCESS_EVENT_QUIT
A CLI session wants to close.
u32 fib_node_index_t
A typedef of a node index.
static clib_error_t * ping_ip_address(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void print_ip46_icmp_reply(vlib_main_t *vm, u32 bi0, int is_ip6)
static ip4_fib_t * ip4_fib_get(u32 index)
Get the FIB at the given index.
clib_spinlock_t ping_run_check_lock
#define VLIB_CLI_COMMAND(x,...)
u32 ip6_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
u32 fib_entry_get_resolving_interface(fib_node_index_t entry_index)
#define STATIC_ASSERT(truth,...)
@ foreach_ip46_ping_result
struct _vlib_node_registration vlib_node_registration_t
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
u16 current_length
Nbytes between current data and the end of this buffer.
@ ICMP46_ECHO_REPLY_N_NEXT
static void * clib_random_buffer_get_data(clib_random_buffer_t *b, uword n_bytes)
static send_ip46_ping_result_t send_ip46_ping(vlib_main_t *vm, u32 table_id, ip46_address_t *pa46, u32 sw_if_index, u16 seq_host, u16 id_host, u16 data_len, u32 burst, u8 verbose, int is_ip6)
#define vec_free(V)
Free vector's memory (no header).
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
static_always_inline void ip46_post_icmp_reply_event(vlib_main_t *vm, uword cli_process_id, u32 bi0, int is_ip6)
template key/value backing page structure
@ UNIX_CLI_PROCESS_EVENT_READ_READY
A file descriptor has data to be read.
#define PING_DEFAULT_DATA_LEN
u32 local_interface_sw_if_index
unformat_function_t unformat_vnet_sw_interface
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...
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
static u32 ip46_fib_index_from_table_id(u32 table_id, int is_ip6)
static_always_inline u32 vlib_buffer_get_default_data_size(vlib_main_t *vm)
static void ip46_print_buffer_src_address(vlib_main_t *vm, vlib_buffer_t *b0, int is_ip6)
#define VLIB_INIT_FUNCTION(x)
static fib_node_index_t ip46_fib_table_lookup_host(u32 fib_index, ip46_address_t *pa46, int is_ip6)
static_always_inline int ip46_get_icmp_id_and_seq(vlib_main_t *vm, vlib_buffer_t *b0, u16 *out_icmp_id, u16 *out_icmp_seq, int is_ip6)
#define ip4_fib_table_lookup
static_always_inline uword get_cli_process_id_by_icmp_id_mt(vlib_main_t *vm, u16 icmp_id)
#define vec_foreach(var, vec)
Vector iterator.
static vlib_cli_command_t ping_command
(constructor) VLIB_CLI_COMMAND (ping_command)
static u32 ip4_fib_index_from_table_id(u32 table_id)
static vlib_node_registration_t ip4_icmp_echo_reply_node
(constructor) VLIB_REGISTER_NODE (ip4_icmp_echo_reply_node)
#define ip_csum_update(sum, old, new, type, field)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
fib_node_index_t ip6_fib_table_lookup(u32 fib_index, const ip6_address_t *addr, u32 len)
vlib_node_registration_t ip4_icmp_input_node
(constructor) VLIB_REGISTER_NODE (ip4_icmp_input_node)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static u16 ip4_header_checksum(ip4_header_t *i)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
#define PING_DEFAULT_INTERVAL
adj_index_t ip6_link_get_mcast_adj(u32 sw_if_index)
u32 ip6_ll_fib_get(u32 sw_if_index)
For use in the data plane.
u16 ip4_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
static u8 * format_icmp_input_trace(u8 *s, va_list *va)
bool ip6_sas_by_sw_if_index(u32 sw_if_index, const ip6_address_t *dst, ip6_address_t *src)
static clib_error_t * ping_cli_init(vlib_main_t *vm)
static int ip4_header_bytes(const ip4_header_t *i)
static u32 ip46_fib_table_get_index_for_sw_if_index(u32 sw_if_index, int is_ip6, ip46_address_t *pa46)
static f64 vlib_time_now(vlib_main_t *vm)
static_always_inline void clib_spinlock_unlock_if_init(clib_spinlock_t *p)
static u64 clib_cpu_time_now(void)
static vlib_thread_main_t * vlib_get_thread_main()
u32 total_length_not_including_first_buffer
Only valid for first buffer in chain.
vl_api_interface_index_t sw_if_index
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
static int ip46_enqueue_packet(vlib_main_t *vm, vlib_buffer_t *b0, u32 burst, u32 lookup_node_index)
static_always_inline void ip46_echo_reply_maybe_trace_buffer(vlib_main_t *vm, vlib_node_runtime_t *node, uword cli_process_id, u16 id, u16 seq, vlib_buffer_t *b0, int is_ip6)
static u16 ip_csum_fold(ip_csum_t c)
static_always_inline uword ip46_icmp_echo_reply_outer_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip6)
vl_api_fib_path_type_t type
#define vec_del1(v, i)
Delete the element at index I.
static void * ip4_next_header(ip4_header_t *i)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)
static uword random_default_seed(void)
Default random seed (unix/linux user-mode)