aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap-TLDK.sh
blob: 7a26e88db055f45023f985bab770c71b36324527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#!/bin/bash
# Copyright (c) 2017 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -x

cat /etc/hostname
cat /etc/hosts

ARCHIVE_ARTIFACTS=(log.html output.xml report.html)

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PYTHONPATH=${SCRIPT_DIR}

export DEBIAN_FRONTEND=noninteractive
sudo apt-get -y update
sudo apt-get -y install libpython2.7-dev python-virtualenv

VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30")
VIRL_SERVER=""

VIRL_USERNAME=jenkins-in
VIRL_PKEY=priv_key
VIRL_SERVER_STATUS_FILE="status"
VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"

SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"

DPDK_VERSION=16.11.1
DPDK_DIR=dpdk
DPDK_PACKAGE=${DPDK_DIR}"-"${DPDK_VERSION}.tar.xz

function ssh_do() {
    echo
    echo "### "  ssh $@
    ssh ${SSH_OPTIONS} $@
}

rm -f ${VIRL_PKEY}
cat > ${VIRL_PKEY} <<EOF
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA+IHXq87GcqMR1C47rzx6Cbip5Ghq8pKrbqKrP5Nf41HcYrT6
GOXl9nFWKsMOzIlIn+8y7Il27eZh7csQGApbg8QLiHMtcYEmWNzKZpkqg4nuAPxX
VXwlKgnKX902SrET9Gp9TDayiHtCRWVfrlPPPSA0UEXW6BjLN/uHJ+W/Xzrrab+9
asBVa05vT2W6n0KJ66zfCaeDM912mQ6SttscAwFoWDmdHlegiVqrlIG2ABxOvxxz
L3dM3iSmlmQlzv9bThjo+nI4KFYh6m5wrZmAo5r/4q9CIJc21HVnTqkGOWJIZz6J
73lePJVSq5gYqaoGw3swFEA/MDkOx7baWKSoLQIDAQABAoIBAQCNBeolNp+JWJ76
gQ4fwLsknyXSV6sxYyhkDW4PEwwcTU06uqce0AAzXVffxne0fMe48x47+zqBgPbb
4huM+Pu8B9nfojUMr5TaYtl9Zbgpk3F8H7dT7LKOa6XrxvZTZrADSRc30+Z26zPN
e9zTaf42Gvt0/l0Zs1BHwbaOXqO+XuwJ3/F9Sf3PQYWXD3EOWjpHDP/X/1vAs6lV
SLkm6J/9KKE1m6I6LTYjIXuYt4SXybW6N2TSy54hhQtYcDUnIU2hR/PHVWKrGA0J
kELgrtTNTdbML27O5gFWU4PLUEYTZ9fN11D6qUZKxLcPOiPPHXkiILMRCCnG5DYI
ksBAU/YlAoGBAPxZO9VO18TYc8THV1nLKcvT2+1oSs1UcA2wNQMU55t910ZYinRa
MRwUhMOf8Mv5wOeiZaRICQB1PnVWtDVmGECgPpK6jUxqAwn8rgJcnoafLGL5YKMY
RVafTe6N5LXgCaOcJrk21wxs6v7ninEbUxxc575urOvZMBkymDw91dwbAoGBAPwa
YRhKhrzFKZzdK0RadVjnxKvolUllpoqqg3XuvmeAJHAOAnaOgVWq68NAcp5FZJv0
2D2Up7TX8pjf9MofP1SJbcraKBpK4NzfNkA0dSdEi+FhVofAJ9umB2o5LW1n7sab
UIrjsdzSJK/9Zb9yTTHPyibYzNEgaJV1HsbxfEFXAoGAYO2RmvRm0phll18OQVJV
IpKk9kLKAKZ/R/K32hAsikBC8SVPQTPniyaifFWx81diblalff2hX4ipTf7Yx24I
wMIMZuW7Im/R7QMef4+94G3Bad7p7JuE/qnAEHJ2OBnu+eYfxaK35XDsrq6XMazS
NqHE7hOq3giVfgg+C12hCKMCgYEAtu9dbYcG5owbehxzfRI2/OCRsjz/t1bv1seM
xVMND4XI6xb/apBWAZgZpIFrqrWoIBM3ptfsKipZe91ngBPUnL9s0Dolx452RVAj
yctHB8uRxWYgqDkjsxtzXf1HnZBBkBS8CUzYj+hdfuddoeKLaY3invXLCiV+PpXS
U4KAK9kCgYEAtSv0m5+Fg74BbAiFB6kCh11FYkW94YI6B/E2D/uVTD5dJhyEUFgZ
cWsudXjMki8734WSpMBqBp/J8wG3C9ZS6IpQD+U7UXA+roB7Qr+j4TqtWfM+87Rh
maOpG56uAyR0w5Z9BhwzA3VakibVk9KwDgZ29WtKFzuATLFnOtCS46E=
-----END RSA PRIVATE KEY-----
EOF
chmod 600 ${VIRL_PKEY}

