summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/interface.h
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2016-09-26 10:40:02 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-09-30 19:08:24 +0000
commitc631f2de6dd06b4cbb92bf8398839b882344fd25 (patch)
tree42e5bd96a33deecaaa5589a32e696896805a4d39 /vnet/vnet/interface.h
parent83486fb3ef0f25f9787f9aa898eafc6562f1540e (diff)
VPP-363: add ability to change mac address of the interface
Added ability to change interface address. Added new CLI and API functions. Change-Id: Ia336bc75ad8c5858c26f39af851485c4c6f19f58 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'vnet/vnet/interface.h')
-rw-r--r--vnet/vnet/interface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/vnet/vnet/interface.h b/vnet/vnet/interface.h
index 9f032e987bb..5fbf830c01c 100644
--- a/vnet/vnet/interface.h
+++ b/vnet/vnet/interface.h
@@ -55,6 +55,10 @@ typedef clib_error_t *(vnet_subif_add_del_function_t)
(struct vnet_main_t * vnm, u32 if_index,
struct vnet_sw_interface_t * template, int is_add);
+/* Interface set mac address callback. */
+typedef clib_error_t *(vnet_interface_set_mac_address_function_t)
+ (struct vnet_hw_interface_t * hi, char *address);
+
typedef struct _vnet_interface_function_list_elt
{
struct _vnet_interface_function_list_elt *next_interface_function;
@@ -151,6 +155,9 @@ typedef struct _vnet_device_class
/* Do not splice vnet_interface_output_node into TX path */
u8 no_flatten_output_chains;
+ /* Function to set mac address. */
+ vnet_interface_set_mac_address_function_t *mac_addr_change_function;
+
} vnet_device_class_t;
#define VNET_DEVICE_CLASS(x,...) \