RTRlib
Loading...
Searching...
No Matches
aspa_private.h File Reference
#include "aspa.h"
#include "rtrlib/lib/log_private.h"
#include "rtrlib/rtr/rtr.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  aspa_store_node
 A linked list storing the bond between a rtr_socket and an aspa_array . More...
 
struct  aspa_update_operation
 A struct describing a specific type of operation that should be performed using the attached ASPA record. More...
 
struct  aspa_update
 Computed ASPA update. More...
 

Macros

#define ASPA_NOTIFY_NO_OPS   0
 
#define ASPA_DBG1(a)   lrtr_dbg("ASPA: " a)
 

Enumerations

enum  aspa_hop_result { ASPA_NO_ATTESTATION , ASPA_NOT_PROVIDER_PLUS , ASPA_PROVIDER_PLUS }
 

Functions

enum aspa_hop_result aspa_check_hop (struct aspa_table *aspa_table, uint32_t customer_asn, uint32_t provider_asn)
 Checks a hop in the given AS_PATH.
 
enum aspa_status aspa_table_src_replace (struct aspa_table *dst, struct aspa_table *src, struct rtr_socket *rtr_socket, bool notify_dst, bool notify_src)
 Replaces all ASPA records associated with the given socket with the records in the src table.
 
enum aspa_status aspa_table_update_swap_in_compute (struct aspa_table *aspa_table, struct rtr_socket *rtr_socket, struct aspa_update_operation *operations, size_t count, struct aspa_update **update)
 Computes an update structure that can later be applied to the given ASPA table.
 
void aspa_table_update_swap_in_apply (struct aspa_update **update)
 Applies the given update, as previously computed by aspa_table_update_swap_in_compute, releases memory allocated while computing the update and unlocks update lock.
 
void aspa_table_update_swap_in_discard (struct aspa_update **update)
 Discards the given update, releases memory allocated while computing the update and unlocks update lock.
 
enum aspa_status aspa_table_update_in_place (struct aspa_table *aspa_table, struct rtr_socket *rtr_socket, struct aspa_update_operation *operations, size_t count, struct aspa_update_operation **failed_operation)
 Updates the given ASPA table.
 
enum aspa_status aspa_table_update_in_place_undo (struct aspa_table *aspa_table, struct rtr_socket *rtr_socket, struct aspa_update_operation *operations, size_t count, struct aspa_update_operation *failed_operation)
 Tries to undo operations up to failed_operation and then releases all operations.
 
void aspa_table_update_in_place_cleanup (struct aspa_update_operation **operations, size_t count)
 Releases operations and unused provider arrays.