FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
lcp.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 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
#ifndef __LCP_H__
16
#define __LCP_H__
17
18
#include <
vlib/vlib.h
>
19
20
#define LCP_NS_LEN 32
21
22
typedef
struct
lcp_main_s
23
{
24
u16
msg_id_base
;
/* API message ID base */
25
u8
default_namespace
[
LCP_NS_LEN
];
/* default namespace if set */
26
int
default_ns_fd
;
27
u8
auto_intf
;
28
/* Set when Unit testing */
29
u8
test_mode
;
30
}
lcp_main_t
;
31
32
extern
lcp_main_t
lcp_main
;
33
34
/**
35
* Get/Set the default namespace for LCP host taps.
36
*/
37
int
lcp_set_default_ns
(
u8
*ns);
38
u8
*
lcp_get_default_ns
(
void
);
/* Returns NULL or shared string */
39
int
lcp_get_default_ns_fd
(
void
);
40
41
#endif
42
43
/*
44
* fd.io coding-style-patch-verification: ON
45
*
46
* Local Variables:
47
* eval: (c-set-style "gnu")
48
* End:
49
*/
lcp_set_default_ns
int lcp_set_default_ns(u8 *ns)
Get/Set the default namespace for LCP host taps.
Definition:
lcp.c:48
vlib.h
lcp_get_default_ns
u8 * lcp_get_default_ns(void)
Definition:
lcp.c:27
lcp_main_s::msg_id_base
u16 msg_id_base
Definition:
lcp.h:24
lcp_get_default_ns_fd
int lcp_get_default_ns_fd(void)
Definition:
lcp.c:37
u16
unsigned short u16
Definition:
types.h:57
lcp_main_s
Definition:
lcp.h:22
lcp_main_s::auto_intf
u8 auto_intf
Definition:
lcp.h:27
lcp_main_s::default_ns_fd
int default_ns_fd
Definition:
lcp.h:26
lcp_main_s::default_namespace
u8 default_namespace[LCP_NS_LEN]
Definition:
lcp.h:25
lcp_main_s::test_mode
u8 test_mode
Definition:
lcp.h:29
LCP_NS_LEN
#define LCP_NS_LEN
Definition:
lcp.h:20
lcp_main_t
struct lcp_main_s lcp_main_t
u8
unsigned char u8
Definition:
types.h:56
lcp_main
lcp_main_t lcp_main
Definition:
lcp.c:24
src
plugins
linux-cp
lcp.h
Generated on Sat Jan 8 2022 10:04:02 for FD.io VPP by
1.8.17