\doxysection{ASPA validation table}
\hypertarget{group__mod__aspa__h}{}\label{group__mod__aspa__h}\index{ASPA validation table@{ASPA validation table}}


The \doxylink{structaspa__table}{aspa\+\_\+table} is an abstract data structure to organize the validated Autonomous System Provider Authorization data received from an RPKI-\/\+RTR cache server.  


\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structaspa__record}{aspa\+\_\+record}}
\begin{DoxyCompactList}\small\item\em ASPA Record Customer (Customer Autonomous Systen, CAS) authorizes a set of provider AS numbers. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}
\begin{DoxyCompactList}\small\item\em ASPA Table. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structaspa__store__node}{aspa\+\_\+store\+\_\+node}}
\begin{DoxyCompactList}\small\item\em A linked list storing the bond between a {\ttfamily \doxylink{structrtr__socket}{rtr\+\_\+socket}} and an {\ttfamily \doxylink{structaspa__array}{aspa\+\_\+array}} . \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}}
\begin{DoxyCompactList}\small\item\em A struct describing a specific type of operation that should be performed using the attached ASPA record. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structaspa__update}{aspa\+\_\+update}}
\begin{DoxyCompactList}\small\item\em Computed ASPA update. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__mod__aspa__h_ga99aecfd7125862a9ccf646089a07ff99}{ASPA\+\_\+\+NOTIFY\+\_\+\+NO\+\_\+\+OPS}}~0
\item 
\#define \mbox{\hyperlink{group__mod__aspa__h_ga14e5e040ed1e623926190fb8ed2540d9}{ASPA\+\_\+\+DBG1}}(a)~\mbox{\hyperlink{log__private_8h_abb57f299264865eb02379019cfe4df0c}{lrtr\+\_\+dbg}}("{}ASPA\+: "{} a)
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__aspa__h_ga73e1e2e74f1f37727efe950d85fe659e}{aspa\+\_\+update\+\_\+fp}}) (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, const struct \mbox{\hyperlink{structaspa__record}{aspa\+\_\+record}} record, const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, const enum aspa\+\_\+operation\+\_\+type operation\+\_\+type)
\begin{DoxyCompactList}\small\item\em A function pointer that is called if an record was added to the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}} or was removed from the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} \{ \mbox{\hyperlink{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba333ca59c4b7fd9d978707b61f99fa3e1}{ASPA\+\_\+\+SUCCESS}} = 0
, \mbox{\hyperlink{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba94a14f32d253828c011673462409965d}{ASPA\+\_\+\+ERROR}} = -\/1
, \mbox{\hyperlink{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba63e715dc4046f8e70f41d74bd7e29104}{ASPA\+\_\+\+DUPLICATE\+\_\+\+RECORD}} = -\/2
, \mbox{\hyperlink{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba092af5098a5e3c65cc5bfd3d8d1dcc5d}{ASPA\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND}} = -\/3
 \}
\begin{DoxyCompactList}\small\item\em Possible return values for {\ttfamily aspa\+\_\+\texorpdfstring{$\ast$}{*}} functions. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_gae93026f450bf1c059af8104165cb7fa3}{aspa\+\_\+direction}} \{ \mbox{\hyperlink{group__mod__aspa__h_ggae93026f450bf1c059af8104165cb7fa3a2ce999f88416410f29548e8458c49e2d}{ASPA\+\_\+\+UPSTREAM}}
, \mbox{\hyperlink{group__mod__aspa__h_ggae93026f450bf1c059af8104165cb7fa3a1f6b0aaba561b06c1a8a81fe1c785854}{ASPA\+\_\+\+DOWNSTREAM}}
 \}
\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga3747a87e681c0b05309c156130d3d040}{aspa\+\_\+verification\+\_\+result}} \{ \mbox{\hyperlink{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040af9979638c4d6a7fb89d761e37f91eeec}{ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+UNKNOWN}}
, \mbox{\hyperlink{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040acee7897d6fea28cf74be0f8a39914e7a}{ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+INVALID}}
, \mbox{\hyperlink{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040ae969bcd04b6b9a380ae0f6d1b8050ae5}{ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+VALID}}
 \}
\begin{DoxyCompactList}\small\item\em AS\+\_\+\+PATH verification result. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga620bdcc08f49a3cd6aa2ae843d4910d8}{aspa\+\_\+hop\+\_\+result}} \{ \mbox{\hyperlink{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8aeb9b30298feef9f705089ec21dd62ee4}{ASPA\+\_\+\+NO\+\_\+\+ATTESTATION}}
, \mbox{\hyperlink{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8aace21d81320b08a8ff499e24287b5cf9}{ASPA\+\_\+\+NOT\+\_\+\+PROVIDER\+\_\+\+PLUS}}
, \mbox{\hyperlink{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8adc581664da5df8ca79f3e5964ff90f89}{ASPA\+\_\+\+PROVIDER\+\_\+\+PLUS}}
 \}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga802f0e1cfe85d12ee45a765bad37d250}{\+\_\+\+\_\+attribute\+\_\+\+\_\+}} ((\+\_\+\+\_\+packed\+\_\+\+\_\+)) aspa\+\_\+operation\+\_\+type
