\doxysection{rtrlib/aspa/aspa.h File Reference}
\hypertarget{aspa_8h}{}\label{aspa_8h}\index{rtrlib/aspa/aspa.h@{rtrlib/aspa/aspa.h}}
{\ttfamily \#include "{}rtrlib/aspa/aspa\+\_\+array/aspa\+\_\+array.\+h"{}}\newline
{\ttfamily \#include "{}rtrlib/lib/alloc\+\_\+utils\+\_\+private.\+h"{}}\newline
{\ttfamily \#include "{}rtrlib/rtr/rtr.\+h"{}}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
\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}\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}\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}\end{DoxyCompactItemize}
