|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
37 s =
format (s,
"DNS46_REPLY: pool index %d, disposition %d",
45 #define _(sym,string) string,
80 u32 next0 = DNS46_REQUEST_NEXT_INTERFACE_OUTPUT;
81 u32 next1 = DNS46_REQUEST_NEXT_INTERFACE_OUTPUT;
82 u32 sw_if_index0, sw_if_index1;
103 to_next[0] = bi0 =
from[0];
104 to_next[1] = bi1 =
from[1];
117 if (b0->
flags & VLIB_BUFFER_IS_TRACED)
121 t->sw_if_index = sw_if_index0;
122 t->next_index = next0;
124 if (b1->
flags & VLIB_BUFFER_IS_TRACED)
128 t->sw_if_index = sw_if_index1;
129 t->next_index = next1;
135 to_next, n_left_to_next,
136 bi0, bi1, next0, next1);
145 u32 error0 = DNS46_REQUEST_ERROR_NONE;
154 u32 pool_index0 = ~0;
180 error0 = DNS46_REQUEST_ERROR_UNIMPLEMENTED;
188 error0 = DNS46_REQUEST_ERROR_IP_OPTIONS;
193 flags0 = clib_net_to_host_u16 (d0->flags);
199 error0 = DNS46_REQUEST_ERROR_BAD_REQUEST;
202 if (clib_net_to_host_u16 (d0->qdcount) != 1)
205 error0 = DNS46_REQUEST_ERROR_TOO_MANY_REQUESTS;
209 label0 = (
u8 *) (d0 + 1);
217 _vec_len (name0) -= 1;
229 if (!memcmp (aptr0,
".arpa", 5))
240 sizeof (ip6_address_t));
257 error0 = DNS46_REQUEST_ERROR_RESOLUTION_REQUIRED;
264 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
274 to_next, n_left_to_next,
281 return frame->n_vectors;
296 .name =
"dns4-request",
297 .vector_size =
sizeof (
u32),
323 .name =
"dns6-request",
324 .vector_size =
sizeof (
u32),
static u8 * format_dns46_request_trace(u8 *s, va_list *args)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
int is_enabled
enable / disable flag
nat44_ei_hairpin_src_next_t next_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
#define DNS_QR
query=0, response=1
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
static uword dns4_request_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
vlib_node_registration_t dns46_request_node
int vnet_dns_resolve_name(vlib_main_t *vm, dns_main_t *dm, u8 *name, dns_pending_request_t *t, dns_cache_entry_t **retp)
#define foreach_dns46_request_error
@ DNS46_REQUEST_NEXT_PUNT
#define CLIB_PREFETCH(addr, size, type)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
void vnet_send_dns6_reply(vlib_main_t *vm, dns_main_t *dm, dns_pending_request_t *pr, dns_cache_entry_t *ep, vlib_buffer_t *b0)
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static uword dns46_request_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip6)
void vnet_send_dns4_reply(vlib_main_t *vm, dns_main_t *dm, dns_pending_request_t *pr, dns_cache_entry_t *ep, vlib_buffer_t *b0)
vlib_node_registration_t dns6_request_node
(constructor) VLIB_REGISTER_NODE (dns6_request_node)
@ DNS46_REQUEST_NEXT_IP_LOOKUP
#define CLIB_CACHE_LINE_BYTES
@ DNS_PEER_PENDING_IP_TO_NAME
struct _vlib_node_registration vlib_node_registration_t
#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 uword dns6_request_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
vlib_node_registration_t dns4_request_node
(constructor) VLIB_REGISTER_NODE (dns4_request_node)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
@ DNS_PEER_PENDING_NAME_TO_IP
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u8 * vnet_dns_labels_to_name(u8 *label, u8 *full_text, u8 **parse_from_here)
arc-function for the above.
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
#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).
@ DNS46_REQUEST_NEXT_DROP
vl_api_fib_path_type_t type
static char * dns46_request_error_strings[]
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,...)