10#ifndef RTR_ASPA_ARRAY_H
11#define RTR_ASPA_ARRAY_H
struct aspa_record * aspa_array_search(struct aspa_array *array, uint32_t customer_asn)
Searches the given ASPA array for a record matching its customer ASN.
enum aspa_status aspa_array_create(struct aspa_array **array_ptr)
Creates an vector object.
enum aspa_status aspa_array_append(struct aspa_array *array, struct aspa_record *record, bool copy_providers)
Appends a given ASPA record to the array.
enum aspa_status aspa_array_remove(struct aspa_array *array, size_t index, bool free_providers)
Removes the record at the given index from the array.
struct aspa_record * aspa_array_get_record(struct aspa_array *array, size_t index)
Returns a reference to the record at the given index.
void aspa_array_free(struct aspa_array *array, bool free_provider_arrays)
Deletes the given ASPA array.
enum aspa_status aspa_array_insert(struct aspa_array *array, size_t index, struct aspa_record *record, bool copy_providers)
Inserts a given ASPA record into the array, preserving its order.
enum aspa_status aspa_array_reserve(struct aspa_array *array, size_t size)
Reserves some space in the array.
aspa_status
Possible return values for aspa_* functions.
Definition aspa.h:93
Struct which is similar in function to std::vector from C++.
Definition aspa_array.h:27
size_t capacity
Definition aspa_array.h:29
struct aspa_record * data
Definition aspa_array.h:30
uint32_t size
Definition aspa_array.h:28
ASPA Record Customer (Customer Autonomous Systen, CAS) authorizes a set of provider AS numbers.
Definition aspa.h:39
uint32_t customer_asn
Definition aspa.h:40