3 * Copyright 2009-2016, LabN Consulting, L.L.C.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef _QUAGGA_BGP_RFAPI_H
22 #define _QUAGGA_BGP_RFAPI_H
27 #include <netinet/in.h>
28 #include "lib/zebra.h"
30 #include "lib/prefix.h"
31 #include "bgpd/bgpd.h"
32 #include "bgpd/bgp_encap_types.h"
34 /* probably ought to have a field-specific define in config.h */
35 # ifndef s6_addr32 /* for solaris/bsd */
37 # define s6_addr32 _S6_un._S6_u32
39 # define s6_addr32 __u6_addr.__u6_addr32
43 #define RFAPI_V4_ADDR 0x04
44 #define RFAPI_V6_ADDR 0x06
45 #define RFAPI_SHOW_STR "VNC information\n"
49 uint8_t addr_family
; /* AF_INET | AF_INET6 */
52 struct in_addr v4
; /* in network order */
53 struct in6_addr v6
; /* in network order */
57 struct rfapi_ip_prefix
60 uint8_t cost
; /* bgp local pref = 255 - cost */
61 struct rfapi_ip_addr prefix
;
70 struct rfapi_next_hop_entry
72 struct rfapi_next_hop_entry
*next
;
73 struct rfapi_ip_prefix prefix
;
75 struct rfapi_ip_addr un_address
;
76 struct rfapi_ip_addr vn_address
;
77 struct rfapi_vn_option
*vn_options
;
78 struct rfapi_un_option
*un_options
;
81 #define RFAPI_REMOVE_RESPONSE_LIFETIME 0
82 #define RFAPI_INFINITE_LIFETIME 0xFFFFFFFF
84 struct rfapi_l2address_option
86 struct ethaddr macaddr
; /* use 0 to assign label to IP prefix */
87 uint32_t label
; /* 20bit label in low bits, no TC, S, or TTL */
88 uint32_t logical_net_id
; /* ~= EVPN Ethernet Segment Id,
89 must not be zero for mac regis. */
91 uint16_t tag_id
; /* EVPN Ethernet Tag ID, 0 = none */
96 RFAPI_UN_OPTION_TYPE_PROVISIONAL
, /* internal use only */
97 RFAPI_UN_OPTION_TYPE_TUNNELTYPE
,
98 } rfapi_un_option_type
;
100 struct rfapi_tunneltype_option
102 bgp_encap_types type
;
105 struct bgp_encap_type_reserved reserved
;
106 struct bgp_encap_type_l2tpv3_over_ip l2tpv3_ip
;
107 struct bgp_encap_type_gre gre
;
108 struct bgp_encap_type_transmit_tunnel_endpoint transmit_tunnel_endpoint
;
109 struct bgp_encap_type_ipsec_in_tunnel_mode ipsec_tunnel
;
110 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode ip_ipsec
;
111 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode mpls_ipsec
;
112 struct bgp_encap_type_ip_in_ip ip_ip
;
113 struct bgp_encap_type_vxlan vxlan
;
114 struct bgp_encap_type_nvgre nvgre
;
115 struct bgp_encap_type_mpls mpls
;
116 struct bgp_encap_type_mpls_in_gre mpls_gre
;
117 struct bgp_encap_type_vxlan_gpe vxlan_gpe
;
118 struct bgp_encap_type_mpls_in_udp mpls_udp
;
119 struct bgp_encap_type_pbb pbb
;
123 struct rfapi_un_option
125 struct rfapi_un_option
*next
;
126 rfapi_un_option_type type
;
129 struct rfapi_tunneltype_option tunnel
;
135 RFAPI_VN_OPTION_TYPE_L2ADDR
= 3, /* Layer 2 address, 3 for legacy compatibility */
136 RFAPI_VN_OPTION_TYPE_LOCAL_NEXTHOP
, /* for static routes */
137 RFAPI_VN_OPTION_TYPE_INTERNAL_RD
, /* internal use only */
138 } rfapi_vn_option_type
;
140 struct rfapi_vn_option
142 struct rfapi_vn_option
*next
;
144 rfapi_vn_option_type type
;
148 struct rfapi_l2address_option l2addr
;
151 * If this option is present, the next hop is local to the
152 * client NVE (i.e., not via a tunnel).
154 struct rfapi_nexthop local_nexthop
;
157 * For rfapi internal use only
159 struct prefix_rd internal_rd
;
163 struct rfapi_l2address_option_match
165 struct rfapi_l2address_option o
;
168 #define RFAPI_L2O_MACADDR 0x00000001
169 #define RFAPI_L2O_LABEL 0x00000002
170 #define RFAPI_L2O_LNI 0x00000004
171 #define RFAPI_L2O_LHI 0x00000008
174 #define VNC_CONFIG_STR "VNC/RFP related configuration\n"
176 typedef void *rfapi_handle
;
178 /***********************************************************************
180 ***********************************************************************/
181 /*------------------------------------------
182 * rfapi_response_cb_t (callback typedef)
184 * Callbacks of this type are used to provide asynchronous
185 * route updates from RFAPI to the RFP client.
188 * called to notify the rfp client that a next hop list
189 * that has previously been provided in response to an
190 * rfapi_query call has been updated. Deleted routes are indicated
191 * with lifetime==RFAPI_REMOVE_RESPONSE_LIFETIME.
193 * By default, the routes an NVE receives via this callback include
194 * its own routes (that it has registered). However, these may be
195 * filtered out if the global BGP_VNC_CONFIG_FILTER_SELF_FROM_RSP
199 * called to notify the rfp client that a local route
200 * has been added or deleted. Deleted routes are indicated
201 * with lifetime==RFAPI_REMOVE_RESPONSE_LIFETIME.
204 * next_hops a list of possible next hops.
205 * This is a linked list allocated within the
206 * rfapi. The response_cb callback function is responsible
207 * for freeing this memory via rfapi_free_next_hop_list()
208 * in order to avoid memory leaks.
210 * userdata value (cookie) originally specified in call to
213 *------------------------------------------*/
214 typedef void (rfapi_response_cb_t
) (struct rfapi_next_hop_entry
* next_hops
,
217 /*------------------------------------------
218 * rfapi_nve_close_cb_t (callback typedef)
220 * Callbacks of this type are used to provide asynchronous
221 * notification that an rfapi_handle was invalidated
224 * pHandle Firmerly valid rfapi_handle returned to
225 * client via rfapi_open().
227 * reason EIDRM handle administratively closed (clear nve ...)
228 * ESTALE handle invalidated by configuration change
230 *------------------------------------------*/
231 typedef void (rfapi_nve_close_cb_t
) (rfapi_handle pHandle
, int reason
);
233 /*------------------------------------------
234 * rfp_cfg_write_cb_t (callback typedef)
236 * This callback is used to generate output for any config parameters
237 * that may supported by RFP via RFP defined vty commands at the bgp
238 * level. See loglevel as an example.
241 * vty -- quagga vty context
242 * rfp_start_val -- value returned by rfp_start
245 * to vty, rfp related configuration
249 --------------------------------------------*/
250 typedef int (rfp_cfg_write_cb_t
) (struct vty
* vty
, void *rfp_start_val
);
252 /*------------------------------------------
253 * rfp_cfg_group_write_cb_t (callback typedef)
255 * This callback is used to generate output for any config parameters
256 * that may supported by RFP via RFP defined vty commands at the
257 * L2 or NVE level. See loglevel as an example.
260 * vty quagga vty context
261 * rfp_start_val value returned by rfp_start
264 * rfp_cfg_group Pointer to configuration structure
267 * to vty, rfp related configuration
271 --------------------------------------------*/
274 RFAPI_RFP_CFG_GROUP_DEFAULT
,
275 RFAPI_RFP_CFG_GROUP_NVE
,
276 RFAPI_RFP_CFG_GROUP_L2
277 } rfapi_rfp_cfg_group_type
;
279 typedef int (rfp_cfg_group_write_cb_t
) (struct vty
* vty
,
281 rfapi_rfp_cfg_group_type type
,
283 void *rfp_cfg_group
);
285 /***********************************************************************
286 * Configuration related defines and structures
287 ***********************************************************************/
289 struct rfapi_rfp_cb_methods
291 rfp_cfg_write_cb_t
*cfg_cb
; /* show top level config */
292 rfp_cfg_group_write_cb_t
*cfg_group_cb
; /* show group level config */
293 rfapi_response_cb_t
*response_cb
; /* unsolicited responses */
294 rfapi_response_cb_t
*local_cb
; /* local route add/delete */
295 rfapi_nve_close_cb_t
*close_cb
; /* handle closed */
300 * If a route with infinite lifetime is withdrawn, this is
301 * how long (in seconds) to wait before expiring it (because
302 * RFAPI_LIFETIME_MULTIPLIER_PCT * infinity is too long to wait)
304 #define RFAPI_LIFETIME_INFINITE_WITHDRAW_DELAY (60*120)
307 * the factor that should be applied to a prefix's <lifetime> value
308 * before using it to expire a withdrawn prefix, expressed as a percent.
309 * Thus, a value of 100 means to use the exact value of <lifetime>,
310 * a value of 200 means to use twice the value of <lifetime>, etc.
312 #define RFAPI_RFP_CFG_DEFAULT_HOLDDOWN_FACTOR 150
315 * This is used by rfapi to determine if RFP is using/supports
316 * a partial (i.e., cache) or full table download approach for
317 * mapping information. When full table download approach is
318 * used all information is passed to RFP after an initial
319 * rfapi_query. When partial table download is used, only
320 * information matching a query is passed.
324 RFAPI_RFP_DOWNLOAD_PARTIAL
= 0,
325 RFAPI_RFP_DOWNLOAD_FULL
326 } rfapi_rfp_download_type
;
328 #define RFAPI_RFP_CFG_DEFAULT_FTD_ADVERTISEMENT_INTERVAL 1
332 /* partial or full table download */
333 rfapi_rfp_download_type download_type
; /* default=partial */
335 * When full-table-download is enabled, this is the minimum
336 * number of seconds between times a non-queried prefix will
337 * be updated to a particular NVE.
338 * default: RFAPI_RFP_CFG_DEFAULT_FTD_ADVERTISEMENT_INTERVAL
340 uint32_t ftd_advertisement_interval
;
342 * percentage of registration lifetime to continue to use information
343 * post soft-state refresh timeout
344 default: RFAPI_RFP_CFG_DEFAULT_HOLDDOWN_FACTOR
346 uint32_t holddown_factor
;
347 /* Control generation of updated RFP responses */
348 uint8_t use_updated_response
; /* default=0/no */
349 /* when use_updated_response, also generate remove responses */
350 uint8_t use_removes
; /* default=0/no */
353 /***********************************************************************
354 * Process related functions -- MUST be provided by the RFAPI user <<===
355 ***********************************************************************/
357 /*------------------------------------------
360 * This function will start the RFP code
363 * master quagga thread_master to tie into bgpd threads
366 * cfgp Pointer to rfapi_rfp_cfg (null = use defaults),
367 * copied by caller, updated via rfp_set_configuration
368 * cbmp Pointer to rfapi_rfp_cb_methods, may be null
369 * copied by caller, updated via rfapi_rfp_set_cb_methods
371 * rfp_start_val rfp returned value passed on rfp_stop and other rfapi calls
372 --------------------------------------------*/
375 struct thread_master
*master
,
376 struct rfapi_rfp_cfg
**cfgp
,
377 struct rfapi_rfp_cb_methods
**cbmp
);
379 /*------------------------------------------
382 * This function is called on shutdown to trigger RFP cleanup
391 --------------------------------------------*/
393 rfp_stop (void *rfp_start_val
);
395 /***********************************************************************
396 * RFP processing behavior configuration
397 ***********************************************************************/
399 /*------------------------------------------
400 * rfapi_rfp_set_configuration
402 * This is used to change rfapi's processing behavior based on
406 * rfp_start_val value returned by rfp_start
407 * rfapi_rfp_cfg Pointer to configuration structure
414 * ENXIO Unabled to locate configured BGP/VNC
415 --------------------------------------------*/
417 rfapi_rfp_set_configuration (
419 struct rfapi_rfp_cfg
*rfp_cfg
);
421 /*------------------------------------------
422 * rfapi_rfp_set_cb_methods
424 * Change registered callback functions for asynchronous notifications
425 * from RFAPI to the RFP client.
428 * rfp_start_val value by rfp_start
429 * methods Pointer to struct rfapi_rfp_cb_methods containing
430 * pointers to callback methods as described above
434 * ENXIO BGP or VNC not configured
435 *------------------------------------------*/
437 rfapi_rfp_set_cb_methods (
439 struct rfapi_rfp_cb_methods
*methods
);
441 /***********************************************************************
442 * RFP group specific configuration
443 ***********************************************************************/
445 /*------------------------------------------
446 * rfapi_rfp_init_group_config_ptr_vty
448 * This is used to init or return a previously init'ed group specific
449 * configuration pointer. Group is identified by vty context.
450 * NOTE: size is ignored when a previously init'ed value is returned.
451 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
452 * bgp restart or shutdown.
455 * rfp_start_val value returned by rfp_start
457 * vty quagga vty context
458 * size number of bytes to allocation
464 * rfp_cfg_group NULL or Pointer to configuration structure
465 --------------------------------------------*/
467 rfapi_rfp_init_group_config_ptr_vty (
469 rfapi_rfp_cfg_group_type type
,
473 /*------------------------------------------
474 * rfapi_rfp_get_group_config_ptr_vty
476 * This is used to get group specific configuration pointer.
477 * Group is identified by type and vty context.
478 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
479 * bgp restart or shutdown.
482 * rfp_start_val value returned by rfp_start
484 * vty quagga vty context
490 * rfp_cfg_group Pointer to configuration structure
491 --------------------------------------------*/
493 rfapi_rfp_get_group_config_ptr_vty (
495 rfapi_rfp_cfg_group_type type
,
498 /*------------------------------------------
499 * rfp_group_config_search_cb_t (callback typedef)
501 * This callback is used to called from within a
502 * rfapi_rfp_get_group_config_ptr to check if the rfp_cfg_group
503 * matches the search criteria
506 * criteria RFAPI caller provided serach criteria
507 * rfp_cfg_group Pointer to configuration structure | NULL
514 --------------------------------------------*/
515 typedef int (rfp_group_config_search_cb_t
) (void *criteria
,
516 void *rfp_cfg_group
);
518 /*------------------------------------------
519 * rfapi_rfp_get_group_config_ptr_name
521 * This is used to get group specific configuration pointer.
522 * Group is identified by type and name context.
523 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
524 * bgp restart or shutdown.
527 * rfp_start_val value returned by rfp_start
530 * criteria RFAPI caller provided serach criteria
531 * search_cb optional rfp_group_config_search_cb_t
537 * rfp_cfg_group Pointer to configuration structure
538 --------------------------------------------*/
540 rfapi_rfp_get_group_config_ptr_name (
542 rfapi_rfp_cfg_group_type type
,
545 rfp_group_config_search_cb_t
*search_cb
);
547 /*------------------------------------------
548 * rfapi_rfp_get_l2_group_config_ptr_lni
550 * This is used to get group specific configuration pointer.
551 * Group is identified by type and logical network identifier.
552 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
553 * bgp restart or shutdown.
556 * rfp_start_val value returned by rfp_start
557 * logical_net_id group logical network identifier
558 * criteria RFAPI caller provided serach criteria
559 * search_cb optional rfp_group_config_search_cb_t
565 * rfp_cfg_group Pointer to configuration structure
566 --------------------------------------------*/
568 rfapi_rfp_get_l2_group_config_ptr_lni (
570 uint32_t logical_net_id
,
572 rfp_group_config_search_cb_t
*search_cb
);
574 /***********************************************************************
576 ***********************************************************************/
578 /*------------------------------------------
581 * This function initializes a NVE record and associates it with
582 * the specified VN and underlay network addresses
585 * rfp_start_val value returned by rfp_start
586 * vn NVE virtual network address
588 * un NVE underlay network address
590 * default_options Default options to use on registrations.
591 * For now only tunnel type is supported.
592 * May be overridden per-prefix in rfapi_register().
593 * Caller owns (rfapi_open() does not free)
595 * response_cb Pointer to next hop list update callback function or
596 * NULL when no callbacks are desired.
598 * userdata Passed to subsequent response_cb invocations.
601 * response_lifetime The length of time that responses sent to this
604 * pHandle pointer to location to store rfapi handle. The
605 * handle must be passed on subsequent rfapi_ calls.
610 * EEXIST NVE with this {vn,un} already open
611 * ENOENT No matching nve group config
612 * ENOMSG Matched nve group config was incomplete
613 * ENXIO BGP or VNC not configured
614 * EAFNOSUPPORT Matched nve group specifies auto-assignment of RD,
615 * but underlay network address is not IPv4
616 * EDEADLK Called from within a callback procedure
617 *------------------------------------------*/
621 struct rfapi_ip_addr
*vn
,
622 struct rfapi_ip_addr
*un
,
623 struct rfapi_un_option
*default_options
,
624 uint32_t *response_lifetime
,
626 rfapi_handle
*pHandle
);
629 /*------------------------------------------
632 * Shut down NVE session and release associated data. Calling
633 * from within a rfapi callback procedure is permitted (the close
634 * will be completed asynchronously after the callback finishes).
637 * rfd: rfapi descriptor returned by rfapi_open
643 * EBADF invalid handle
644 * ENXIO BGP or VNC not configured
645 *------------------------------------------*/
647 rfapi_close (rfapi_handle rfd
);
649 /*------------------------------------------
652 * Test rfapi descriptor
655 * rfd: rfapi descriptor returned by rfapi_open
660 * 0 Success: handle is valid and usable
661 * EINVAL null argument
662 * ESTALE formerly valid handle invalidated by config, needs close
663 * EBADF invalid handle
664 * ENXIO BGP or VNC not configured
665 * EAFNOSUPPORT Internal addressing error
666 *------------------------------------------*/
668 rfapi_check (rfapi_handle rfd
);
670 /***********************************************************************
672 ***********************************************************************/
674 /*------------------------------------------
677 * This function queries the RIB for a
678 * particular route. Note that this call may result in subsequent
679 * callbacks to response_cb. Response callbacks can be cancelled
680 * by calling rfapi_query_done. A duplicate query using the same target
681 * will result in only one callback per change in next_hops. (i.e.,
682 * cancel/replace the prior query results.)
685 * rfd: rfapi descriptor returned by rfapi_open
686 * target: the destination address
687 * l2o ptr to L2 Options struct, NULL if not present in query
690 * ppNextHopEntry pointer to a location to store a pointer
691 * to the returned list of nexthops. It is the
692 * caller's responsibility to free this list
693 * via rfapi_free_next_hop_list().
698 * EBADF invalid handle
699 * ENOENT no valid route
700 * ENXIO BGP or VNC not configured
701 * ESTALE descriptor is no longer usable; should be closed
702 * EDEADLK Called from within a callback procedure
703 --------------------------------------------*/
707 struct rfapi_ip_addr
*target
,
708 struct rfapi_l2address_option
*l2o
,
709 struct rfapi_next_hop_entry
**ppNextHopEntry
);
711 /*------------------------------------------
714 * Notifies the rfapi that the user is no longer interested
715 * in the specified target.
718 * rfd: rfapi descriptor returned by rfapi_open
719 * target: the destination address
725 * EBADF invalid handle
726 * ENOENT no match found for target
727 * ENXIO BGP or VNC not configured
728 * ESTALE descriptor is no longer usable; should be closed
729 * EDEADLK Called from within a callback procedure
730 --------------------------------------------*/
732 rfapi_query_done (rfapi_handle rfd
, struct rfapi_ip_addr
*target
);
734 /*------------------------------------------
735 * rfapi_query_done_all
737 * Notifies the rfapi that the user is no longer interested
741 * rfd: rfapi descriptor returned by rfapi_open
744 * count: number of queries cleared
748 * EBADF invalid handle
749 * ENXIO BGP or VNC not configured
750 * ESTALE descriptor is no longer usable; should be closed
751 * EDEADLK Called from within a callback procedure
752 --------------------------------------------*/
754 rfapi_query_done_all (rfapi_handle rfd
, int *count
);
756 /*------------------------------------------
759 * Requests that reachability to the indicated prefix via this NVE
760 * be advertised by BGP. If <unregister> is non-zero, then the previously-
761 * advertised prefix should be withdrawn.
763 * (This function should NOT be called if the rfapi_open() function
767 * rfd: rfapi descriptor returned by rfapi_open
768 * prefix: A prefix to be registered or deregistered
769 * lifetime Prefix lifetime in seconds, host byte order
770 * options_un underlay netowrk options, may include tunnel-type
771 * Caller owns (rfapi_register() does not free).
772 * options_vn virtual network options, may include layer 2 address
773 * option and local-nexthop option
774 * Caller owns (rfapi_register() does not free).
776 * action: RFAPI_REGISTER_ADD add the route
777 * RFAPI_REGISTER_WITHDRAW withdraw route
778 * RFAPI_REGISTER_KILL withdraw without holddown
782 * EBADF invalid handle
783 * ENXIO BGP or VNC not configured
784 * ESTALE descriptor is no longer usable; should be closed
785 * EDEADLK Called from within a callback procedure
786 --------------------------------------------*/
791 RFAPI_REGISTER_WITHDRAW
,
793 } rfapi_register_action
;
798 struct rfapi_ip_prefix
*prefix
,
800 struct rfapi_un_option
*options_un
,
801 struct rfapi_vn_option
*options_vn
,
802 rfapi_register_action action
);
804 /***********************************************************************
805 * Helper / Utility functions
806 ***********************************************************************/
808 /*------------------------------------------
811 * Get the virtual network address used by an NVE based on it's RFD
814 * rfd: rfapi descriptor returned by rfapi_open or rfapi_create_generic
819 * vn NVE virtual network address
820 *------------------------------------------*/
821 extern struct rfapi_ip_addr
*
822 rfapi_get_vn_addr (void *);
824 /*------------------------------------------
827 * Get the underlay network address used by an NVE based on it's RFD
830 * rfd: rfapi descriptor returned by rfapi_open or rfapi_create_generic
835 * un NVE underlay network address
836 *------------------------------------------*/
837 extern struct rfapi_ip_addr
*
838 rfapi_get_un_addr (void *);
840 /*------------------------------------------
843 * Returns a string describing the rfapi error code.
847 * code Error code returned by rfapi function
851 * const char * String
852 *------------------------------------------*/
854 rfapi_error_str (int code
);
856 /*------------------------------------------
857 * rfapi_get_rfp_start_val
859 * Returns value passed to rfapi on rfp_start
862 * void * bgp structure
866 *------------------------------------------*/
868 rfapi_get_rfp_start_val (void *bgpv
);
870 /*------------------------------------------
873 * Compare two generic rfapi descriptors.
876 * rfd1: rfapi descriptor returned by rfapi_open or rfapi_create_generic
877 * rfd2: rfapi descriptor returned by rfapi_open or rfapi_create_generic
884 *------------------------------------------*/
886 rfapi_compare_rfds (void *rfd1
, void *rfd2
);
888 /*------------------------------------------
889 * rfapi_free_next_hop_list
891 * Frees a next_hop_list returned by a rfapi_query invocation
894 * list: a pointer to a response list (as a
895 * struct rfapi_next_hop_entry) to free.
900 --------------------------------------------*/
902 rfapi_free_next_hop_list (struct rfapi_next_hop_entry
*list
);
904 /*------------------------------------------
905 * rfapi_get_response_lifetime_default
907 * Returns the default lifetime for a response.
908 * rfp_start_val value returned by rfp_start or
909 * NULL (=use default instance)
916 * return value: The bgp instance default lifetime for a response.
917 --------------------------------------------*/
919 rfapi_get_response_lifetime_default (void *rfp_start_val
);
921 /*------------------------------------------
922 * rfapi_is_vnc_configured
924 * Returns if VNC (BGP VPN messaging /VPN & encap SAFIs) are configured
927 * rfp_start_val value returned by rfp_start or
928 * NULL (=use default instance)
932 * return value: If VNC is configured for the bgpd instance
934 * ENXIO VNC not configured
935 --------------------------------------------*/
937 rfapi_is_vnc_configured (void *rfp_start_val
);
939 /*------------------------------------------
940 * rfapi_bgp_lookup_by_rfp
942 * Find bgp instance pointer based on value returned by rfp_start
945 * rfp_start_val value returned by rfp_startor
946 * NULL (=get default instance)
952 * bgp bgp instance pointer
955 --------------------------------------------*/
957 rfapi_bgp_lookup_by_rfp (void *rfp_start_val
);
959 /*------------------------------------------
960 * rfapi_get_rfp_start_val_by_bgp
962 * Find bgp instance pointer based on value returned by rfp_start
965 * bgp bgp instance pointer
974 --------------------------------------------*/
976 rfapi_get_rfp_start_val_by_bgp (struct bgp
*bgp
);
978 #endif /* ENABLE_BGP_VNC */
980 #endif /* _QUAGGA_BGP_RFAPI_H */