\begin{DoxyCompactList}\small\item\em An enum describing the type of operation the ASPA table should perform using any given ASPA record. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__aspa__h_ga9f7ce0bb07be778240c2cfd681f56c78}{aspa\+\_\+table\+\_\+init}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, \mbox{\hyperlink{group__mod__aspa__h_ga73e1e2e74f1f37727efe950d85fe659e}{aspa\+\_\+update\+\_\+fp}} update\+\_\+fp)
\begin{DoxyCompactList}\small\item\em Initializes the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}} struct. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__aspa__h_ga0712bf1c04fdf206369c44c4a926ad67}{aspa\+\_\+table\+\_\+free}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, bool notify)
\begin{DoxyCompactList}\small\item\em Frees the memory associated with the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}}. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} \mbox{\hyperlink{group__mod__aspa__h_gaf9c530f15c3cba970deb12a58f33681f}{aspa\+\_\+table\+\_\+src\+\_\+remove}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, bool notify)
\begin{DoxyCompactList}\small\item\em Removes all records in the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}} that originated from the socket. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga3747a87e681c0b05309c156130d3d040}{aspa\+\_\+verification\+\_\+result}} \mbox{\hyperlink{group__mod__aspa__h_gae8450471c894e69b4fec30e85fa3594f}{aspa\+\_\+verify\+\_\+as\+\_\+path}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, uint32\+\_\+t as\+\_\+path\mbox{[}$\,$\mbox{]}, size\+\_\+t \mbox{\hyperlink{rtr__pdus_8h_a96bbf959016e4411c9e6b9812a8be60a}{len}}, enum \mbox{\hyperlink{group__mod__aspa__h_gae93026f450bf1c059af8104165cb7fa3}{aspa\+\_\+direction}} direction)
\begin{DoxyCompactList}\small\item\em Verifies an AS\+\_\+\+PATH . \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{group__mod__aspa__h_ga9f95586274d22d5b829d30cc2f436f28}{aspa\+\_\+collapse\+\_\+as\+\_\+path}} (uint32\+\_\+t as\+\_\+path\mbox{[}$\,$\mbox{]}, size\+\_\+t \mbox{\hyperlink{rtr__pdus_8h_a96bbf959016e4411c9e6b9812a8be60a}{len}})
\begin{DoxyCompactList}\small\item\em Collapses an {\ttfamily AS\+\_\+\+PATH} in-\/place, replacing in-\/series repetitions with single occurences. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga620bdcc08f49a3cd6aa2ae843d4910d8}{aspa\+\_\+hop\+\_\+result}} \mbox{\hyperlink{group__mod__aspa__h_ga345af12295112b728171c67ed965c2cb}{aspa\+\_\+check\+\_\+hop}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, uint32\+\_\+t customer\+\_\+asn, uint32\+\_\+t provider\+\_\+asn)
\begin{DoxyCompactList}\small\item\em Checks a hop in the given {\ttfamily AS\+\_\+\+PATH}. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} \mbox{\hyperlink{group__mod__aspa__h_gad0a535d13461bfd72e2fba79c21830a5}{aspa\+\_\+table\+\_\+src\+\_\+replace}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}dst, struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}src, struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, bool notify\+\_\+dst, bool notify\+\_\+src)
\begin{DoxyCompactList}\small\item\em Replaces all ASPA records associated with the given socket with the records in the src table. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} \mbox{\hyperlink{group__mod__aspa__h_ga345fa1009c45167be8101732e905263a}{aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+compute}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}operations, size\+\_\+t count, struct \mbox{\hyperlink{structaspa__update}{aspa\+\_\+update}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}update)
\begin{DoxyCompactList}\small\item\em Computes an update structure that can later be applied to the given ASPA table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__aspa__h_ga5062a9b2c0c2c809fd1495d69ef1e2ee}{aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+apply}} (struct \mbox{\hyperlink{structaspa__update}{aspa\+\_\+update}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}update)
\begin{DoxyCompactList}\small\item\em Applies the given update, as previously computed by {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+compute}, releases memory allocated while computing the update and unlocks update lock. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__aspa__h_ga04b379b6d202be04df83125d202861b9}{aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+discard}} (struct \mbox{\hyperlink{structaspa__update}{aspa\+\_\+update}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}update)
\begin{DoxyCompactList}\small\item\em Discards the given update, releases memory allocated while computing the update and unlocks update lock. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} \mbox{\hyperlink{group__mod__aspa__h_ga737e5471293aa6f82a7d6232757019c5}{aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}operations, size\+\_\+t count, struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}failed\+\_\+operation)
\begin{DoxyCompactList}\small\item\em Updates the given ASPA table. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} \mbox{\hyperlink{group__mod__aspa__h_ga72f4845ce23b5b5c228a367a4ad15a67}{aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place\+\_\+undo}} (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}operations, size\+\_\+t count, struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}failed\+\_\+operation)
\begin{DoxyCompactList}\small\item\em Tries to undo {\ttfamily operations} up to {\ttfamily failed\+\_\+operation} and then releases all operations. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__aspa__h_ga63c7569dee91f327ee65bd8efa14a128}{aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place\+\_\+cleanup}} (struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}operations, size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Releases operations and unused provider arrays. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \doxylink{structaspa__table}{aspa\+\_\+table} is an abstract data structure to organize the validated Autonomous System Provider Authorization data received from an RPKI-\/\+RTR cache server. 

