diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-01-11 11:24:20 +0100 | 
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2024-01-24 10:05:29 +0100 | 
| commit | 2ee43c873eab781bdb7b226ebb0f8a7df32b214e (patch) | |
| tree | 0c44aef991892f754c8dd5353329932f9e629f1f /lib | |
| parent | 03d6a6d137aacc0bdc4dae2bd8d02c7afde37dd5 (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')
| -rw-r--r-- | lib/zclient.c | 18 | ||||
| -rw-r--r-- | lib/zclient.h | 4 | 
2 files changed, 22 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) diff --git a/lib/zclient.h b/lib/zclient.h index 3027c2c378..1bf91064e2 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -98,6 +98,7 @@ typedef enum {  	ZEBRA_INTERFACE_UP,  	ZEBRA_INTERFACE_DOWN,  	ZEBRA_INTERFACE_SET_MASTER, +	ZEBRA_INTERFACE_SET_ARP,  	ZEBRA_INTERFACE_SET_PROTODOWN,  	ZEBRA_ROUTE_ADD,  	ZEBRA_ROUTE_DELETE, @@ -1036,6 +1037,9 @@ extern int zclient_read_header(struct stream *s, int sock, uint16_t *size,   */  extern bool zapi_parse_header(struct stream *zmsg, struct zmsghdr *hdr); +extern enum zclient_send_status zclient_interface_set_arp(struct zclient *client, +							  struct interface *ifp, +							  bool arp_enable);  extern enum zclient_send_status  zclient_interface_set_master(struct zclient *client, struct interface *master,  			     struct interface *slave);  | 
