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
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #ifndef _QUAGGA_BGP_RFAPI_H
23 #define _QUAGGA_BGP_RFAPI_H
28 #include <netinet/in.h>
29 #include "lib/zebra.h"
31 #include "lib/prefix.h"
32 #include "bgpd/bgpd.h"
33 #include "bgpd/bgp_encap_types.h"
35 /* probably ought to have a field-specific define in config.h */
36 # ifndef s6_addr32 /* for solaris/bsd */
38 # define s6_addr32 _S6_un._S6_u32
40 # define s6_addr32 __u6_addr.__u6_addr32
44 #define RFAPI_V4_ADDR 0x04
45 #define RFAPI_V6_ADDR 0x06
46 #define RFAPI_SHOW_STR "VNC information\n"
50 uint8_t addr_family
; /* AF_INET | AF_INET6 */
53 struct in_addr v4
; /* in network order */
54 struct in6_addr v6
; /* in network order */
58 struct rfapi_ip_prefix
61 uint8_t cost
; /* bgp local pref = 255 - cost */
62 struct rfapi_ip_addr prefix
;
71 struct rfapi_next_hop_entry
73 struct rfapi_next_hop_entry
*next
;
74 struct rfapi_ip_prefix prefix
;
76 struct rfapi_ip_addr un_address
;
77 struct rfapi_ip_addr vn_address
;
78 struct rfapi_vn_option
*vn_options
;
79 struct rfapi_un_option
*un_options
;
82 #define RFAPI_REMOVE_RESPONSE_LIFETIME 0
83 #define RFAPI_INFINITE_LIFETIME 0xFFFFFFFF
85 struct rfapi_l2address_option
87 struct ethaddr macaddr
; /* use 0 to assign label to IP prefix */
88 uint32_t label
; /* 20bit label in low bits, no TC, S, or TTL */
89 uint32_t logical_net_id
; /* ~= EVPN Ethernet Segment Id,
90 must not be zero for mac regis. */
92 uint16_t tag_id
; /* EVPN Ethernet Tag ID, 0 = none */
97 RFAPI_UN_OPTION_TYPE_PROVISIONAL
, /* internal use only */
98 RFAPI_UN_OPTION_TYPE_TUNNELTYPE
,
99 } rfapi_un_option_type
;
101 struct rfapi_tunneltype_option
103 bgp_encap_types type
;
106 struct bgp_encap_type_reserved reserved
;
107 struct bgp_encap_type_l2tpv3_over_ip l2tpv3_ip
;
108 struct bgp_encap_type_gre gre
;
109 struct bgp_encap_type_transmit_tunnel_endpoint transmit_tunnel_endpoint
;
110 struct bgp_encap_type_ipsec_in_tunnel_mode ipsec_tunnel
;
111 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode ip_ipsec
;
112 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode mpls_ipsec
;
113 struct bgp_encap_type_ip_in_ip ip_ip
;
114 struct bgp_encap_type_vxlan vxlan
;
115 struct bgp_encap_type_nvgre nvgre
;
116 struct bgp_encap_type_mpls mpls
;
117 struct bgp_encap_type_mpls_in_gre mpls_gre
;
118 struct bgp_encap_type_vxlan_gpe vxlan_gpe
;
119 struct bgp_encap_type_mpls_in_udp mpls_udp
;
120 struct bgp_encap_type_pbb pbb
;
124 struct rfapi_un_option
126 struct rfapi_un_option
*next
;
127 rfapi_un_option_type type
;
130 struct rfapi_tunneltype_option tunnel
;
136 RFAPI_VN_OPTION_TYPE_L2ADDR
= 3, /* Layer 2 address, 3 for legacy compatibility */
137 RFAPI_VN_OPTION_TYPE_LOCAL_NEXTHOP
, /* for static routes */
138 RFAPI_VN_OPTION_TYPE_INTERNAL_RD
, /* internal use only */
139 } rfapi_vn_option_type
;
141 struct rfapi_vn_option
143 struct rfapi_vn_option
*next
;
145 rfapi_vn_option_type type
;
149 struct rfapi_l2address_option l2addr
;
152 * If this option is present, the next hop is local to the
153 * client NVE (i.e., not via a tunnel).
155 struct rfapi_nexthop local_nexthop
;
158 * For rfapi internal use only
160 struct prefix_rd internal_rd
;
164 struct rfapi_l2address_option_match
166 struct rfapi_l2address_option o
;
169 #define RFAPI_L2O_MACADDR 0x00000001
170 #define RFAPI_L2O_LABEL 0x00000002
171 #define RFAPI_L2O_LNI 0x00000004
172 #define RFAPI_L2O_LHI 0x00000008
175 #define VNC_CONFIG_STR "VNC/RFP related configuration\n"
177 typedef void *rfapi_handle
;
179 /***********************************************************************
181 ***********************************************************************/
182 /*------------------------------------------
183 * rfapi_response_cb_t (callback typedef)
185 * Callbacks of this type are used to provide asynchronous
186 * route updates from RFAPI to the RFP client.
189 * called to notify the rfp client that a next hop list
190 * that has previously been provided in response to an
191 * rfapi_query call has been updated. Deleted routes are indicated
192 * with lifetime==RFAPI_REMOVE_RESPONSE_LIFETIME.
194 * By default, the routes an NVE receives via this callback include
195 * its own routes (that it has registered). However, these may be
196 * filtered out if the global BGP_VNC_CONFIG_FILTER_SELF_FROM_RSP
200 * called to notify the rfp client that a local route
201 * has been added or deleted. Deleted routes are indicated
202 * with lifetime==RFAPI_REMOVE_RESPONSE_LIFETIME.
205 * next_hops a list of possible next hops.
206 * This is a linked list allocated within the
207 * rfapi. The response_cb callback function is responsible
208 * for freeing this memory via rfapi_free_next_hop_list()
209 * in order to avoid memory leaks.
211 * userdata value (cookie) originally specified in call to
214 *------------------------------------------*/
215 typedef void (rfapi_response_cb_t
) (struct rfapi_next_hop_entry
* next_hops
,
218 /*------------------------------------------
219 * rfapi_nve_close_cb_t (callback typedef)
221 * Callbacks of this type are used to provide asynchronous
222 * notification that an rfapi_handle was invalidated
225 * pHandle Firmerly valid rfapi_handle returned to
226 * client via rfapi_open().
228 * reason EIDRM handle administratively closed (clear nve ...)
229 * ESTALE handle invalidated by configuration change
231 *------------------------------------------*/
232 typedef void (rfapi_nve_close_cb_t
) (rfapi_handle pHandle
, int reason
);
234 /*------------------------------------------
235 * rfp_cfg_write_cb_t (callback typedef)
237 * This callback is used to generate output for any config parameters
238 * that may supported by RFP via RFP defined vty commands at the bgp
239 * level. See loglevel as an example.
242 * vty -- quagga vty context
243 * rfp_start_val -- value returned by rfp_start
246 * to vty, rfp related configuration
250 --------------------------------------------*/
251 typedef int (rfp_cfg_write_cb_t
) (struct vty
* vty
, void *rfp_start_val
);
253 /*------------------------------------------
254 * rfp_cfg_group_write_cb_t (callback typedef)
256 * This callback is used to generate output for any config parameters
257 * that may supported by RFP via RFP defined vty commands at the
258 * L2 or NVE level. See loglevel as an example.
261 * vty quagga vty context
262 * rfp_start_val value returned by rfp_start
265 * rfp_cfg_group Pointer to configuration structure
268 * to vty, rfp related configuration
272 --------------------------------------------*/
275 RFAPI_RFP_CFG_GROUP_DEFAULT
,
276 RFAPI_RFP_CFG_GROUP_NVE
,
277 RFAPI_RFP_CFG_GROUP_L2
278 } rfapi_rfp_cfg_group_type
;
280 typedef int (rfp_cfg_group_write_cb_t
) (struct vty
* vty
,
282 rfapi_rfp_cfg_group_type type
,
284 void *rfp_cfg_group
);
286 /***********************************************************************
287 * Configuration related defines and structures
288 ***********************************************************************/
290 struct rfapi_rfp_cb_methods
292 rfp_cfg_write_cb_t
*cfg_cb
; /* show top level config */
293 rfp_cfg_group_write_cb_t
*cfg_group_cb
; /* show group level config */
294 rfapi_response_cb_t
*response_cb
; /* unsolicited responses */
295 rfapi_response_cb_t
*local_cb
; /* local route add/delete */
296 rfapi_nve_close_cb_t
*close_cb
; /* handle closed */
301 * If a route with infinite lifetime is withdrawn, this is
302 * how long (in seconds) to wait before expiring it (because
303 * RFAPI_LIFETIME_MULTIPLIER_PCT * infinity is too long to wait)
305 #define RFAPI_LIFETIME_INFINITE_WITHDRAW_DELAY (60*120)
308 * the factor that should be applied to a prefix's <lifetime> value
309 * before using it to expire a withdrawn prefix, expressed as a percent.
310 * Thus, a value of 100 means to use the exact value of <lifetime>,
311 * a value of 200 means to use twice the value of <lifetime>, etc.
313 #define RFAPI_RFP_CFG_DEFAULT_HOLDDOWN_FACTOR 150
316 * This is used by rfapi to determine if RFP is using/supports
317 * a partial (i.e., cache) or full table download approach for
318 * mapping information. When full table download approach is
319 * used all information is passed to RFP after an initial
320 * rfapi_query. When partial table download is used, only
321 * information matching a query is passed.
325 RFAPI_RFP_DOWNLOAD_PARTIAL
= 0,
326 RFAPI_RFP_DOWNLOAD_FULL
327 } rfapi_rfp_download_type
;
329 #define RFAPI_RFP_CFG_DEFAULT_FTD_ADVERTISEMENT_INTERVAL 1
333 /* partial or full table download */
334 rfapi_rfp_download_type download_type
; /* default=partial */
336 * When full-table-download is enabled, this is the minimum
337 * number of seconds between times a non-queried prefix will
338 * be updated to a particular NVE.
339 * default: RFAPI_RFP_CFG_DEFAULT_FTD_ADVERTISEMENT_INTERVAL
341 uint32_t ftd_advertisement_interval
;
343 * percentage of registration lifetime to continue to use information
344 * post soft-state refresh timeout
345 default: RFAPI_RFP_CFG_DEFAULT_HOLDDOWN_FACTOR
347 uint32_t holddown_factor
;
348 /* Control generation of updated RFP responses */
349 uint8_t use_updated_response
; /* default=0/no */
350 /* when use_updated_response, also generate remove responses */
351 uint8_t use_removes
; /* default=0/no */
354 /***********************************************************************
355 * Process related functions -- MUST be provided by the RFAPI user <<===
356 ***********************************************************************/
358 /*------------------------------------------
361 * This function will start the RFP code
364 * master quagga thread_master to tie into bgpd threads
367 * cfgp Pointer to rfapi_rfp_cfg (null = use defaults),
368 * copied by caller, updated via rfp_set_configuration
369 * cbmp Pointer to rfapi_rfp_cb_methods, may be null
370 * copied by caller, updated via rfapi_rfp_set_cb_methods
372 * rfp_start_val rfp returned value passed on rfp_stop and other rfapi calls
373 --------------------------------------------*/
376 struct thread_master
*master
,
377 struct rfapi_rfp_cfg
**cfgp
,
378 struct rfapi_rfp_cb_methods
**cbmp
);
380 /*------------------------------------------
383 * This function is called on shutdown to trigger RFP cleanup
392 --------------------------------------------*/
394 rfp_stop (void *rfp_start_val
);
396 /***********************************************************************
397 * RFP processing behavior configuration
398 ***********************************************************************/
400 /*------------------------------------------
401 * rfapi_rfp_set_configuration
403 * This is used to change rfapi's processing behavior based on
407 * rfp_start_val value returned by rfp_start
408 * rfapi_rfp_cfg Pointer to configuration structure
415 * ENXIO Unabled to locate configured BGP/VNC
416 --------------------------------------------*/
418 rfapi_rfp_set_configuration (
420 struct rfapi_rfp_cfg
*rfp_cfg
);
422 /*------------------------------------------
423 * rfapi_rfp_set_cb_methods
425 * Change registered callback functions for asynchronous notifications
426 * from RFAPI to the RFP client.
429 * rfp_start_val value by rfp_start
430 * methods Pointer to struct rfapi_rfp_cb_methods containing
431 * pointers to callback methods as described above
435 * ENXIO BGP or VNC not configured
436 *------------------------------------------*/
438 rfapi_rfp_set_cb_methods (
440 struct rfapi_rfp_cb_methods
*methods
);
442 /***********************************************************************
443 * RFP group specific configuration
444 ***********************************************************************/
446 /*------------------------------------------
447 * rfapi_rfp_init_group_config_ptr_vty
449 * This is used to init or return a previously init'ed group specific
450 * configuration pointer. Group is identified by vty context.
451 * NOTE: size is ignored when a previously init'ed value is returned.
452 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
453 * bgp restart or shutdown.
456 * rfp_start_val value returned by rfp_start
458 * vty quagga vty context
459 * size number of bytes to allocation
465 * rfp_cfg_group NULL or Pointer to configuration structure
466 --------------------------------------------*/
468 rfapi_rfp_init_group_config_ptr_vty (
470 rfapi_rfp_cfg_group_type type
,
474 /*------------------------------------------
475 * rfapi_rfp_get_group_config_ptr_vty
477 * This is used to get group specific configuration pointer.
478 * Group is identified by type and vty context.
479 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
480 * bgp restart or shutdown.
483 * rfp_start_val value returned by rfp_start
485 * vty quagga vty context
491 * rfp_cfg_group Pointer to configuration structure
492 --------------------------------------------*/
494 rfapi_rfp_get_group_config_ptr_vty (
496 rfapi_rfp_cfg_group_type type
,
499 /*------------------------------------------
500 * rfp_group_config_search_cb_t (callback typedef)
502 * This callback is used to called from within a
503 * rfapi_rfp_get_group_config_ptr to check if the rfp_cfg_group
504 * matches the search criteria
507 * criteria RFAPI caller provided serach criteria
508 * rfp_cfg_group Pointer to configuration structure | NULL
515 --------------------------------------------*/
516 typedef int (rfp_group_config_search_cb_t
) (void *criteria
,
517 void *rfp_cfg_group
);
519 /*------------------------------------------
520 * rfapi_rfp_get_group_config_ptr_name
522 * This is used to get group specific configuration pointer.
523 * Group is identified by type and name context.
524 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
525 * bgp restart or shutdown.
528 * rfp_start_val value returned by rfp_start
531 * criteria RFAPI caller provided serach criteria
532 * search_cb optional rfp_group_config_search_cb_t
538 * rfp_cfg_group Pointer to configuration structure
539 --------------------------------------------*/
541 rfapi_rfp_get_group_config_ptr_name (
543 rfapi_rfp_cfg_group_type type
,
546 rfp_group_config_search_cb_t
*search_cb
);
548 /*------------------------------------------
549 * rfapi_rfp_get_l2_group_config_ptr_lni
551 * This is used to get group specific configuration pointer.
552 * Group is identified by type and logical network identifier.
553 * RFAPI frees rfp_cfg_group when group is deleted during reconfig,
554 * bgp restart or shutdown.
557 * rfp_start_val value returned by rfp_start
558 * logical_net_id group logical network identifier
559 * criteria RFAPI caller provided serach criteria
560 * search_cb optional rfp_group_config_search_cb_t
566 * rfp_cfg_group Pointer to configuration structure
567 --------------------------------------------*/
569 rfapi_rfp_get_l2_group_config_ptr_lni (
571 uint32_t logical_net_id
,
573 rfp_group_config_search_cb_t
*search_cb
);
575 /***********************************************************************
577 ***********************************************************************/
579 /*------------------------------------------
582 * This function initializes a NVE record and associates it with
583 * the specified VN and underlay network addresses
586 * rfp_start_val value returned by rfp_start
587 * vn NVE virtual network address
589 * un NVE underlay network address
591 * default_options Default options to use on registrations.
592 * For now only tunnel type is supported.
593 * May be overridden per-prefix in rfapi_register().
594 * Caller owns (rfapi_open() does not free)
596 * response_cb Pointer to next hop list update callback function or
597 * NULL when no callbacks are desired.
599 * userdata Passed to subsequent response_cb invocations.
602 * response_lifetime The length of time that responses sent to this
605 * pHandle pointer to location to store rfapi handle. The
606 * handle must be passed on subsequent rfapi_ calls.
611 * EEXIST NVE with this {vn,un} already open
612 * ENOENT No matching nve group config
613 * ENOMSG Matched nve group config was incomplete
614 * ENXIO BGP or VNC not configured
615 * EAFNOSUPPORT Matched nve group specifies auto-assignment of RD,
616 * but underlay network address is not IPv4
617 * EDEADLK Called from within a callback procedure
618 *------------------------------------------*/
622 struct rfapi_ip_addr
*vn
,
623 struct rfapi_ip_addr
*un
,
624 struct rfapi_un_option
*default_options
,
625 uint32_t *response_lifetime
,
627 rfapi_handle
*pHandle
);
630 /*------------------------------------------
633 * Shut down NVE session and release associated data. Calling
634 * from within a rfapi callback procedure is permitted (the close
635 * will be completed asynchronously after the callback finishes).
638 * rfd: rfapi descriptor returned by rfapi_open
644 * EBADF invalid handle
645 * ENXIO BGP or VNC not configured
646 *------------------------------------------*/
648 rfapi_close (rfapi_handle rfd
);
650 /*------------------------------------------
653 * Test rfapi descriptor
656 * rfd: rfapi descriptor returned by rfapi_open
661 * 0 Success: handle is valid and usable
662 * EINVAL null argument
663 * ESTALE formerly valid handle invalidated by config, needs close
664 * EBADF invalid handle
665 * ENXIO BGP or VNC not configured
666 * EAFNOSUPPORT Internal addressing error
667 *------------------------------------------*/
669 rfapi_check (rfapi_handle rfd
);
671 /***********************************************************************
673 ***********************************************************************/
675 /*------------------------------------------
678 * This function queries the RIB for a
679 * particular route. Note that this call may result in subsequent
680 * callbacks to response_cb. Response callbacks can be cancelled
681 * by calling rfapi_query_done. A duplicate query using the same target
682 * will result in only one callback per change in next_hops. (i.e.,
683 * cancel/replace the prior query results.)
686 * rfd: rfapi descriptor returned by rfapi_open
687 * target: the destination address
688 * l2o ptr to L2 Options struct, NULL if not present in query
691 * ppNextHopEntry pointer to a location to store a pointer
692 * to the returned list of nexthops. It is the
693 * caller's responsibility to free this list
694 * via rfapi_free_next_hop_list().
699 * EBADF invalid handle
700 * ENOENT no valid route
701 * ENXIO BGP or VNC not configured
702 * ESTALE descriptor is no longer usable; should be closed
703 * EDEADLK Called from within a callback procedure
704 --------------------------------------------*/
708 struct rfapi_ip_addr
*target
,
709 struct rfapi_l2address_option
*l2o
,
710 struct rfapi_next_hop_entry
**ppNextHopEntry
);
712 /*------------------------------------------
715 * Notifies the rfapi that the user is no longer interested
716 * in the specified target.
719 * rfd: rfapi descriptor returned by rfapi_open
720 * target: the destination address
726 * EBADF invalid handle
727 * ENOENT no match found for target
728 * ENXIO BGP or VNC not configured
729 * ESTALE descriptor is no longer usable; should be closed
730 * EDEADLK Called from within a callback procedure
731 --------------------------------------------*/
733 rfapi_query_done (rfapi_handle rfd
, struct rfapi_ip_addr
*target
);
735 /*------------------------------------------
736 * rfapi_query_done_all
738 * Notifies the rfapi that the user is no longer interested
742 * rfd: rfapi descriptor returned by rfapi_open
745 * count: number of queries cleared
749 * EBADF invalid handle
750 * ENXIO BGP or VNC not configured
751 * ESTALE descriptor is no longer usable; should be closed
752 * EDEADLK Called from within a callback procedure
753 --------------------------------------------*/
755 rfapi_query_done_all (rfapi_handle rfd
, int *count
);
757 /*------------------------------------------
760 * Requests that reachability to the indicated prefix via this NVE
761 * be advertised by BGP. If <unregister> is non-zero, then the previously-
762 * advertised prefix should be withdrawn.
764 * (This function should NOT be called if the rfapi_open() function
768 * rfd: rfapi descriptor returned by rfapi_open
769 * prefix: A prefix to be registered or deregistered
770 * lifetime Prefix lifetime in seconds, host byte order
771 * options_un underlay netowrk options, may include tunnel-type
772 * Caller owns (rfapi_register() does not free).
773 * options_vn virtual network options, may include layer 2 address
774 * option and local-nexthop option
775 * Caller owns (rfapi_register() does not free).
777 * action: RFAPI_REGISTER_ADD add the route
778 * RFAPI_REGISTER_WITHDRAW withdraw route
779 * RFAPI_REGISTER_KILL withdraw without holddown
783 * EBADF invalid handle
784 * ENXIO BGP or VNC not configured
785 * ESTALE descriptor is no longer usable; should be closed
786 * EDEADLK Called from within a callback procedure
787 --------------------------------------------*/
792 RFAPI_REGISTER_WITHDRAW
,
794 } rfapi_register_action
;
799 struct rfapi_ip_prefix
*prefix
,
801 struct rfapi_un_option
*options_un
,
802 struct rfapi_vn_option
*options_vn
,
803 rfapi_register_action action
);
805 /***********************************************************************
806 * Helper / Utility functions
807 ***********************************************************************/
809 /*------------------------------------------
812 * Get the virtual network address used by an NVE based on it's RFD
815 * rfd: rfapi descriptor returned by rfapi_open or rfapi_create_generic
820 * vn NVE virtual network address
821 *------------------------------------------*/
822 extern struct rfapi_ip_addr
*
823 rfapi_get_vn_addr (void *);
825 /*------------------------------------------
828 * Get the underlay network address used by an NVE based on it's RFD
831 * rfd: rfapi descriptor returned by rfapi_open or rfapi_create_generic
836 * un NVE underlay network address
837 *------------------------------------------*/
838 extern struct rfapi_ip_addr
*
839 rfapi_get_un_addr (void *);
841 /*------------------------------------------
844 * Returns a string describing the rfapi error code.
848 * code Error code returned by rfapi function
852 * const char * String
853 *------------------------------------------*/
855 rfapi_error_str (int code
);
857 /*------------------------------------------
858 * rfapi_get_rfp_start_val
860 * Returns value passed to rfapi on rfp_start
863 * void * bgp structure
867 *------------------------------------------*/
869 rfapi_get_rfp_start_val (void *bgpv
);
871 /*------------------------------------------
874 * Compare two generic rfapi descriptors.
877 * rfd1: rfapi descriptor returned by rfapi_open or rfapi_create_generic
878 * rfd2: rfapi descriptor returned by rfapi_open or rfapi_create_generic
885 *------------------------------------------*/
887 rfapi_compare_rfds (void *rfd1
, void *rfd2
);
889 /*------------------------------------------
890 * rfapi_free_next_hop_list
892 * Frees a next_hop_list returned by a rfapi_query invocation
895 * list: a pointer to a response list (as a
896 * struct rfapi_next_hop_entry) to free.
901 --------------------------------------------*/
903 rfapi_free_next_hop_list (struct rfapi_next_hop_entry
*list
);
905 /*------------------------------------------
906 * rfapi_get_response_lifetime_default
908 * Returns the default lifetime for a response.
909 * rfp_start_val value returned by rfp_start or
910 * NULL (=use default instance)
917 * return value: The bgp instance default lifetime for a response.
918 --------------------------------------------*/
920 rfapi_get_response_lifetime_default (void *rfp_start_val
);
922 /*------------------------------------------
923 * rfapi_is_vnc_configured
925 * Returns if VNC (BGP VPN messaging /VPN & encap SAFIs) are configured
928 * rfp_start_val value returned by rfp_start or
929 * NULL (=use default instance)
933 * return value: If VNC is configured for the bgpd instance
935 * ENXIO VNC not configured
936 --------------------------------------------*/
938 rfapi_is_vnc_configured (void *rfp_start_val
);
940 /*------------------------------------------
941 * rfapi_bgp_lookup_by_rfp
943 * Find bgp instance pointer based on value returned by rfp_start
946 * rfp_start_val value returned by rfp_startor
947 * NULL (=get default instance)
953 * bgp bgp instance pointer
956 --------------------------------------------*/
958 rfapi_bgp_lookup_by_rfp (void *rfp_start_val
);
960 /*------------------------------------------
961 * rfapi_get_rfp_start_val_by_bgp
963 * Find bgp instance pointer based on value returned by rfp_start
966 * bgp bgp instance pointer
975 --------------------------------------------*/
977 rfapi_get_rfp_start_val_by_bgp (struct bgp
*bgp
);
979 #endif /* ENABLE_BGP_VNC */
981 #endif /* _QUAGGA_BGP_RFAPI_H */