The {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}} is an abstract data structure to organize the validated Autonomous System Provider Authorization data received from an RPKI-\/\+RTR cache server.\hypertarget{group__mod__aspa__h_autotoc_md0}{}\doxysubsection{\texorpdfstring{Updating an ASPA table}{Updating an ASPA table}}\label{group__mod__aspa__h_autotoc_md0}
ASPA tables implement aggregated updating using an array of \textquotesingle{}add record\textquotesingle{} and \textquotesingle{}remove record\textquotesingle{} operations -- reducing iterations and memory allocations. E.\+g., these operations can be derived from a RTR cache response. Currently, two distinct update mechanisms are supported\+: {\bfseries{Swap-\/\+In}} and {\bfseries{In-\/\+Place}} updates. Use the macro {\ttfamily ASPA\+\_\+\+UPDATE\+\_\+\+MECHANISM} in rtr/packets.\+c to configure which implementation is used during syncing. The array of operations is effectively a diff to the table\textquotesingle{}s previous state. This diff can be conveniently used to notify callers about changes once the update is applied.\hypertarget{group__mod__aspa__h_autotoc_md1}{}\doxysubsubsection{\texorpdfstring{Swap-\/\+In Update Mechanism}{Swap-In Update Mechanism}}\label{group__mod__aspa__h_autotoc_md1}
The ASPA table\textquotesingle{}s {\bfseries{Swap-\/\+In}} update mechanism avoids blocking callers who want to verify an {\ttfamily AS\+\_\+\+PATH} (and therefore need read access to the table) while an update is in progress and removes the need for an {\itshape undo mechanism} in case the update to the ASPA table itself or some other action performed inbetween fails.

Performing an update using this mechanism involves these steps\+:
\begin{DoxyItemize}
\item {\bfseries{Compute Update}}\+: Every time you want to update a given ASPA table, call {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+compute}. This will create a new ASPA array, appending both existing records and new records. Everything needed to update the table is stored in an update structure.
\item {\bfseries{Apply Update}} or {\bfseries{Discard Update}}\+: You either have to apply the update using {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+apply} or discard it by calling {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+discard}. This will either swap in the newly created ASPA array and notify clients about changes or discard and release data that\textquotesingle{}s now unused.
\end{DoxyItemize}

The implementation guarantess no changes are made to the ASPA table between calling {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+compute} and {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+apply} or {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+discard}.\hypertarget{group__mod__aspa__h_autotoc_md2}{}\doxysubsubsection{\texorpdfstring{In-\/\+Place Update Mechanism}{In-Place Update Mechanism}}\label{group__mod__aspa__h_autotoc_md2}
The ASPA table\textquotesingle{}s {\bfseries{In-\/\+Place}} update mechanism involves in-\/place modifications to the array of records and an undo function that undoes changes made previously.

Performing an update using this mechanism involves these steps\+:
\begin{DoxyItemize}
\item {\bfseries{Update}}\+: Every time you want to update a given ASPA table, call {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place}. This will modify the ASPA array. If the update fails, {\ttfamily failed\+\_\+operation} will be set to the operation where the error occurring.
\item {\bfseries{Undo Update}}\+: You may, but do not need to, undo the update using {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place\+\_\+undo}. This will undo all operations up to {\ttfamily failed\+\_\+operation} or all operations.
\item {\bfseries{Clean Up}}\+: After computing the update you should go through a cleanup step using {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place\+\_\+cleanup}. This will deallocate provider arrays and other data created during the update that\textquotesingle{}s now unused.
\end{DoxyItemize}\hypertarget{group__mod__aspa__h_autotoc_md3}{}\doxysubsubsection{\texorpdfstring{Special Cases}{Special Cases}}\label{group__mod__aspa__h_autotoc_md3}
There\textquotesingle{}re various cases that need to be handled appropriately by both implementations.
\begin{DoxyEnumerate}
\item {\bfseries{Add existing record}}\+: The caller attempts to add a record that\textquotesingle{}s already present in the table ({\ttfamily ASPA\+\_\+\+DUPLICATE\+\_\+\+RECORD}).
\item {\bfseries{Duplicate adds}}\+: The caller attempts to add two or more records with the same customer ASN ({\ttfamily ASPA\+\_\+\+DUPLICATE\+\_\+\+RECORD}).
\item {\bfseries{Removal of unknown record}}\+: The caller attempts to remove a record from the table that doesn\textquotesingle{}t exist ({\ttfamily ASPA\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND}).
\item {\bfseries{Duplicate removal}}\+: The caller attempts to remove a record twice or more ({\ttfamily ASPA\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND}).
\item {\bfseries{Complementary add/remove}}\+: The caller attempts to first add a record and then wants to remove the same record. This is equivalent to a no-\/op. {\ttfamily ASPA\+\_\+\+NOTIFY\+\_\+\+NO\+\_\+\+OPS} ({\ttfamily 1} or {\ttfamily 0}) determines if clients are notified about these no-\/ops.
\end{DoxyEnumerate}\hypertarget{group__mod__aspa__h_autotoc_md4}{}\doxysubsubsection{\texorpdfstring{Implementation Details}{Implementation Details}}\label{group__mod__aspa__h_autotoc_md4}
Both update mechanism implementations tackle the beforementioned cases by first sorting the array of \textquotesingle{}add\textquotesingle{} and \textquotesingle{}remove\textquotesingle{} operations by their customer ASN stably. That is, \textquotesingle{}add\textquotesingle{} and \textquotesingle{}remove\textquotesingle{} operations dealing with matching customer ASNs will remain in the same order as they arrived. This makes checking for cases 2 -\/ {\itshape Duplicate Announcement} and 4 -\/ {\itshape Duplicate Removal} easy as possible duplicates are neighbors in the operations array. Ordering the operations also enables skipping annihilating operations as described in case 5 -\/ {\itshape Complementary Announcement/\+Withdrawal}. Both implementations are comprised of a loop iterating over operations and a nested loop that handles records from the existing ASPA array with an ASN smaller than the current operation\textquotesingle{}s ASN.
\begin{DoxyItemize}
\item If the record in the existing array and the current \textquotesingle{}add\textquotesingle{} operation have a matching customer ASN, that\textquotesingle{}s case 1 -\/ {\itshape Announcement of Existing Record}.
\item If the record in the existing array and the current \textquotesingle{}remove\textquotesingle{} operation do not have a matching customer ASN, that\textquotesingle{}s case 3 -\/ {\itshape Removal of Unknown Record}. 
\end{DoxyItemize}

