FD.io VPP
v19.01-18-gcbd68cb
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Data Structures
Source
Files
Symbols
FD.io VPP
Vector Packet Processing
Release Notes
DHCPv6 prefix delegation
IPFIX support
Introduction
Statistics
VMWARE vmxnet3 device driver plugin
VPP interface stats client
How to build a vpp dispatch trace aware Wireshark
Debug CLI
Startup Configuration
Todo List
Node Identifiers
Modules
Namespaces
Data Structures
Source
Files
Symbols
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
mactime.api
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 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
This file defines vpp mactime control-plane API messages
18
*/
19
option
version
=
"1.0.0"
;
20
21
/** \brief api to enable or disable the time-based src mac filter on
22
an interface
23
*/
24
25
autoreply define
mactime_enable_disable
26
{
27
u32
client_index
;
/**< client index, from api_main */
28
u32
context
;
/**< application context */
29
u8
enable_disable
;
/**< enable=1, disable=0 */
30
u32
sw_if_index
;
/**< the interface handle */
31
};
32
33
/** \brief a time range structure
34
* times are in double-precision fp seconds since 1/1/1970,
35
* which was a Thursday.
36
*/
37
typeonly define time_range
38
{
39
f64
start
;
/**< start of the time range */
40
f64
end
;
/**< end of the time range */
41
};
42
43
/** \brief configure per src-mac time ranges
44
*
45
* Usage:
46
* to create a static allow entry:
47
* set mac_address, device_name, is_add=1, and allow=1.
48
*
49
* to create a static drop entry:
50
* set mac_address, device_name, is_add=1, and drop=1.
51
*
52
* to create a (time-range-based) dynamic allow entry:
53
* set mac_address, device_name, is_add=1, set allow=1.
54
* set count = number of ranges
55
* set each range start/end in seconds since Sunday began
56
* As in: start/end >= 0.0 && start/end < 7.0 *86400.0
57
*
58
* to create a (time-range-based) dynamic drop entry:
59
* Same procedure to create a dynamic allow entry,
60
* set drop=1 instead of allow=1
61
*
62
* to delete a per src-mac entry (of any kind)
63
* set mac_address, is_add=0
64
* note: deletes all ranges.
65
*
66
* See mactime_test.c:api_mactime_add_del_range(...) for
67
* a working example.
68
*/
69
70
autoreply define mactime_add_del_range
71
{
72
u32
client_index
;
/**< client index, from api_main */
73
u32
context
;
/**< application context */
74
u8
is_add
;
/**< add=1, del=0 */
75
u8
drop
;
/**< drop flag */
76
u8
allow
;
/**< allow flag */
77
u8
mac_address
[6];
/**< src mac address */
78
u8
device_name[64];
/**< device name */
79
u32
count
;
/**< number of time ranges to follow */
80
/** time ranges, in seconds since Sunday began */
81
vl_api_time_range_t
ranges[
count
];
82
};
83
84
/*
85
* Local Variables:
86
* eval: (c-set-style "gnu")
87
* End:
88
*/
vl_api_mactime_add_del_range_t::drop
u8 drop
drop flag
Definition:
mactime.api:75
vl_api_time_range_t
a time range structure times are in double-precision fp seconds since 1/1/1970, which was a Thursday...
Definition:
mactime.api:37
mactime_enable_disable
int mactime_enable_disable(mactime_main_t *mm, u32 sw_if_index, int enable_disable)
Action function shared between message handler and debug CLI.
Definition:
mactime.c:86
vl_api_mactime_add_del_range_t::is_add
u8 is_add
add=1, del=0
Definition:
mactime.api:74
vl_api_time_range_t::end
f64 end
end of the time range
Definition:
mactime.api:40
vl_api_mactime_enable_disable_t::client_index
u32 client_index
client index, from api_main
Definition:
mactime.api:27
u8
unsigned char u8
Definition:
types.h:56
f64
double f64
Definition:
types.h:142
vl_api_mactime_add_del_range_t::count
u32 count
number of time ranges to follow
Definition:
mactime.api:79
u32
unsigned int u32
Definition:
types.h:88
vl_api_mactime_add_del_range_t::client_index
u32 client_index
client index, from api_main
Definition:
mactime.api:72
vl_api_mactime_add_del_range_t::context
u32 context
application context
Definition:
mactime.api:73
version
option version
Definition:
mactime.api:19
vl_api_time_range_t::start
f64 start
start of the time range
Definition:
mactime.api:39
count
size_t count
Definition:
vapi.c:47
mac_address
u8 mac_address[6]
Definition:
ethernet_types.api:17
vl_api_mactime_enable_disable_t::context
u32 context
application context
Definition:
mactime.api:28
vl_api_mactime_enable_disable_t::sw_if_index
u32 sw_if_index
the interface handle
Definition:
mactime.api:30
vl_api_mactime_enable_disable_t::enable_disable
u8 enable_disable
enable=1, disable=0
Definition:
mactime.api:29
vl_api_mactime_add_del_range_t::allow
u8 allow
allow flag
Definition:
mactime.api:76
src
plugins
mactime
mactime.api
Generated on Wed Mar 6 2019 23:00:00 for FD.io VPP by
1.8.11