2 * Copyright (c) 2015 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
15 #ifndef __included_oam_h__
16 #define __included_oam_h__
18 #include <vlib/vlib.h>
19 #include <vnet/vnet.h>
20 #include <vnet/ip/ip.h>
21 #include <vnet/interface.h>
23 /* 36 octets, make a note of it... */
24 typedef CLIB_PACKED(struct {
32 typedef CLIB_PACKED(struct {
35 }) oam_template_copy_t;
38 OAM_STATE_UNKNOWN = 0,
44 ip4_address_t src_address;
45 ip4_address_t dst_address;
53 oam_template_t * template;
58 oam_target_t * targets;
59 uword * target_by_address_and_fib_id;
61 /* Config parameters */
65 /* random number seed */
69 /* oam packet template */
70 vlib_packet_template_t packet_template;
73 vlib_main_t * vlib_main;
74 vnet_main_t * vnet_main;
77 int vpe_oam_add_del_target (ip4_address_t *src_address,
78 ip4_address_t *dst_address,
79 u32 fib_id, int is_add);
81 #endif /* __included_oam_h__ */