\doxysubsection{Macro Definition Documentation}
\Hypertarget{group__mod__aspa__h_ga14e5e040ed1e623926190fb8ed2540d9}\label{group__mod__aspa__h_ga14e5e040ed1e623926190fb8ed2540d9} 
\index{ASPA validation table@{ASPA validation table}!ASPA\_DBG1@{ASPA\_DBG1}}
\index{ASPA\_DBG1@{ASPA\_DBG1}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{ASPA\_DBG1}{ASPA\_DBG1}}
{\footnotesize\ttfamily \#define ASPA\+\_\+\+DBG1(\begin{DoxyParamCaption}\item[{}]{a }\end{DoxyParamCaption})~\mbox{\hyperlink{log__private_8h_abb57f299264865eb02379019cfe4df0c}{lrtr\+\_\+dbg}}("{}ASPA\+: "{} a)}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}

\Hypertarget{group__mod__aspa__h_ga99aecfd7125862a9ccf646089a07ff99}\label{group__mod__aspa__h_ga99aecfd7125862a9ccf646089a07ff99} 
\index{ASPA validation table@{ASPA validation table}!ASPA\_NOTIFY\_NO\_OPS@{ASPA\_NOTIFY\_NO\_OPS}}
\index{ASPA\_NOTIFY\_NO\_OPS@{ASPA\_NOTIFY\_NO\_OPS}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{ASPA\_NOTIFY\_NO\_OPS}{ASPA\_NOTIFY\_NO\_OPS}}
{\footnotesize\ttfamily \#define ASPA\+\_\+\+NOTIFY\+\_\+\+NO\+\_\+\+OPS~0}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



\doxysubsection{Typedef Documentation}
\Hypertarget{group__mod__aspa__h_ga73e1e2e74f1f37727efe950d85fe659e}\label{group__mod__aspa__h_ga73e1e2e74f1f37727efe950d85fe659e} 
\index{ASPA validation table@{ASPA validation table}!aspa\_update\_fp@{aspa\_update\_fp}}
\index{aspa\_update\_fp@{aspa\_update\_fp}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_update\_fp}{aspa\_update\_fp}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} aspa\+\_\+update\+\_\+fp) (struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, const struct \mbox{\hyperlink{structaspa__record}{aspa\+\_\+record}} record, const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, const enum aspa\+\_\+operation\+\_\+type operation\+\_\+type)}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



A function pointer that is called if an record was added to the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}} or was removed from the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}}. 


\begin{DoxyParams}{Parameters}
{\em \doxylink{structaspa__table}{aspa\+\_\+table}} & ASPA table which was updated. \\
\hline
{\em record} & ASPA record that was modified. \\
\hline
{\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & The socket the record originated from \\
\hline
{\em operation\+\_\+type} & The type of this operation. \\
\hline
\end{DoxyParams}


\doxysubsection{Enumeration Type Documentation}
\Hypertarget{group__mod__aspa__h_gae93026f450bf1c059af8104165cb7fa3}\label{group__mod__aspa__h_gae93026f450bf1c059af8104165cb7fa3} 
\index{ASPA validation table@{ASPA validation table}!aspa\_direction@{aspa\_direction}}
\index{aspa\_direction@{aspa\_direction}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_direction}{aspa\_direction}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_gae93026f450bf1c059af8104165cb7fa3}{aspa\+\_\+direction}}}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_UPSTREAM@{ASPA\_UPSTREAM}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_UPSTREAM@{ASPA\_UPSTREAM}}}\Hypertarget{group__mod__aspa__h_ggae93026f450bf1c059af8104165cb7fa3a2ce999f88416410f29548e8458c49e2d}\label{group__mod__aspa__h_ggae93026f450bf1c059af8104165cb7fa3a2ce999f88416410f29548e8458c49e2d} 
ASPA\+\_\+\+UPSTREAM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_DOWNSTREAM@{ASPA\_DOWNSTREAM}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_DOWNSTREAM@{ASPA\_DOWNSTREAM}}}\Hypertarget{group__mod__aspa__h_ggae93026f450bf1c059af8104165cb7fa3a1f6b0aaba561b06c1a8a81fe1c785854}\label{group__mod__aspa__h_ggae93026f450bf1c059af8104165cb7fa3a1f6b0aaba561b06c1a8a81fe1c785854} 
ASPA\+\_\+\+DOWNSTREAM&\\
\hline

\end{DoxyEnumFields}
\Hypertarget{group__mod__aspa__h_ga620bdcc08f49a3cd6aa2ae843d4910d8}\label{group__mod__aspa__h_ga620bdcc08f49a3cd6aa2ae843d4910d8} 
\index{ASPA validation table@{ASPA validation table}!aspa\_hop\_result@{aspa\_hop\_result}}
\index{aspa\_hop\_result@{aspa\_hop\_result}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_hop\_result}{aspa\_hop\_result}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga620bdcc08f49a3cd6aa2ae843d4910d8}{aspa\+\_\+hop\+\_\+result}}}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_NO\_ATTESTATION@{ASPA\_NO\_ATTESTATION}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_NO\_ATTESTATION@{ASPA\_NO\_ATTESTATION}}}\Hypertarget{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8aeb9b30298feef9f705089ec21dd62ee4}\label{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8aeb9b30298feef9f705089ec21dd62ee4} 
ASPA\+\_\+\+NO\+\_\+\+ATTESTATION&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_NOT\_PROVIDER\_PLUS@{ASPA\_NOT\_PROVIDER\_PLUS}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_NOT\_PROVIDER\_PLUS@{ASPA\_NOT\_PROVIDER\_PLUS}}}\Hypertarget{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8aace21d81320b08a8ff499e24287b5cf9}\label{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8aace21d81320b08a8ff499e24287b5cf9} 
ASPA\+\_\+\+NOT\+\_\+\+PROVIDER\+\_\+\+PLUS&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_PROVIDER\_PLUS@{ASPA\_PROVIDER\_PLUS}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_PROVIDER\_PLUS@{ASPA\_PROVIDER\_PLUS}}}\Hypertarget{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8adc581664da5df8ca79f3e5964ff90f89}\label{group__mod__aspa__h_gga620bdcc08f49a3cd6aa2ae843d4910d8adc581664da5df8ca79f3e5964ff90f89} 
ASPA\+\_\+\+PROVIDER\+\_\+\+PLUS&\\
\hline

