From bd50ed18de83493b119e67897a5fa9ba9c7e763e Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Fri, 24 Jul 2020 13:38:03 -0500 Subject: tap: allow change of carrier state on host Type: feature Add a function to adjust the link state of the host side of a tap interface. If an application (e.g. route protocol daemons) running on the host uses netlink to monitor interface state, a plugin could use this function to communicate a loss of connectivity to the application by making the interface appear to go down. Requires a somewhat recent kernel. E.g. it does not have any effect on CentOS 7 but it works on CentOS 8. Change-Id: I677ee7889d2eb142e2395bea98f0b4d7e7e7f810 Signed-off-by: Matthew Smith --- src/vnet/devices/tap/tap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vnet/devices/tap/tap.h') diff --git a/src/vnet/devices/tap/tap.h b/src/vnet/devices/tap/tap.h index 46f13a4e274..42283281448 100644 --- a/src/vnet/devices/tap/tap.h +++ b/src/vnet/devices/tap/tap.h @@ -108,6 +108,8 @@ int tap_csum_offload_enable_disable (vlib_main_t * vm, u32 sw_if_index, int enable_disable); int tap_dump_ifs (tap_interface_details_t ** out_tapids); +int tap_set_carrier (u32 hw_if_index, u32 carrier_up); + #endif /* _VNET_DEVICES_VIRTIO_TAP_H_ */ -- cgit 1.2.3-korg