#
# Pick a random host from the array of VIRL servers, and attempt
# to reach it and verify it's status.
#
# The server must be reachable, and have a "status" file with
# the content "PRODUCTION", to be selected.
#
# If the server is not reachable, or does not have the correct
# status, remove it from the array and start again.
#
# Abort if there are no more servers left in the array.
#
while [[ ! "$VIRL_SERVER" ]]
do
    num_hosts=${#VIRL_SERVERS[@]}
    if [ $num_hosts == 0 ]
    then
        echo "No more VIRL candidate hosts available, failing."
        exit 127
    fi
    element=$[ $RANDOM % $num_hosts ]
    virl_server_candidate=${VIRL_SERVERS[$element]}
    virl_server_status=$(ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${virl_server_candidate} cat $VIRL_SERVER_STATUS_FILE 2>&1)
    echo VIRL HOST $virl_server_candidate status is \"$virl_server_status\"
    if [ "$virl_server_status" == "$VIRL_SERVER_EXPECTED_STATUS" ]
    then
        # Candidate is in good status. Select this server.
        VIRL_SERVER="$virl_server_candidate"
    else
        # Candidate is in bad status. Remove from array.
        VIRL_SERVERS=("${VIRL_SERVERS[@]:0:$element}" "${VIRL_SERVERS[@]:$[$element+1]}")
    fi
done


#we will pack all the TLDK depend files and copy it to the VIRL_SERVER
VIRL_DIR_LOC="/tmp"
TLDK_TAR_FILE="tldk_depends.tar.gz"

wget "fast.dpdk.org/rel/${DPDK_PACKAGE}"

tar zcf ${TLDK_TAR_FILE} ${DPDK_PACKAGE} ./tldk/ \
    ./tests/tldk/tldk_testconfig/

cat ${VIRL_PKEY}
# Copy the files to VIRL host
scp ${SSH_OPTIONS} ${TLDK_TAR_FILE} \
    ${VIRL_USERNAME}@${VIRL_SERVER}:${VIRL_DIR_LOC}/

result=$?
if [ "${result}" -ne "0" ]; then
    echo "Failed to copy tldk package file to virl host"
    echo ${result}
    exit ${result}
fi

# Start a simulation on VIRL server
echo "Starting simulation on VIRL server"

VIRL_TOPOLOGY=double-ring-nested.xenial
VIRL_RELEASE=csit-ubuntu-16.04.1_2017-07-26_1.9

function stop_virl_simulation {
    ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\
        "stop-testcase ${VIRL_SID}"
}

# Upon script exit, cleanup the simulation execution
trap stop_virl_simulation EXIT

# use the start-testcase-TLDK for the TLDK test case
VIRL_SID=$(ssh ${SSH_OPTIONS} \
    ${VIRL_USERNAME}@${VIRL_SERVER} \
    "start-testcase-TLDK -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VIRL_DIR_LOC}/${TLDK_TAR_FILE}")
retval=$?
if [ "${retval}" -ne "0" ]; then
    echo "VIRL simulation start failed"
    exit ${retval}
fi

if [[ ! "${VIRL_SID}" =~ session-[a-zA-Z0-9_]{6} ]]; then
    echo "No VIRL session ID reported."
    exit 127
fi

echo ${VIRL_SID}

ssh_do ${VIRL_USERNAME}@${VIRL_SERVER} cat /scratch/${VIRL_SID}/topology.yaml

# Download the topology file from virl session
scp ${SSH_OPTIONS} \
    ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/topology.yaml \
    topologies/enabled/topology.yaml

retval=$?
if [ "${retval}" -ne "0" ]; then
    echo "Failed to copy topology file from VIRL simulation"
    exit ${retval}
fi

# create a python virtual environment env
virtualenv --system-site-packages env
. env/bin/activate

echo pip install
pip install -r ${SCRIPT_DIR}/requirements.txt

pykwalify -s ${SCRIPT_DIR}/resources/topology_schemas/3_node_topology.sch.yaml \
          -s ${SCRIPT_DIR}/resources/topology_schemas/topology.sch.yaml \
          -d ${SCRIPT_DIR}/topologies/enabled/topology.yaml \
          -vvv

if [ "$?" -ne "0" ]; then
    echo "Topology schema validation failed."
    echo "However, the tests will start."
fi

PYTHONPATH=`pwd` pybot -L TRACE -W 150 \
    -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \
    --suite "tests.tldk.func" \
    --include vm_envAND3_node_single_link_topo \
    --noncritical EXPECTED_FAILING \
    tests/

RETURN_STATUS=$(echo $?)

# Archive artifacts
mkdir archive
for i in ${ARCHIVE_ARTIFACTS[@]}; do
    cp $( readlink -f ${i} | tr '\n' ' ' ) archive/
done

exit ${RETURN_STATUS}
an> #undef ethernet_error ETHERNET_N_ERROR, } ethernet_error_t; // Structs used when parsing packet to find sw_if_index typedef struct { u32 sw_if_index; u32 flags; // config entry is-valid flag // exact match flags (valid if packet has 0/1/2/3 tags) // L2 vs L3 forwarding mode #define SUBINT_CONFIG_MATCH_0_TAG (1<<0) #define SUBINT_CONFIG_MATCH_1_TAG (1<<1) #define SUBINT_CONFIG_MATCH_2_TAG (1<<2) #define SUBINT_CONFIG_MATCH_3_TAG (1<<3) #define SUBINT_CONFIG_VALID (1<<4) #define SUBINT_CONFIG_L2 (1<<5) #define SUBINT_CONFIG_P2P (1<<6) } subint_config_t; always_inline u32 eth_create_valid_subint_match_flags (u32 num_tags) { return SUBINT_CONFIG_VALID | (1 << num_tags); } typedef struct { subint_config_t untagged_subint; subint_config_t default_subint; u16 dot1q_vlans; // pool id for vlan table u16 dot1ad_vlans; // pool id for vlan table } main_intf_t; typedef struct { subint_config_t single_tag_subint; subint_config_t inner_any_subint; u32 qinqs; // pool id for qinq table } vlan_intf_t; typedef struct { vlan_intf_t vlans[ETHERNET_N_VLAN]; } vlan_table_t; typedef struct { subint_config_t subint; } qinq_intf_t; typedef struct { qinq_intf_t vlans[ETHERNET_N_VLAN]; } qinq_table_t; // Structure mapping to a next index based on ethertype. // Common ethertypes are stored explicitly, others are // stored in a sparse table. typedef struct { /* Sparse vector mapping ethernet type in network byte order to next index. */ u16 *input_next_by_type; u32 *sparse_index_by_input_next_index; /* cached next indexes for common ethertypes */ u32 input_next_ip4; u32 input_next_ip6; u32 input_next_mpls; } next_by_ethertype_t; typedef struct { vlib_main_t *vlib_main; /* next node index for the L3 input node of each ethertype */ next_by_ethertype_t l3_next; /* next node index for L2 interfaces */ u32 l2_next; /* flag and next node index for L3 redirect */ u32 redirect_l3; u32 redirect_l3_next; /* Pool of ethernet interface instances. */ ethernet_interface_t *interfaces; ethernet_type_info_t *type_infos; /* Hash tables mapping name/type to type info index. */ uword *type_info_by_name, *type_info_by_type; // The root of the vlan parsing tables. A vector with one element // for each main interface, indexed by hw_if_index. main_intf_t *main_intfs; // Pool of vlan tables vlan_table_t *vlan_pool; // Pool of qinq tables; qinq_table_t *qinq_pool; /* Set to one to use AB.CD.EF instead of A:B:C:D:E:F as ethernet format. */ int format_ethernet_address_16bit; /* debug: make sure we don't wipe out an ethernet registration by mistake */ u8 next_by_ethertype_register_called; /* Feature arc index */ u8 output_feature_arc_index; /* Allocated loopback instances */ uword *bm_loopback_instances; } ethernet_main_t; extern ethernet_main_t ethernet_main; always_inline ethernet_type_info_t * ethernet_get_type_info (ethernet_main_t * em, ethernet_type_t type) { uword *p = hash_get (em->type_info_by_type, type); return p ? vec_elt_at_index (em->type_infos, p[0]) : 0; } ethernet_interface_t *ethernet_get_interface (ethernet_main_t * em, u32 hw_if_index); clib_error_t *ethernet_register_interface (vnet_main_t * vnm, u32 dev_class_index, u32 dev_instance, u8 * address, u32 * hw_if_index_return, ethernet_flag_change_function_t flag_change); void ethernet_delete_interface (vnet_main_t * vnm, u32 hw_if_index); /* Register given node index to take input for given ethernet type. */ void ethernet_register_input_type (vlib_main_t * vm, ethernet_type_t type, u32 node_index); /* Register given node index to take input for packet from L2 interfaces. */ void ethernet_register_l2_input (vlib_main_t * vm, u32 node_index); /* Register given node index to take redirected L3 traffic, and enable L3 redirect */ void ethernet_register_l3_redirect (vlib_main_t * vm, u32 node_index); /* Formats ethernet address X:X:X:X:X:X */ u8 *format_ethernet_address (u8 * s, va_list * args); u8 *format_ethernet_type (u8 * s, va_list * args); u8 *format_ethernet_vlan_tci (u8 * s, va_list * va); u8 *format_ethernet_header (u8 * s, va_list * args); u8 *format_ethernet_header_with_length (u8 * s, va_list * args); /* Parse ethernet address in either X:X:X:X:X:X unix or X.X.X cisco format. */ uword unformat_ethernet_address (unformat_input_t * input, va_list * args); /* Parse ethernet type as 0xXXXX or type name from ethernet/types.def. In either host or network byte order. */ uword unformat_ethernet_type_host_byte_order (unformat_input_t * input, va_list * args); uword unformat_ethernet_type_net_byte_order (unformat_input_t * input, va_list * args); /* Parse ethernet header. */ uword unformat_ethernet_header (unformat_input_t * input, va_list * args); /* Parse ethernet interface name; return hw_if_index. */ uword unformat_ethernet_interface (unformat_input_t * input, va_list * args); uword unformat_pg_ethernet_header (unformat_input_t * input, va_list * args); always_inline void ethernet_setup_node (vlib_main_t * vm, u32 node_index) { vlib_node_t *n = vlib_get_node (vm, node_index); pg_node_t *pn = pg_get_node (node_index); n->format_buffer = format_ethernet_header_with_length; n->unformat_buffer = unformat_ethernet_header; pn->unformat_edit = unformat_pg_ethernet_header; } always_inline ethernet_header_t * ethernet_buffer_get_header (vlib_buffer_t * b) { return (void *) (b->data + vnet_buffer (b)->l2_hdr_offset); } /** Returns the number of VLAN headers in the current Ethernet frame in the * buffer. Returns 0, 1, 2 for the known header count. The value 3 indicates * the number of headers is not known. */ #define ethernet_buffer_get_vlan_count(b) ( \ ((b)->flags & VNET_BUFFER_FLAGS_VLAN_BITS) >> VNET_BUFFER_F_LOG2_VLAN_1_DEEP \ ) /** Sets the number of VLAN headers in the current Ethernet frame in the * buffer. Values 0, 1, 2 indicate the header count. The value 3 indicates * the number of headers is not known. */ #define ethernet_buffer_set_vlan_count(b, v) ( \ (b)->flags = ((b)->flags & ~VNET_BUFFER_FLAGS_VLAN_BITS) | \ (((v) << VNET_BUFFER_F_LOG2_VLAN_1_DEEP) & VNET_BUFFER_FLAGS_VLAN_BITS) \ ) /** Adjusts the vlan count by the delta in 'v' */ #define ethernet_buffer_adjust_vlan_count(b, v) ( \ ethernet_buffer_set_vlan_count(b, \ (word)ethernet_buffer_get_vlan_count(b) + (word)(v)) \ ) /** Adjusts the vlan count by the header size byte delta in 'v' */ #define ethernet_buffer_adjust_vlan_count_by_bytes(b, v) ( \ (b)->flags = ((b)->flags & ~VNET_BUFFER_FLAGS_VLAN_BITS) | (( \ ((b)->flags & VNET_BUFFER_FLAGS_VLAN_BITS) + \ ((v) << (VNET_BUFFER_F_LOG2_VLAN_1_DEEP - 2)) \ ) & VNET_BUFFER_FLAGS_VLAN_BITS) \ ) /** * Determine the size of the Ethernet headers of the current frame in * the buffer. This uses the VLAN depth flags that are set by * ethernet-input. Because these flags are stored in the vlib_buffer_t * "flags" field this count is valid regardless of the node so long as it's * checked downstream of ethernet-input; That is, the value is not stored in * the opaque space. */ #define ethernet_buffer_header_size(b) ( \ ethernet_buffer_get_vlan_count((b)) * sizeof(ethernet_vlan_header_t) + \ sizeof(ethernet_header_t) \ ) ethernet_main_t *ethernet_get_main (vlib_main_t * vm); u32 ethernet_set_flags (vnet_main_t * vnm, u32 hw_if_index, u32 flags); void ethernet_sw_interface_set_l2_mode (vnet_main_t * vnm, u32 sw_if_index, u32 l2); void ethernet_sw_interface_set_l2_mode_noport (vnet_main_t * vnm, u32 sw_if_index, u32 l2); void ethernet_set_rx_redirect (vnet_main_t * vnm, vnet_hw_interface_t * hi, u32 enable); int vnet_arp_set_ip4_over_ethernet (vnet_main_t * vnm, u32 sw_if_index, void *a_arg, int is_static, int is_no_fib_entry); int vnet_arp_unset_ip4_over_ethernet (vnet_main_t * vnm, u32 sw_if_index, void *a_arg); int vnet_proxy_arp_fib_reset (u32 fib_id); clib_error_t *next_by_ethertype_init (next_by_ethertype_t * l3_next); clib_error_t *next_by_ethertype_register (next_by_ethertype_t * l3_next, u32 ethertype, u32 next_index); int vnet_create_loopback_interface (u32 * sw_if_indexp, u8 * mac_address, u8 is_specified, u32 user_instance); int vnet_delete_loopback_interface (u32 sw_if_index); int vnet_delete_sub_interface (u32 sw_if_index); // Perform ethernet subinterface classification table lookups given // the ports's sw_if_index and fields extracted from the ethernet header. // The resulting tables are used by identify_subint(). always_inline void eth_vlan_table_lookups (ethernet_main_t * em, vnet_main_t * vnm, u32 port_sw_if_index0, u16 first_ethertype, u16 outer_id, u16 inner_id, vnet_hw_interface_t ** hi, main_intf_t ** main_intf, vlan_intf_t ** vlan_intf, qinq_intf_t ** qinq_intf) { vlan_table_t *vlan_table; qinq_table_t *qinq_table; u32 vlan_table_id; // Read the main, vlan, and qinq interface table entries // TODO: Consider if/how to prefetch tables. Also consider // single-entry cache to skip table lookups and identify_subint() // processing. *hi = vnet_get_sup_hw_interface (vnm, port_sw_if_index0); *main_intf = vec_elt_at_index (em->main_intfs, (*hi)->hw_if_index); // Always read the vlan and qinq tables, even if there are not that // many tags on the packet. This makes the lookups and comparisons // easier (and less branchy). vlan_table_id = (first_ethertype == ETHERNET_TYPE_DOT1AD) ? (*main_intf)->dot1ad_vlans : (*main_intf)->dot1q_vlans; vlan_table = vec_elt_at_index (em->vlan_pool, vlan_table_id); *vlan_intf = &vlan_table->vlans[outer_id]; qinq_table = vec_elt_at_index (em->qinq_pool, (*vlan_intf)->qinqs); *qinq_intf = &qinq_table->vlans[inner_id]; } // Determine the subinterface for this packet, given the result of the // vlan table lookups and vlan header parsing. Check the most specific // matches first. // Returns 1 if a matching subinterface was found, otherwise returns 0. always_inline u32 eth_identify_subint (vnet_hw_interface_t * hi, vlib_buffer_t * b0, u32 match_flags, main_intf_t * main_intf, vlan_intf_t * vlan_intf, qinq_intf_t * qinq_intf, u32 * new_sw_if_index, u8 * error0, u32 * is_l2) { subint_config_t *subint; // Each comparison is checking both the valid flag and the number of tags // (incorporating exact-match/non-exact-match). // check for specific double tag subint = &qinq_intf->subint; if ((subint->flags & match_flags) == match_flags) goto matched; // check for specific outer and 'any' inner subint = &vlan_intf->inner_any_subint; if ((subint->flags & match_flags) == match_flags) goto matched; // check for specific single tag subint = &vlan_intf->single_tag_subint; if ((subint->flags & match_flags) == match_flags) goto matched; // check for untagged interface subint = &main_intf->untagged_subint; if ((subint->flags & match_flags) == match_flags) goto matched; // check for default interface subint = &main_intf->default_subint; if ((subint->flags & match_flags) == match_flags) goto matched; // No matching subinterface *new_sw_if_index = ~0; *error0 = ETHERNET_ERROR_UNKNOWN_VLAN; *is_l2 = 0; return 0; matched: *new_sw_if_index = subint->sw_if_index; *is_l2 = subint->flags & SUBINT_CONFIG_L2; return 1; } // Compare two ethernet macs. Return 1 if they are the same, 0 if different always_inline u32 eth_mac_equal (u8 * mac1, u8 * mac2) { return (*((u32 *) (mac1 + 0)) == *((u32 *) (mac2 + 0)) && *((u32 *) (mac1 + 2)) == *((u32 *) (mac2 + 2))); } always_inline ethernet_main_t * vnet_get_ethernet_main (void) { return &ethernet_main; } void vnet_register_ip4_arp_resolution_event (vnet_main_t * vnm, void *address_arg, uword node_index, uword type_opaque, uword data); int vnet_add_del_ip4_arp_change_event (vnet_main_t * vnm, void *data_callback, u32 pid, void *address_arg, uword node_index, uword type_opaque, uword data, int is_add); void wc_arp_set_publisher_node (uword inode_index, uword event_type); void ethernet_arp_change_mac (u32 sw_if_index); void ethernet_ndp_change_mac (u32 sw_if_index); void arp_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai); void ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai); u8 *ethernet_build_rewrite (vnet_main_t * vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address); const u8 *ethernet_ip4_mcast_dst_addr (void); const u8 *ethernet_ip6_mcast_dst_addr (void); extern vlib_node_registration_t ethernet_input_node; typedef struct { u32 sw_if_index; u32 ip4; u8 mac[6]; } wc_arp_report_t; #endif /* included_ethernet_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */