From 9770e20a9eded6f593dc71646ffa9f34940d794c Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 6 Jul 2016 10:29:27 -0400 Subject: Add some doxygen tags Also add an index of node names Change-Id: Id65c2e607976d8bad73deb738035a471be077196 Signed-off-by: Dave Barach Signed-off-by: Chris Luke --- vnet/vnet/ip/ip4_forward.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'vnet') diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c index 939835ae..45699b12 100644 --- a/vnet/vnet/ip/ip4_forward.c +++ b/vnet/vnet/ip/ip4_forward.c @@ -45,6 +45,10 @@ #include /* for srp_hw_interface_class */ #include /* for API error numbers */ +/** \file + vnet ip4 forwarding +*/ + /* This is really, really simple but stupid fib. */ u32 ip4_fib_lookup_with_table (ip4_main_t * im, u32 fib_index, @@ -1002,6 +1006,38 @@ ip4_lookup_inline (vlib_main_t * vm, return frame->n_vectors; } +/** \brief IPv4 lookup node. + @node ip4-lookup + + This is the main IPv4 lookup dispatch node. + + @param vm vlib_main_t corresponding to the current thread + @param node vlib_node_runtime_t + @param frame vlib_frame_t whose contents should be dispatched + + @par Graph mechanics: buffer metadata, next index usage + + @em Uses: + - vnet_buffer(b)->sw_if_index[VLIB_RX] + - Indicates the @c sw_if_index value of the interface that the + packet was received on. + - vnet_buffer(b)->sw_if_index[VLIB_TX] + - When the value is @c ~0 then the node performs a longest prefix + match (LPM) for the packet destination address in the FIB attached + to the receive interface. + - Otherwise perform LPM for the packet destination address in the + indicated FIB. In this case [VLIB_TX] is a FIB index + value (0, 1, ...) and not a VRF id. + + @em Sets: + - vnet_buffer(b)->ip.adj_index[VLIB_TX] + - The lookup result adjacency index. + + Next Index: + - Dispatches the packet to the node index found in + ip_adjacency_t @c adj->lookup_next_index + (where @c adj is the lookup result adjacency). +*/ static uword ip4_lookup (vlib_main_t * vm, vlib_node_runtime_t * node, -- cgit 1.2.3-korg