FD.io VPP  v21.06-3-gbb25fbf28
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 <lisp/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  */
ip_address
Definition: ip_types.h:79
lisp_gpe_next_protocol_e
lisp_gpe_next_protocol_e
Definition: lisp_gpe_packet.h:132
lisp_gpe_tunnel_unlock
void lisp_gpe_tunnel_unlock(index_t lgti)
Definition: lisp_gpe_tunnel.c:194
lisp_gpe.h
LISP-GPE definitions.
lisp_gpe_tunnel_t_::fib_entry_index
fib_node_index_t fib_entry_index
the FIB entry through which the remote rloc is reachable s
Definition: lisp_gpe_tunnel.h:63
index_t
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:43
fib_node_index_t
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
lisp_gpe_tunnel_build_rewrite
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_tunnel_key_t_::rmt
ip_address_t rmt
Definition: lisp_gpe_tunnel.h:37
locator_pair
Definition: lisp_types.h:326
lisp_gpe_tunnel_key_t_::fib_index
u32 fib_index
Definition: lisp_gpe_tunnel.h:39
format_lisp_gpe_tunnel
u8 * format_lisp_gpe_tunnel(u8 *s, va_list *args)
Format LISP-GPE tunnel.
Definition: lisp_gpe_tunnel.c:217
lisp_gpe_packet.h
LISP-GPE packet header structure.
u32
unsigned int u32
Definition: types.h:88
lisp_gpe_tunnel_t_::key
lisp_gpe_tunnel_key_t * key
RLOC pair and rloc fib_index.
Definition: lisp_gpe_tunnel.h:53
lisp_gpe_tunnel_t
struct lisp_gpe_tunnel_t_ lisp_gpe_tunnel_t
A LISP GPE Tunnel.
lisp_gpe_adjacency_t_
A LISP GPE Adjacency.
Definition: lisp_gpe_adjacency.h:43
lisp_gpe_tunnel_key_t_::lcl
ip_address_t lcl
Definition: lisp_gpe_tunnel.h:38
lisp_gpe_tunnel_t_::locks
u32 locks
number of reference counting locks
Definition: lisp_gpe_tunnel.h:58
u8
unsigned char u8
Definition: types.h:56
lisp_gpe_tunnel_t_
A LISP GPE Tunnel.
Definition: lisp_gpe_tunnel.h:48
lisp_gpe_tunnel_find_or_create_and_lock
index_t lisp_gpe_tunnel_find_or_create_and_lock(const locator_pair_t *pair, u32 rloc_fib_index)
Definition: lisp_gpe_tunnel.c:148
lisp_gpe_tunnel_key_t
struct lisp_gpe_tunnel_key_t_ lisp_gpe_tunnel_key_t
A Key for a tunnel.
lisp_gpe_tunnel_get
const lisp_gpe_tunnel_t * lisp_gpe_tunnel_get(index_t lgti)
Definition: lisp_gpe_tunnel.c:210
lisp_gpe_tunnel_key_t_
A Key for a tunnel.
Definition: lisp_gpe_tunnel.h:35