}
static void zread_get_table_chunk(struct zserv *client, struct stream *msg,
- vrf_id_t vrf_id)
+ struct zebra_vrf *zvrf)
{
struct stream *s;
uint32_t size;
/* Get data. */
STREAM_GETL(s, size);
- tmc = assign_table_chunk(client->proto, client->instance, size);
+ tmc = assign_table_chunk(client->proto, client->instance, size, zvrf);
if (!tmc)
flog_err(EC_ZEBRA_TM_CANNOT_ASSIGN_CHUNK,
"%s: Unable to assign Table Chunk of size %u",
zlog_debug("Assigned Table Chunk %u - %u", tmc->start,
tmc->end);
/* send response back */
- zsend_assign_table_chunk_response(client, vrf_id, tmc);
+ zsend_assign_table_chunk_response(client, zvrf_id(zvrf), tmc);
stream_failure:
return;
}
-static void zread_release_table_chunk(struct zserv *client, struct stream *msg)
+static void zread_release_table_chunk(struct zserv *client, struct stream *msg,
+ struct zebra_vrf *zvrf)
{
struct stream *s;
uint32_t start, end;
STREAM_GETL(s, start);
STREAM_GETL(s, end);
- release_table_chunk(client->proto, client->instance, start, end);
+ release_table_chunk(client->proto, client->instance, start, end, zvrf);
stream_failure:
return;
return;
}
if (hdr->command == ZEBRA_GET_TABLE_CHUNK)
- zread_get_table_chunk(client, msg, zvrf_id(zvrf));
+ zread_get_table_chunk(client, msg, zvrf);
else if (hdr->command == ZEBRA_RELEASE_TABLE_CHUNK)
- zread_release_table_chunk(client, msg);
+ zread_release_table_chunk(client, msg, zvrf);
}
}