diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/zclient.c | 18 | ||||
| -rw-r--r-- | lib/zclient.h | 4 |
2 files changed, 8 insertions, 14 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index c971bff6e2..1aa1251bf5 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -919,8 +919,8 @@ zebra_router_id_update_read (struct stream *s, struct prefix *rid) * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ -struct vrf * -zebra_vrf_add_read (struct stream *s, vrf_id_t vrf_id) +static void +zclient_vrf_add (struct stream *s, vrf_id_t vrf_id) { struct vrf *vrf; char vrfname_tmp[VRF_NAMSIZ]; @@ -931,18 +931,18 @@ zebra_vrf_add_read (struct stream *s, vrf_id_t vrf_id) /* Lookup/create vrf by vrf_id. */ vrf = vrf_get (vrf_id, vrfname_tmp); - return vrf; + vrf_enable (vrf); } -struct vrf * -zebra_vrf_state_read (struct stream *s, vrf_id_t vrf_id) +static void +zclient_vrf_delete (struct stream *s, vrf_id_t vrf_id) { struct vrf *vrf; /* Lookup vrf by vrf_id. */ vrf = vrf_lookup (vrf_id); - return vrf; + vrf_delete (vrf); } struct interface * @@ -1341,12 +1341,10 @@ zclient_read (struct thread *thread) (*zclient->router_id_update) (command, zclient, length, vrf_id); break; case ZEBRA_VRF_ADD: - if (zclient->vrf_add) - (*zclient->vrf_add) (command, zclient, length, vrf_id); + zclient_vrf_add (zclient->ibuf, vrf_id); break; case ZEBRA_VRF_DELETE: - if (zclient->vrf_delete) - (*zclient->vrf_delete) (command, zclient, length, vrf_id); + zclient_vrf_delete (zclient->ibuf, vrf_id); break; case ZEBRA_INTERFACE_ADD: if (zclient->interface_add) diff --git a/lib/zclient.h b/lib/zclient.h index 49f73b3e9b..d411965217 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -87,8 +87,6 @@ struct zclient /* Pointer to the callback functions. */ void (*zebra_connected) (struct zclient *); int (*router_id_update) (int, struct zclient *, uint16_t, vrf_id_t); - int (*vrf_add) (int, struct zclient *, uint16_t, vrf_id_t); - int (*vrf_delete) (int, struct zclient *, uint16_t, vrf_id_t); int (*interface_add) (int, struct zclient *, uint16_t, vrf_id_t); int (*interface_delete) (int, struct zclient *, uint16_t, vrf_id_t); int (*interface_up) (int, struct zclient *, uint16_t, vrf_id_t); @@ -195,8 +193,6 @@ extern int zclient_send_message(struct zclient *); /* create header for command, length to be filled in by user later */ extern void zclient_create_header (struct stream *, uint16_t, vrf_id_t); -extern struct vrf *zebra_vrf_add_read (struct stream *, vrf_id_t); -extern struct vrf *zebra_vrf_state_read (struct stream *s, vrf_id_t); extern struct interface *zebra_interface_add_read (struct stream *, vrf_id_t); extern struct interface *zebra_interface_state_read (struct stream *s, vrf_id_t); extern struct connected *zebra_interface_address_read (int, struct stream *, vrf_id_t); |