\end{DoxyEnumFields}
\Hypertarget{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}\label{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b} 
\index{ASPA validation table@{ASPA validation table}!aspa\_status@{aspa\_status}}
\index{aspa\_status@{aspa\_status}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_status}{aspa\_status}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}}}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



Possible return values for {\ttfamily aspa\+\_\+\texorpdfstring{$\ast$}{*}} functions. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_SUCCESS@{ASPA\_SUCCESS}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_SUCCESS@{ASPA\_SUCCESS}}}\Hypertarget{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba333ca59c4b7fd9d978707b61f99fa3e1}\label{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba333ca59c4b7fd9d978707b61f99fa3e1} 
ASPA\+\_\+\+SUCCESS&Operation was successful. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_ERROR@{ASPA\_ERROR}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_ERROR@{ASPA\_ERROR}}}\Hypertarget{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba94a14f32d253828c011673462409965d}\label{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba94a14f32d253828c011673462409965d} 
ASPA\+\_\+\+ERROR&Error occurred. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_DUPLICATE\_RECORD@{ASPA\_DUPLICATE\_RECORD}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_DUPLICATE\_RECORD@{ASPA\_DUPLICATE\_RECORD}}}\Hypertarget{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba63e715dc4046f8e70f41d74bd7e29104}\label{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba63e715dc4046f8e70f41d74bd7e29104} 
ASPA\+\_\+\+DUPLICATE\+\_\+\+RECORD&The supplied \doxylink{structaspa__record}{aspa\+\_\+record} already exists in the \doxylink{structaspa__table}{aspa\+\_\+table}. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_RECORD\_NOT\_FOUND@{ASPA\_RECORD\_NOT\_FOUND}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_RECORD\_NOT\_FOUND@{ASPA\_RECORD\_NOT\_FOUND}}}\Hypertarget{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba092af5098a5e3c65cc5bfd3d8d1dcc5d}\label{group__mod__aspa__h_gga18e5d060687b3cdf30d418b2a9639e6ba092af5098a5e3c65cc5bfd3d8d1dcc5d} 
ASPA\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND&\doxylink{structaspa__record}{aspa\+\_\+record} wasn\textquotesingle{}t found in the \doxylink{structaspa__table}{aspa\+\_\+table}. \\
\hline

\end{DoxyEnumFields}
\Hypertarget{group__mod__aspa__h_ga3747a87e681c0b05309c156130d3d040}\label{group__mod__aspa__h_ga3747a87e681c0b05309c156130d3d040} 
\index{ASPA validation table@{ASPA validation table}!aspa\_verification\_result@{aspa\_verification\_result}}
\index{aspa\_verification\_result@{aspa\_verification\_result}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_verification\_result}{aspa\_verification\_result}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga3747a87e681c0b05309c156130d3d040}{aspa\+\_\+verification\+\_\+result}}}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



