• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/zebra/bgpd/

Lines Matching refs:api

244   struct zapi_ipv4 api;
254 api.type = stream_getc (s);
255 api.flags = stream_getc (s);
256 api.message = stream_getc (s);
265 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP))
267 api.nexthop_num = stream_getc (s);
270 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_IFINDEX))
272 api.ifindex_num = stream_getc (s);
275 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_DISTANCE))
276 api.distance = stream_getc (s);
277 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_METRIC))
278 api.metric = stream_getl (s);
280 api.metric = 0;
283 bgp_redistribute_add ((struct prefix *)&p, &nexthop, api.metric, api.type);
285 bgp_redistribute_delete ((struct prefix *)&p, api.type);
296 struct zapi_ipv6 api;
306 api.type = stream_getc (s);
307 api.flags = stream_getc (s);
308 api.message = stream_getc (s);
317 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP))
319 api.nexthop_num = stream_getc (s);
322 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_IFINDEX))
324 api.ifindex_num = stream_getc (s);
327 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_DISTANCE))
328 api.distance = stream_getc (s);
330 api.distance = 0;
331 if (CHECK_FLAG (api.message, ZAPI_MESSAGE_METRIC))
332 api.metric = stream_getl (s);
334 api.metric = 0;
341 bgp_redistribute_add ((struct prefix *)&p, NULL, api.metric, api.type);
343 bgp_redistribute_delete ((struct prefix *) &p, api.type);
686 struct zapi_ipv4 api;
689 api.flags = flags;
692 api.type = ZEBRA_ROUTE_BGP;
693 api.message = 0;
694 SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
695 api.nexthop_num = 1;
696 api.nexthop = &nexthop;
697 api.ifindex_num = 0;
698 SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
699 api.metric = info->attr->med;
705 SET_FLAG (api.message, ZAPI_MESSAGE_DISTANCE);
706 api.distance = distance;
708 zapi_ipv4_add (zclient, (struct prefix_ipv4 *) p, &api);
716 struct zapi_ipv6 api;
751 api.flags = flags;
752 api.type = ZEBRA_ROUTE_BGP;
753 api.message = 0;
754 SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
755 api.nexthop_num = 1;
756 api.nexthop = &nexthop;
757 SET_FLAG (api.message, ZAPI_MESSAGE_IFINDEX);
758 api.ifindex_num = 1;
759 api.ifindex = &ifindex;
760 SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
761 api.metric = info->attr->med;
763 zapi_ipv6_add (zclient, (struct prefix_ipv6 *) p, &api);
795 struct zapi_ipv4 api;
798 api.flags = flags;
801 api.type = ZEBRA_ROUTE_BGP;
802 api.message = 0;
803 SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
804 api.nexthop_num = 1;
805 api.nexthop = &nexthop;
806 api.ifindex_num = 0;
807 SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
808 api.metric = info->attr->med;
810 zapi_ipv4_delete (zclient, (struct prefix_ipv4 *) p, &api);
816 struct zapi_ipv6 api;
842 api.flags = flags;
843 api.type = ZEBRA_ROUTE_BGP;
844 api.message = 0;
845 SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
846 api.nexthop_num = 1;
847 api.nexthop = &nexthop;
848 SET_FLAG (api.message, ZAPI_MESSAGE_IFINDEX);
849 api.ifindex_num = 1;
850 api.ifindex = &ifindex;
851 SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
852 api.metric = info->attr->med;
854 zapi_ipv6_delete (zclient, (struct prefix_ipv6 *) p, &api);