|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
26 u32 *pool_indices = 0;
27 int current_status = 99;
50 s =
format (s,
"{%smactime%s: [\n", q, q);
65 if (
now >= start0 &&
now <= end0)
96 s =
format (s,
"{%smac_address%s: %s%s%s, ", q, q, q, macstring, q);
98 switch (current_status)
101 status_string =
"static drop";
104 status_string =
"static allow";
107 status_string =
"dynamic drop";
110 status_string =
"dynamic allow";
113 status_string =
"d-quota inact";
116 status_string =
"d-quota activ";
119 status_string =
"code bug!";
125 s =
format (s,
"%sname%s: %s%s%s, %sstatus%s: %s%s%s,",
126 q, q, q, dp->
device_name, q, q, q, q, status_string, q);
127 s =
format (s,
"%sallow_pkts%s: %lld,", q, q, allow.
packets);
128 s =
format (s,
"%sallow_bytes%s: %lld,", q, q, allow.
bytes);
137 s =
format (s,
", %sip4_address%s: %s%U%s", q, q,
160 void (*fp) (
void *,
char *, int);
164 "http_static_server_register_builtin_handler");
A representation of an IP neighbour/peer.
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
#define MACTIME_DEVICE_FLAG_DYNAMIC_DROP
@ HTTP_BUILTIN_METHOD_GET
u32 data_offset
Current data send offset.
const ip_address_t * ip_neighbor_get_ip(const ip_neighbor_t *ipn)
http_builtin_method_type_t
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
ip_neighbor_t * ip_neighbor_get(index_t ipni)
#define MACTIME_DEVICE_FLAG_DYNAMIC_ALLOW_QUOTA
vlib_combined_counter_main_t drop_counters
#define MACTIME_DEVICE_FLAG_STATIC_DROP
Always drop packets from this device.
#define MACTIME_DEVICE_FLAG_DYNAMIC_ALLOW
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vnet_hw_if_output_node_runtime_t * r
u8 * format_mac_address(u8 *s, va_list *args)
#define pool_foreach(VAR, POOL)
Iterate through pool.
#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).
Combined counter to hold both packets and byte differences.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
clib_timebase_range_t * ranges
static unsigned char * print(const cJSON *const item, cJSON_bool format, const internal_hooks *const hooks)
int free_data
Need to free data in detach_cache_entry.
const mac_address_t * ip_neighbor_get_mac(const ip_neighbor_t *ipn)
void ip_neighbor_walk(ip_address_family_t af, u32 sw_if_index, ip_neighbor_walk_cb_t cb, void *ctx)
vlib_combined_counter_main_t allow_counters
static walk_rc_t mactime_ip_neighbor_copy(index_t ipni, void *ctx)
u8 * data
File data, a vector.
u32 cache_pool_index
File cache pool index.
counter_t packets
packet counter
mactime_device_t * devices
static void vlib_get_combined_counter(const vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of per-thr...
#define vec_free(V)
Free vector's memory (no header).
void mactime_url_init(vlib_main_t *vm)
description fragment has unexpected format
format_function_t format_ip46_address
mactime_main_t mactime_main
static f64 clib_timebase_now(clib_timebase_t *tb)
counter_t bytes
byte counter
#define MACTIME_DEVICE_FLAG_STATIC_ALLOW
#define clib_warning(format, args...)
__clib_export f64 clib_timebase_find_sunday_midnight(f64 start_time)
static int handle_get_mactime(http_builtin_method_type_t reqtype, u8 *request, http_session_t *hs)
enum walk_rc_t_ walk_rc_t
Walk return code.
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)