AS\+\_\+\+PATH verification result. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_AS\_PATH\_UNKNOWN@{ASPA\_AS\_PATH\_UNKNOWN}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_AS\_PATH\_UNKNOWN@{ASPA\_AS\_PATH\_UNKNOWN}}}\Hypertarget{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040af9979638c4d6a7fb89d761e37f91eeec}\label{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040af9979638c4d6a7fb89d761e37f91eeec} 
ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+UNKNOWN&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_AS\_PATH\_INVALID@{ASPA\_AS\_PATH\_INVALID}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_AS\_PATH\_INVALID@{ASPA\_AS\_PATH\_INVALID}}}\Hypertarget{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040acee7897d6fea28cf74be0f8a39914e7a}\label{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040acee7897d6fea28cf74be0f8a39914e7a} 
ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+INVALID&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ASPA\_AS\_PATH\_VALID@{ASPA\_AS\_PATH\_VALID}!ASPA validation table@{ASPA validation table}}\index{ASPA validation table@{ASPA validation table}!ASPA\_AS\_PATH\_VALID@{ASPA\_AS\_PATH\_VALID}}}\Hypertarget{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040ae969bcd04b6b9a380ae0f6d1b8050ae5}\label{group__mod__aspa__h_gga3747a87e681c0b05309c156130d3d040ae969bcd04b6b9a380ae0f6d1b8050ae5} 
ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+VALID&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\Hypertarget{group__mod__aspa__h_ga802f0e1cfe85d12ee45a765bad37d250}\label{group__mod__aspa__h_ga802f0e1cfe85d12ee45a765bad37d250} 
\index{ASPA validation table@{ASPA validation table}!\_\_attribute\_\_@{\_\_attribute\_\_}}
\index{\_\_attribute\_\_@{\_\_attribute\_\_}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{\_\_attribute\_\_()}{\_\_attribute\_\_()}}
{\footnotesize\ttfamily enum \+\_\+\+\_\+attribute\+\_\+\+\_\+ (\begin{DoxyParamCaption}\item[{(\+\_\+\+\_\+packed\+\_\+\+\_\+)}]{ }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



An enum describing the type of operation the ASPA table should perform using any given ASPA record. 

The existing record, identified by its customer ASN, shall be withdrawn from the ASPA table.

The new record, identified by its customer ASN, shall be added to the ASPA table.\Hypertarget{group__mod__aspa__h_ga345af12295112b728171c67ed965c2cb}\label{group__mod__aspa__h_ga345af12295112b728171c67ed965c2cb} 
\index{ASPA validation table@{ASPA validation table}!aspa\_check\_hop@{aspa\_check\_hop}}
\index{aspa\_check\_hop@{aspa\_check\_hop}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_check\_hop()}{aspa\_check\_hop()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga620bdcc08f49a3cd6aa2ae843d4910d8}{aspa\+\_\+hop\+\_\+result}} aspa\+\_\+check\+\_\+hop (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{uint32\+\_\+t}]{customer\+\_\+asn,  }\item[{uint32\+\_\+t}]{provider\+\_\+asn }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Checks a hop in the given {\ttfamily AS\+\_\+\+PATH}. 

\begin{DoxyReturn}{Returns}
{\ttfamily aspa\+\_\+hop\+\_\+result} . 
\end{DoxyReturn}
\Hypertarget{group__mod__aspa__h_ga9f95586274d22d5b829d30cc2f436f28}\label{group__mod__aspa__h_ga9f95586274d22d5b829d30cc2f436f28} 
\index{ASPA validation table@{ASPA validation table}!aspa\_collapse\_as\_path@{aspa\_collapse\_as\_path}}
\index{aspa\_collapse\_as\_path@{aspa\_collapse\_as\_path}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_collapse\_as\_path()}{aspa\_collapse\_as\_path()}}
{\footnotesize\ttfamily size\+\_\+t aspa\+\_\+collapse\+\_\+as\+\_\+path (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{as\+\_\+path\mbox{[}$\,$\mbox{]},  }\item[{size\+\_\+t}]{len }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



Collapses an {\ttfamily AS\+\_\+\+PATH} in-\/place, replacing in-\/series repetitions with single occurences. 

\begin{DoxyReturn}{Returns}
Length of the given array. 
\end{DoxyReturn}
\Hypertarget{group__mod__aspa__h_ga0712bf1c04fdf206369c44c4a926ad67}\label{group__mod__aspa__h_ga0712bf1c04fdf206369c44c4a926ad67} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_free@{aspa\_table\_free}}
\index{aspa\_table\_free@{aspa\_table\_free}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_free()}{aspa\_table\_free()}}
{\footnotesize\ttfamily void aspa\+\_\+table\+\_\+free (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{bool}]{notify }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



Frees the memory associated with the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structaspa__table}{aspa\+\_\+table}} & \doxylink{structaspa__table}{aspa\+\_\+table} that will be initialized. \\
\hline
 & {\em notify} & A boolean value determining whether to notify clients about records being removed from the table. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__aspa__h_ga9f7ce0bb07be778240c2cfd681f56c78}\label{group__mod__aspa__h_ga9f7ce0bb07be778240c2cfd681f56c78} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_init@{aspa\_table\_init}}
\index{aspa\_table\_init@{aspa\_table\_init}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_init()}{aspa\_table\_init()}}
{\footnotesize\ttfamily void aspa\+\_\+table\+\_\+init (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{\mbox{\hyperlink{group__mod__aspa__h_ga73e1e2e74f1f37727efe950d85fe659e}{aspa\+\_\+update\+\_\+fp}}}]{update\+\_\+fp }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



Initializes the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}} struct. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structaspa__table}{aspa\+\_\+table}} & \doxylink{structaspa__table}{aspa\+\_\+table} that will be initialized. \\
\hline
\mbox{\texttt{ in}}  & {\em update\+\_\+fp} & Pointer to update function \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__aspa__h_gaf9c530f15c3cba970deb12a58f33681f}\label{group__mod__aspa__h_gaf9c530f15c3cba970deb12a58f33681f} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_src\_remove@{aspa\_table\_src\_remove}}
\index{aspa\_table\_src\_remove@{aspa\_table\_src\_remove}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_src\_remove()}{aspa\_table\_src\_remove()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} aspa\+\_\+table\+\_\+src\+\_\+remove (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket,  }\item[{bool}]{notify }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



Removes all records in the {\ttfamily \doxylink{structaspa__table}{aspa\+\_\+table}} that originated from the socket. 


\begin{DoxyParams}{Parameters}
{\em \doxylink{structaspa__table}{aspa\+\_\+table}} & ASPA table to use. \\
\hline
{\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & Record\textquotesingle{}s origin socket. \\
\hline
{\em notify} & A boolean value determining whether clients should be notified about the records\textquotesingle{} removal. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily SPKI\+\_\+\+SUCCESS} On success. 

{\ttfamily SPKI\+\_\+\+ERROR} On error. 
\end{DoxyReturn}
\Hypertarget{group__mod__aspa__h_gad0a535d13461bfd72e2fba79c21830a5}\label{group__mod__aspa__h_gad0a535d13461bfd72e2fba79c21830a5} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_src\_replace@{aspa\_table\_src\_replace}}
\index{aspa\_table\_src\_replace@{aspa\_table\_src\_replace}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_src\_replace()}{aspa\_table\_src\_replace()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} aspa\+\_\+table\+\_\+src\+\_\+replace (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{dst,  }\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{src,  }\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket,  }\item[{bool}]{notify\+\_\+dst,  }\item[{bool}]{notify\+\_\+src }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Replaces all ASPA records associated with the given socket with the records in the src table. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em dst} & The destination table. Existing records associated with the socket are replaced. \\
\hline
\mbox{\texttt{ in,out}}  & {\em src} & The source table. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & The socket the records are associated with. \\
\hline
 & {\em notify\+\_\+dst} & A boolean value determining whether to notify the destination table\textquotesingle{}s clients. \\
