* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
*
* Selects a suitable rib destination for fpm interface tests.
*/
-static int zfpm_dt_find_route(rib_dest_t **dest_p, struct rib **rib_p)
+static int zfpm_dt_find_route(rib_dest_t **dest_p, struct route_entry **re_p)
{
struct route_node *rnode;
route_table_iter_t iter;
struct route_table *table;
rib_dest_t *dest;
- struct rib *rib;
+ struct route_entry *re;
int ret;
table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, VRF_DEFAULT);
if (!dest)
continue;
- rib = zfpm_route_for_update(dest);
- if (!rib)
+ re = zfpm_route_for_update(dest);
+ if (!re)
continue;
- if (rib->nexthop_active_num <= 0)
+ if (re->nexthop_active_num <= 0)
continue;
*dest_p = dest;
- *rib_p = rib;
+ *re_p = re;
ret = 1;
goto done;
}
{
int times, i, len;
rib_dest_t *dest;
- struct rib *rib;
+ struct route_entry *re;
char buf[4096];
times = 100000;
times = atoi(argv[0]);
}
- if (!zfpm_dt_find_route(&dest, &rib)) {
+ if (!zfpm_dt_find_route(&dest, &re)) {
return 1;
}
for (i = 0; i < times; i++) {
- len = zfpm_netlink_encode_route(RTM_NEWROUTE, dest, rib, buf,
+ len = zfpm_netlink_encode_route(RTM_NEWROUTE, dest, re, buf,
sizeof(buf));
if (len <= 0) {
return 2;
{
int times, i, len;
rib_dest_t *dest;
- struct rib *rib;
+ struct route_entry *re;
uint8_t buf[4096];
times = 100000;
times = atoi(argv[0]);
}
- if (!zfpm_dt_find_route(&dest, &rib)) {
+ if (!zfpm_dt_find_route(&dest, &re)) {
return 1;
}
for (i = 0; i < times; i++) {
- len = zfpm_protobuf_encode_route(dest, rib, buf, sizeof(buf));
+ len = zfpm_protobuf_encode_route(dest, re, buf, sizeof(buf));
if (len <= 0) {
return 2;
}
Fpm__AddRoute *add_route;
Fpm__Nexthop *nexthop;
struct prefix prefix;
- u_char family, nh_family;
+ uint8_t family, nh_family;
uint if_index;
char *if_name;
size_t i;
{
int times, i, len;
rib_dest_t *dest;
- struct rib *rib;
+ struct route_entry *re;
uint8_t msg_buf[4096];
QPB_DECLARE_STACK_ALLOCATOR(allocator, 8192);
Fpm__Message *fpm_msg;
if (argc > 0)
times = atoi(argv[0]);
- if (!zfpm_dt_find_route(&dest, &rib))
+ if (!zfpm_dt_find_route(&dest, &re))
return 1;
/*
* Encode the route into the message buffer once only.
*/
- len = zfpm_protobuf_encode_route(dest, rib, msg_buf, sizeof(msg_buf));
+ len = zfpm_protobuf_encode_route(dest, re, msg_buf, sizeof(msg_buf));
if (len <= 0)
return 2;