summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2024-01-11 11:24:20 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2024-01-24 10:05:29 +0100
commit2ee43c873eab781bdb7b226ebb0f8a7df32b214e (patch)
tree0c44aef991892f754c8dd5353329932f9e629f1f /lib/zclient.c
parent03d6a6d137aacc0bdc4dae2bd8d02c7afde37dd5 (diff)
lib,zebra: add zapi message to control noarp flag
Add a ZAPI message to control the setting of the IFF_NOARP flag. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 25c6e2b8e5..51ebb56275 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -4520,6 +4520,24 @@ static void zclient_event(enum zclient_event event, struct zclient *zclient)
}
}
+enum zclient_send_status zclient_interface_set_arp(struct zclient *client,
+ struct interface *ifp,
+ bool arp_enable)
+{
+ struct stream *s;
+
+ s = client->obuf;
+ stream_reset(s);
+
+ zclient_create_header(s, ZEBRA_INTERFACE_SET_ARP, ifp->vrf->vrf_id);
+
+ stream_putl(s, ifp->ifindex);
+ stream_putc(s, arp_enable);
+
+ stream_putw_at(s, 0, stream_get_endp(s));
+ return zclient_send_message(client);
+}
+
enum zclient_send_status zclient_interface_set_master(struct zclient *client,
struct interface *master,
struct interface *slave)