\hline
 & {\em notify\+\_\+src} & A boolean value determining whether to notify the source table\textquotesingle{}s clients. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily ASPA\+\_\+\+SUCCESS} if the operation succeeds, {\ttfamily ASPA\+\_\+\+ERROR} if it fails. 
\end{DoxyReturn}
\Hypertarget{group__mod__aspa__h_ga737e5471293aa6f82a7d6232757019c5}\label{group__mod__aspa__h_ga737e5471293aa6f82a7d6232757019c5} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_update\_in\_place@{aspa\_table\_update\_in\_place}}
\index{aspa\_table\_update\_in\_place@{aspa\_table\_update\_in\_place}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_update\_in\_place()}{aspa\_table\_update\_in\_place()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket,  }\item[{struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}}]{operations,  }\item[{size\+\_\+t}]{count,  }\item[{struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{failed\+\_\+operation }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Updates the given ASPA table. 

\begin{DoxyNote}{Note}
Each record in an \textquotesingle{}add\textquotesingle{} operation may have a provider array associated with it. Any record in a \textquotesingle{}remove\textquotesingle{} operation must have its {\ttfamily provider\+\_\+count} set to {\ttfamily 0} and {\ttfamily provider\+\_\+array} set to {\ttfamily NULL}.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structaspa__table}{aspa\+\_\+table}} & ASPA table to store new ASPA data in. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & The socket the updates originate from. \\
\hline
\mbox{\texttt{ in}}  & {\em operations} & Add and remove operations to perform. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & Number of operations. \\
\hline
\mbox{\texttt{ out}}  & {\em failed\+\_\+operation} & Failed operation, filled in if update fails. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily ASPA\+\_\+\+SUCCESS} On success. 

{\ttfamily ASPA\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND} If a records is supposed to be removed but cannot be found. 

{\ttfamily ASPA\+\_\+\+DUPLICATE\+\_\+\+RECORD} If a records is supposed to be added but its corresponding customer ASN already exists. 

{\ttfamily ASPA\+\_\+\+ERROR} On other failures. 
\end{DoxyReturn}
\Hypertarget{group__mod__aspa__h_ga63c7569dee91f327ee65bd8efa14a128}\label{group__mod__aspa__h_ga63c7569dee91f327ee65bd8efa14a128} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_update\_in\_place\_cleanup@{aspa\_table\_update\_in\_place\_cleanup}}
\index{aspa\_table\_update\_in\_place\_cleanup@{aspa\_table\_update\_in\_place\_cleanup}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_update\_in\_place\_cleanup()}{aspa\_table\_update\_in\_place\_cleanup()}}
{\footnotesize\ttfamily void aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place\+\_\+cleanup (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{operations,  }\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Releases operations and unused provider arrays. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em operations} & Add and remove operations. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & Number of operations. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__aspa__h_ga72f4845ce23b5b5c228a367a4ad15a67}\label{group__mod__aspa__h_ga72f4845ce23b5b5c228a367a4ad15a67} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_update\_in\_place\_undo@{aspa\_table\_update\_in\_place\_undo}}
\index{aspa\_table\_update\_in\_place\_undo@{aspa\_table\_update\_in\_place\_undo}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_update\_in\_place\_undo()}{aspa\_table\_update\_in\_place\_undo()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} aspa\+\_\+table\+\_\+update\+\_\+in\+\_\+place\+\_\+undo (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket,  }\item[{struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}}]{operations,  }\item[{size\+\_\+t}]{count,  }\item[{struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}}]{failed\+\_\+operation }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Tries to undo {\ttfamily operations} up to {\ttfamily failed\+\_\+operation} and then releases all operations. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structaspa__table}{aspa\+\_\+table}} & ASPA table to store new ASPA data in. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & The socket the updates originate from. \\
\hline
\mbox{\texttt{ in}}  & {\em operations} & Add and remove operations to perform. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & Number of operations. \\
\hline
\mbox{\texttt{ in}}  & {\em failed\+\_\+operation} & Failed operation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily ASPA\+\_\+\+SUCCESS} On success. 

{\ttfamily ASPA\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND} If a records is supposed to be removed but cannot be found. 

{\ttfamily ASPA\+\_\+\+DUPLICATE\+\_\+\+RECORD} If a records is supposed to be added but its corresponding customer ASN already exists. 

