Print this page
Support route deletion entries in SVP_R_LOG_ACK.


 236  * plug-in layer. These include:
 237  *
 238  *   o OOB Shootdowns
 239  *   o VL3->VL2 Lookups
 240  *   o VL2->UL3 Lookups
 241  *   o VL2 Log invalidations
 242  *   o VL3 Log injections
 243  */
 244 typedef void (*svp_vl2_lookup_f)(svp_t *, svp_status_t, const struct in6_addr *,
 245     const uint16_t, void *);
 246 typedef void (*svp_vl3_lookup_f)(svp_t *, svp_status_t, const uint8_t *,
 247     const struct in6_addr *, const uint16_t, void *);
 248 typedef void (*svp_vl2_invalidation_f)(svp_t *, const uint8_t *);
 249 typedef void (*svp_vl3_inject_f)(svp_t *, const uint16_t,
 250     const struct in6_addr *, const uint8_t *, const uint8_t *);
 251 typedef void (*svp_shootdown_f)(svp_t *, const uint8_t *,
 252     const struct in6_addr *, const uint16_t uport);
 253 typedef void (*svp_route_lookup_f)(svp_t *, svp_status_t, uint32_t, uint32_t,
 254     uint16_t, uint8_t *, uint8_t *, uint16_t, uint8_t *, uint8_t, uint8_t,
 255     void *);


 256 
 257 typedef struct svp_cb {
 258         svp_vl2_lookup_f        scb_vl2_lookup;
 259         svp_vl3_lookup_f        scb_vl3_lookup;
 260         svp_vl2_invalidation_f  scb_vl2_invalidate;
 261         svp_vl3_inject_f        scb_vl3_inject;
 262         svp_shootdown_f         scb_shootdown;
 263         svp_route_lookup_f      scb_route_lookup;

 264 } svp_cb_t;
 265 
 266 /*
 267  * Core implementation structure.
 268  */
 269 struct svp {
 270         overlay_plugin_dest_t   svp_dest;       /* RO */
 271         varpd_provider_handle_t *svp_hdl;       /* RO */
 272         svp_cb_t                svp_cb;         /* RO */
 273         uint64_t                svp_vid;        /* RO */
 274         avl_node_t              svp_rlink;      /* Owned by svp_remote */
 275         svp_remote_t            *svp_remote;    /* RO iff started */
 276         mutex_t                 svp_lock;
 277         char                    *svp_host;      /* svp_lock */
 278         uint16_t                svp_port;       /* svp_lock */
 279         uint16_t                svp_uport;      /* svp_lock */
 280         uint32_t                svp_dcid;       /* svp_lock (but write-once?) */
 281         boolean_t               svp_huip;       /* svp_lock */
 282         struct in6_addr         svp_uip;        /* svp_lock */
 283         /* NOTE: lower-3 bytes are 0s. */


 339 extern void svp_remote_degrade(svp_remote_t *, svp_degrade_state_t);
 340 extern void svp_remote_restore(svp_remote_t *, svp_degrade_state_t);
 341 
 342 /*
 343  * Misc.
 344  */
 345 extern int svp_comparator(const void *, const void *);
 346 extern void svp_remote_reassign(svp_remote_t *, svp_conn_t *);
 347 extern void svp_remote_resolved(svp_remote_t *, struct addrinfo *);
 348 extern void svp_host_queue(svp_remote_t *);
 349 extern void svp_query_release(svp_query_t *);
 350 extern void svp_query_crc32(svp_req_t *, void *, size_t);
 351 extern id_t svp_id_alloc(void);
 352 
 353 /*
 354  * Shootdown related
 355  */
 356 extern void svp_remote_shootdown_vl3(svp_remote_t *, svp_log_vl3_t *,
 357     svp_sdlog_t *);
 358 extern void svp_remote_shootdown_vl2(svp_remote_t *, svp_log_vl2_t *);

 359 extern void svp_remote_log_request(svp_remote_t *, svp_query_t *, void *,
 360     size_t);
 361 extern void svp_remote_lrm_request(svp_remote_t *, svp_query_t *, void *,
 362     size_t);
 363 extern void svp_shootdown_logr_cb(svp_remote_t *, svp_status_t, void *, size_t);

 364 extern void svp_shootdown_lrm_cb(svp_remote_t *, svp_status_t);
 365 extern void svp_shootdown_vl3_cb(svp_status_t, svp_log_vl3_t *, svp_sdlog_t *);
 366 extern int svp_shootdown_init(svp_remote_t *);
 367 extern void svp_shootdown_fini(svp_remote_t *);
 368 extern void svp_shootdown_start(svp_remote_t *);
 369 
 370 #ifdef __cplusplus
 371 }
 372 #endif
 373 
 374 #endif /* _LIBVARPD_SVP_H */


 236  * plug-in layer. These include:
 237  *
 238  *   o OOB Shootdowns
 239  *   o VL3->VL2 Lookups
 240  *   o VL2->UL3 Lookups
 241  *   o VL2 Log invalidations
 242  *   o VL3 Log injections
 243  */
 244 typedef void (*svp_vl2_lookup_f)(svp_t *, svp_status_t, const struct in6_addr *,
 245     const uint16_t, void *);
 246 typedef void (*svp_vl3_lookup_f)(svp_t *, svp_status_t, const uint8_t *,
 247     const struct in6_addr *, const uint16_t, void *);
 248 typedef void (*svp_vl2_invalidation_f)(svp_t *, const uint8_t *);
 249 typedef void (*svp_vl3_inject_f)(svp_t *, const uint16_t,
 250     const struct in6_addr *, const uint8_t *, const uint8_t *);
 251 typedef void (*svp_shootdown_f)(svp_t *, const uint8_t *,
 252     const struct in6_addr *, const uint16_t uport);
 253 typedef void (*svp_route_lookup_f)(svp_t *, svp_status_t, uint32_t, uint32_t,
 254     uint16_t, uint8_t *, uint8_t *, uint16_t, uint8_t *, uint8_t, uint8_t,
 255     void *);
 256 typedef void (*svp_route_shootdown_f)(svp_t *, uint8_t *, uint8_t *, uint8_t,
 257     uint8_t, uint16_t);
 258 
 259 typedef struct svp_cb {
 260         svp_vl2_lookup_f        scb_vl2_lookup;
 261         svp_vl3_lookup_f        scb_vl3_lookup;
 262         svp_vl2_invalidation_f  scb_vl2_invalidate;
 263         svp_vl3_inject_f        scb_vl3_inject;
 264         svp_shootdown_f         scb_shootdown;
 265         svp_route_lookup_f      scb_route_lookup;
 266         svp_route_shootdown_f   scb_route_shootdown;
 267 } svp_cb_t;
 268 
 269 /*
 270  * Core implementation structure.
 271  */
 272 struct svp {
 273         overlay_plugin_dest_t   svp_dest;       /* RO */
 274         varpd_provider_handle_t *svp_hdl;       /* RO */
 275         svp_cb_t                svp_cb;         /* RO */
 276         uint64_t                svp_vid;        /* RO */
 277         avl_node_t              svp_rlink;      /* Owned by svp_remote */
 278         svp_remote_t            *svp_remote;    /* RO iff started */
 279         mutex_t                 svp_lock;
 280         char                    *svp_host;      /* svp_lock */
 281         uint16_t                svp_port;       /* svp_lock */
 282         uint16_t                svp_uport;      /* svp_lock */
 283         uint32_t                svp_dcid;       /* svp_lock (but write-once?) */
 284         boolean_t               svp_huip;       /* svp_lock */
 285         struct in6_addr         svp_uip;        /* svp_lock */
 286         /* NOTE: lower-3 bytes are 0s. */


 342 extern void svp_remote_degrade(svp_remote_t *, svp_degrade_state_t);
 343 extern void svp_remote_restore(svp_remote_t *, svp_degrade_state_t);
 344 
 345 /*
 346  * Misc.
 347  */
 348 extern int svp_comparator(const void *, const void *);
 349 extern void svp_remote_reassign(svp_remote_t *, svp_conn_t *);
 350 extern void svp_remote_resolved(svp_remote_t *, struct addrinfo *);
 351 extern void svp_host_queue(svp_remote_t *);
 352 extern void svp_query_release(svp_query_t *);
 353 extern void svp_query_crc32(svp_req_t *, void *, size_t);
 354 extern id_t svp_id_alloc(void);
 355 
 356 /*
 357  * Shootdown related
 358  */
 359 extern void svp_remote_shootdown_vl3(svp_remote_t *, svp_log_vl3_t *,
 360     svp_sdlog_t *);
 361 extern void svp_remote_shootdown_vl2(svp_remote_t *, svp_log_vl2_t *);
 362 extern void svp_remote_shootdown_route(svp_remote_t *, svp_log_route_t *);
 363 extern void svp_remote_log_request(svp_remote_t *, svp_query_t *, void *,
 364     size_t);
 365 extern void svp_remote_lrm_request(svp_remote_t *, svp_query_t *, void *,
 366     size_t);
 367 extern void svp_shootdown_logr_cb(svp_remote_t *, svp_status_t, void *, size_t,
 368     uint16_t);
 369 extern void svp_shootdown_lrm_cb(svp_remote_t *, svp_status_t);
 370 extern void svp_shootdown_vl3_cb(svp_status_t, svp_log_vl3_t *, svp_sdlog_t *);
 371 extern int svp_shootdown_init(svp_remote_t *);
 372 extern void svp_shootdown_fini(svp_remote_t *);
 373 extern void svp_shootdown_start(svp_remote_t *);
 374 
 375 #ifdef __cplusplus
 376 }
 377 #endif
 378 
 379 #endif /* _LIBVARPD_SVP_H */