FD.io VPP
v17.04.2-2-ga8f93f8
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
FD.io VPP
Vector Packet Processing
Release Notes
Debug CLI
Startup Configuration
Todo List
Node Identifiers
Data Structures
Source
Files
Symbols
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
adj_types.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
#ifndef __ADJ_TYPES_H__
17
#define __ADJ_TYPES_H__
18
19
#include <
vnet/vnet.h
>
20
21
/**
22
* @brief An index for adjacencies.
23
* Alas 'C' is not typesafe enough to b0rk when a u32 is used instead of
24
* an adi_index_t. However, for us humans, we can glean much more intent
25
* from the declaration
26
* foo bar(adj_index_t t);
27
* than we can from
28
* foo bar(u32 t);
29
*/
30
typedef
u32
adj_index_t
;
31
32
/**
33
* @brief Invalid ADJ index - used when no adj is known
34
* likewise blazoned capitals INVALID speak volumes where ~0 does not.
35
*/
36
#define ADJ_INDEX_INVALID ((u32)~0)
37
38
/**
39
* @brief return codes from a adjacency walker callback function
40
*/
41
typedef
enum
adj_walk_rc_t_
42
{
43
ADJ_WALK_RC_STOP
,
44
ADJ_WALK_RC_CONTINUE
,
45
}
adj_walk_rc_t
;
46
47
/**
48
* @brief Call back function when walking adjacencies
49
*/
50
typedef
adj_walk_rc_t
(*
adj_walk_cb_t
)(
adj_index_t
ai,
51
void
*ctx);
52
53
#endif
ADJ_WALK_RC_CONTINUE
Definition:
adj_types.h:44
adj_walk_rc_t
enum adj_walk_rc_t_ adj_walk_rc_t
return codes from a adjacency walker callback function
ADJ_WALK_RC_STOP
Definition:
adj_types.h:43
adj_walk_rc_t_
adj_walk_rc_t_
return codes from a adjacency walker callback function
Definition:
adj_types.h:41
vnet.h
adj_walk_cb_t
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
Definition:
adj_types.h:50
adj_index_t
u32 adj_index_t
An index for adjacencies.
Definition:
adj_types.h:30
u32
unsigned int u32
Definition:
types.h:88
src
vnet
adj
adj_types.h
Generated on Sat Jul 1 2017 12:01:53 for FD.io VPP by
1.8.11