{\ttfamily ASPA\+\_\+\+ERROR} On other failures. 
\end{DoxyReturn}
\Hypertarget{group__mod__aspa__h_ga5062a9b2c0c2c809fd1495d69ef1e2ee}\label{group__mod__aspa__h_ga5062a9b2c0c2c809fd1495d69ef1e2ee} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_update\_swap\_in\_apply@{aspa\_table\_update\_swap\_in\_apply}}
\index{aspa\_table\_update\_swap\_in\_apply@{aspa\_table\_update\_swap\_in\_apply}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_update\_swap\_in\_apply()}{aspa\_table\_update\_swap\_in\_apply()}}
{\footnotesize\ttfamily void aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+apply (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__update}{aspa\+\_\+update}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{update }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Applies the given update, as previously computed by {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+compute}, releases memory allocated while computing the update and unlocks update lock. 

The update is consumed.


\begin{DoxyParams}{Parameters}
{\em update} & The update that will be applied. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__aspa__h_ga345fa1009c45167be8101732e905263a}\label{group__mod__aspa__h_ga345fa1009c45167be8101732e905263a} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_update\_swap\_in\_compute@{aspa\_table\_update\_swap\_in\_compute}}
\index{aspa\_table\_update\_swap\_in\_compute@{aspa\_table\_update\_swap\_in\_compute}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_update\_swap\_in\_compute()}{aspa\_table\_update\_swap\_in\_compute()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga18e5d060687b3cdf30d418b2a9639e6b}{aspa\+\_\+status}} aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+compute (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket,  }\item[{struct \mbox{\hyperlink{structaspa__update__operation}{aspa\+\_\+update\+\_\+operation}} \texorpdfstring{$\ast$}{*}}]{operations,  }\item[{size\+\_\+t}]{count,  }\item[{struct \mbox{\hyperlink{structaspa__update}{aspa\+\_\+update}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{update }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Computes an update structure that can later be applied to the given ASPA table. 

\begin{DoxyNote}{Note}
Each record in an \textquotesingle{}add\textquotesingle{} operation may have a provider array associated with it. Any record in a \textquotesingle{}remove\textquotesingle{} operation must have its {\ttfamily provider\+\_\+count} set to 0 and {\ttfamily provider\+\_\+array} set to {\ttfamily NULL}. 

This function acquires an update lock on the given ASPA table ensuring no mutations occur while computing the update or before the update is applied. You must call {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+apply} or {\ttfamily aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+discard} to either apply or discard the update.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structaspa__table}{aspa\+\_\+table}} & ASPA table to store new ASPA data in. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & The socket the updates originate from. \\
\hline
\mbox{\texttt{ in}}  & {\em operations} & Add and remove operations to perform. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & Number of operations. \\
\hline
 & {\em update} & The computed update. The update pointer must be non-\/\+NULL, but may point to a {\ttfamily NULL} value initially. Points to an update struct after this function returns. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily ASPA\+\_\+\+SUCCESS} On success. 

{\ttfamily ASPA\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND} If a records is supposed to be removed but cannot be found. 

{\ttfamily ASPA\+\_\+\+DUPLICATE\+\_\+\+RECORD} If a records is supposed to be added but its corresponding customer ASN already exists. 

{\ttfamily ASPA\+\_\+\+ERROR} On other failures. 
\end{DoxyReturn}
\Hypertarget{group__mod__aspa__h_ga04b379b6d202be04df83125d202861b9}\label{group__mod__aspa__h_ga04b379b6d202be04df83125d202861b9} 
\index{ASPA validation table@{ASPA validation table}!aspa\_table\_update\_swap\_in\_discard@{aspa\_table\_update\_swap\_in\_discard}}
\index{aspa\_table\_update\_swap\_in\_discard@{aspa\_table\_update\_swap\_in\_discard}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_table\_update\_swap\_in\_discard()}{aspa\_table\_update\_swap\_in\_discard()}}
{\footnotesize\ttfamily void aspa\+\_\+table\+\_\+update\+\_\+swap\+\_\+in\+\_\+discard (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__update}{aspa\+\_\+update}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{update }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa__private_8h}{rtrlib/aspa/aspa\+\_\+private.\+h}}$>$}



Discards the given update, releases memory allocated while computing the update and unlocks update lock. 

The update is consumed.


\begin{DoxyParams}{Parameters}
{\em update} & The update to discard. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__aspa__h_gae8450471c894e69b4fec30e85fa3594f}\label{group__mod__aspa__h_gae8450471c894e69b4fec30e85fa3594f} 
\index{ASPA validation table@{ASPA validation table}!aspa\_verify\_as\_path@{aspa\_verify\_as\_path}}
\index{aspa\_verify\_as\_path@{aspa\_verify\_as\_path}!ASPA validation table@{ASPA validation table}}
\doxysubsubsection{\texorpdfstring{aspa\_verify\_as\_path()}{aspa\_verify\_as\_path()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__aspa__h_ga3747a87e681c0b05309c156130d3d040}{aspa\+\_\+verification\+\_\+result}} aspa\+\_\+verify\+\_\+as\+\_\+path (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{uint32\+\_\+t}]{as\+\_\+path\mbox{[}$\,$\mbox{]},  }\item[{size\+\_\+t}]{len,  }\item[{enum \mbox{\hyperlink{group__mod__aspa__h_gae93026f450bf1c059af8104165cb7fa3}{aspa\+\_\+direction}}}]{direction }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{aspa_8h}{rtrlib/aspa/aspa.\+h}}$>$}



Verifies an AS\+\_\+\+PATH . 

Implements an optimized version of the ASPA verification algorithm described in section 6 of \href{https://datatracker.ietf.org/doc/draft-ietf-sidrops-aspa-verification/16/}{\texttt{ https\+://datatracker.\+ietf.\+org/doc/draft-\/ietf-\/sidrops-\/aspa-\/verification/16/}} .


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structaspa__table}{aspa\+\_\+table}} & ASPA table to use. \\
\hline
\mbox{\texttt{ in}}  & {\em direction} & {\ttfamily AS\+\_\+\+PATH} direction, as explained in the draft \\
\hline
\mbox{\texttt{ in}}  & {\em as\+\_\+path} & {\ttfamily AS\+\_\+\+PATH} array to be validated\+: concatenated of BGP UPDATEs\textquotesingle{} {\ttfamily AS\+\_\+\+PATH}s \\
\hline
\mbox{\texttt{ in}}  & {\em len} & the length of {\ttfamily as\+\_\+path} array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+UNKNOWN} if the {\ttfamily AS\+\_\+\+PATH} cannot be fully verified 

{\ttfamily ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+INVALID} if {\ttfamily AS\+\_\+\+PATH} is invalid 

{\ttfamily ASPA\+\_\+\+AS\+\_\+\+PATH\+\_\+\+VALID} if {\ttfamily AS\+\_\+\+PATH} is valid 
\end{DoxyReturn}
