FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
lisp_gpe_tunnel.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 /**
16  * @file
17  * @brief Common utility functions for IPv4, IPv6 and L2 LISP-GPE tunnels.
18  *
19  */
20 
21 #ifndef LISP_GPE_TUNNEL_H__
22 #define LISP_GPE_TUNNEL_H__
23 
24 #include <vnet/lisp-gpe/lisp_gpe.h>
26 
27 /**
28  * Forward declaration
29  */
31 
32 /**
33  * A Key for a tunnel
34  */
35 typedef struct lisp_gpe_tunnel_key_t_
36 {
41 
42 /**
43  * @brief A LISP GPE Tunnel.
44  *
45  * A tunnel represents an associatation between a local and remote RLOC.
46  * As such it represents a unique LISP rewrite.
47  */
48 typedef struct lisp_gpe_tunnel_t_
49 {
50  /**
51  * RLOC pair and rloc fib_index. This is the tunnel's key.
52  */
54 
55  /**
56  * number of reference counting locks
57  */
59 
60  /**
61  * the FIB entry through which the remote rloc is reachable
62  s */
65 
67  pair,
68  u32 rloc_fib_index);
69 
70 extern void lisp_gpe_tunnel_unlock (index_t lgti);
71 
72 extern const lisp_gpe_tunnel_t *lisp_gpe_tunnel_get (index_t lgti);
73 
75  const struct lisp_gpe_adjacency_t_
76  *ladj,
78  payload_proto);
79 extern u8 *format_lisp_gpe_tunnel (u8 * s, va_list * args);
80 
81 #endif
82 
83 /*
84  * fd.io coding-style-patch-verification: ON
85  *
86  * Local Variables:
87  * eval: (c-set-style "gnu")
88  * End:
89  */
boost::asio::ip::address ip_address_t
Definition: api_types.hpp:25
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:41
unsigned char u8
Definition: types.h:56
A Key for a tunnel.
fib_node_index_t fib_entry_index
the FIB entry through which the remote rloc is reachable s
unsigned int u32
Definition: types.h:88
const lisp_gpe_tunnel_t * lisp_gpe_tunnel_get(index_t lgti)
struct lisp_gpe_tunnel_t_ lisp_gpe_tunnel_t
A LISP GPE Tunnel.
LISP-GPE packet header structure.
struct lisp_gpe_tunnel_key_t_ lisp_gpe_tunnel_key_t
A Key for a tunnel.
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
u32 locks
number of reference counting locks
lisp_gpe_tunnel_key_t * key
RLOC pair and rloc fib_index.
void lisp_gpe_tunnel_unlock(index_t lgti)
A LISP GPE Adjacency.
u8 * lisp_gpe_tunnel_build_rewrite(const lisp_gpe_tunnel_t *lgt, const struct lisp_gpe_adjacency_t_ *ladj, lisp_gpe_next_protocol_e payload_proto)
lisp_gpe_next_protocol_e
index_t lisp_gpe_tunnel_find_or_create_and_lock(const locator_pair_t *pair, u32 rloc_fib_index)
u8 * format_lisp_gpe_tunnel(u8 *s, va_list *args)
Format LISP-GPE tunnel.
A LISP GPE Tunnel.
LISP-GPE definitions.