FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
arping.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 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 included_arping_arping_h
16
#define included_arping_arping_h
17
18
#include <
vnet/ip/ip_types.h
>
19
#include <
vnet/ethernet/arp_packet.h
>
20
21
#define ARPING_DEFAULT_INTERVAL 1.0
22
#define ARPING_DEFAULT_REPEAT 1
23
24
typedef
struct
arping6_ip6_reply_t
25
{
26
mac_address_t
mac
;
27
ip6_address_t
ip6
;
28
}
arping6_ip6_reply_t
;
29
30
typedef
CLIB_PACKED
(
union
arping46_reply_ {
31
ethernet_arp_ip4_over_ethernet_address_t from4;
32
arping6_ip6_reply_t
from6;
33
}) arping46_reply_t;
34
35
typedef
struct
arping_intf_t
36
{
37
CLIB_CACHE_LINE_ALIGN_MARK
(cacheline0);
38
f64
interval
;
39
u32
repeat
;
40
ip_address_t
address
;
41
42
arping46_reply_t
recv
;
43
u32
reply_count
;
44
}
arping_intf_t
;
45
46
typedef
struct
arping_main_t
47
{
48
arping_intf_t
*
arping_interfaces
;
49
arping_intf_t
**
interfaces
;
50
u16
msg_id_base
;
51
}
arping_main_t
;
52
53
typedef
struct
arping_args_t
54
{
55
ip_address_t
address
;
56
u32
sw_if_index
;
57
u32
repeat
;
58
f64
interval
;
59
u8
is_garp
;
60
u8
silence
;
61
62
/* reply */
63
i32
rv
;
64
u32
reply_count
;
65
arping46_reply_t
recv
;
66
clib_error_t
*
error
;
67
}
arping_args_t
;
68
69
extern
arping_main_t
arping_main
;
70
71
extern
clib_error_t
*
arping_plugin_api_hookup
(
vlib_main_t
*
vm
);
72
extern
void
arping_run_command
(
vlib_main_t
*
vm
,
arping_args_t
*args);
73
74
#endif
/* included_arping_arping_h */
ip_address
Definition:
ip_types.h:79
arping6_ip6_reply_t::ip6
ip6_address_t ip6
Definition:
arping.h:27
arping_args_t::address
ip_address_t address
Definition:
arping.h:55
arping_args_t::rv
i32 rv
Definition:
arping.h:63
arping6_ip6_reply_t
Definition:
arping.h:24
arping_intf_t
Definition:
arping.h:35
arping_intf_t::reply_count
u32 reply_count
Definition:
arping.h:43
arping_args_t::repeat
u32 repeat
Definition:
arping.h:57
u16
unsigned short u16
Definition:
types.h:57
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition:
nat44_ei.c:3047
arping_args_t::silence
u8 silence
Definition:
arping.h:60
arping_main_t
Definition:
arping.h:46
i32
signed int i32
Definition:
types.h:77
arping_intf_t::recv
arping46_reply_t recv
Definition:
arping.h:42
arping_intf_t::address
ip_address_t address
Definition:
arping.h:40
arping_intf_t
struct arping_intf_t arping_intf_t
arping_args_t
Definition:
arping.h:53
arping_args_t::reply_count
u32 reply_count
Definition:
arping.h:64
arping_main_t::interfaces
arping_intf_t ** interfaces
Definition:
arping.h:49
f64
double f64
Definition:
types.h:142
arping_args_t
struct arping_args_t arping_args_t
ip_types.h
arping_main_t
struct arping_main_t arping_main_t
arping_args_t::interval
f64 interval
Definition:
arping.h:58
arping_main
arping_main_t arping_main
Definition:
arping.c:26
arping_plugin_api_hookup
clib_error_t * arping_plugin_api_hookup(vlib_main_t *vm)
Definition:
arping_api.c:67
arping_intf_t::interval
f64 interval
Definition:
arping.h:38
arping_args_t::sw_if_index
u32 sw_if_index
Definition:
arping.h:56
u32
unsigned int u32
Definition:
types.h:88
arping6_ip6_reply_t::mac
mac_address_t mac
Definition:
arping.h:26
arping_main_t::msg_id_base
u16 msg_id_base
Definition:
arping.h:50
arping_intf_t::CLIB_CACHE_LINE_ALIGN_MARK
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
arping6_ip6_reply_t
struct arping6_ip6_reply_t arping6_ip6_reply_t
mac_address_t_
Definition:
mac_address.h:21
arping_args_t::is_garp
u8 is_garp
Definition:
arping.h:59
vlib_main_t
Definition:
main.h:102
u8
unsigned char u8
Definition:
types.h:56
clib_error_t
Definition:
clib_error.h:21
arp_packet.h
arping_args_t::recv
arping46_reply_t recv
Definition:
arping.h:65
arping_intf_t::repeat
u32 repeat
Definition:
arping.h:39
arping_args_t::error
clib_error_t * error
Definition:
arping.h:66
arping_run_command
void arping_run_command(vlib_main_t *vm, arping_args_t *args)
Definition:
arping.c:634
arping_main_t::arping_interfaces
arping_intf_t * arping_interfaces
Definition:
arping.h:48
CLIB_PACKED
typedef CLIB_PACKED(union arping46_reply_ { ethernet_arp_ip4_over_ethernet_address_t from4;arping6_ip6_reply_t from6;}) arping46_reply_t
src
plugins
arping
arping.h
Generated on Sat Jan 8 2022 10:03:39 for FD.io VPP by
1.8.17