\doxysection{rtrlib/bgpsec/bgpsec\+\_\+private.h File Reference}
\hypertarget{bgpsec__private_8h}{}\label{bgpsec__private_8h}\index{rtrlib/bgpsec/bgpsec\_private.h@{rtrlib/bgpsec/bgpsec\_private.h}}
{\ttfamily \#include "{}rtrlib/bgpsec/bgpsec\+\_\+utils\+\_\+private.\+h"{}}\newline
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{group__mod__bgpsec__h_gaf4f652ef6e5930e5af320b5f2fac4904}{rtr\+\_\+bgpsec\+\_\+validate\+\_\+as\+\_\+path}} (const struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}data, struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}table)
\begin{DoxyCompactList}\small\item\em Validation function for AS path validation. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__bgpsec__h_ga82d1a1fe7220367ddfc14b2f0b41a186}{rtr\+\_\+bgpsec\+\_\+generate\+\_\+signature}} (const struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}data, uint8\+\_\+t \texorpdfstring{$\ast$}{*}private\+\_\+key, struct \mbox{\hyperlink{structrtr__signature__seg}{rtr\+\_\+signature\+\_\+seg}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}new\+\_\+signature)
\begin{DoxyCompactList}\small\item\em Signing function for a BGPsec\+\_\+\+PATH. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__bgpsec__h_ga452fbfb5fe2ed8b57638a1153b3a316c}{rtr\+\_\+bgpsec\+\_\+get\+\_\+version}} (void)
\begin{DoxyCompactList}\small\item\em Returns the highest supported BGPsec version. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__bgpsec__h_ga1f05eb1ca57d57ae97d018863dc3d126}{rtr\+\_\+bgpsec\+\_\+has\+\_\+algorithm\+\_\+suite}} (uint8\+\_\+t alg\+\_\+suite)
\begin{DoxyCompactList}\small\item\em Check, if an algorithm suite is supported by RTRlib. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__bgpsec__h_gab73b95f5128846e114e4c865ae7f81cf}{rtr\+\_\+bgpsec\+\_\+get\+\_\+algorithm\+\_\+suites}} (const uint8\+\_\+t \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}algs\+\_\+arr)
\begin{DoxyCompactList}\small\item\em Returns a pointer to a list that holds all supported algorithm suites. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__bgpsec__h_ga06ccc1acd1a385735aa6b5c82027aad4}{rtr\+\_\+bgpsec\+\_\+free\+\_\+signatures}} (struct \mbox{\hyperlink{structrtr__signature__seg}{rtr\+\_\+signature\+\_\+seg}} \texorpdfstring{$\ast$}{*}seg)
\begin{DoxyCompactList}\small\item\em Free a signature and any signatures that are pointed to. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structrtr__secure__path__seg}{rtr\+\_\+secure\+\_\+path\+\_\+seg}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__bgpsec__h_ga9315b7fd791d37dfdd4c8ecd1f900112}{rtr\+\_\+bgpsec\+\_\+new\+\_\+secure\+\_\+path\+\_\+seg}} (uint8\+\_\+t pcount, uint8\+\_\+t \mbox{\hyperlink{rtr__pdus_8h_aa2585d779da0ab21273a8d92de9a0ebe}{flags}}, uint32\+\_\+t \mbox{\hyperlink{rtr__pdus_8h_af54a4e57359d5c0dc5935878531a9e58}{asn}})
\begin{DoxyCompactList}\small\item\em Return an allocated and initialized Secure Path Segment. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__bgpsec__h_ga2d4bd0a47d34c79c34c1aa011d9f474f}{rtr\+\_\+bgpsec\+\_\+prepend\+\_\+sec\+\_\+path\+\_\+seg}} (struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}bgpsec, struct \mbox{\hyperlink{structrtr__secure__path__seg}{rtr\+\_\+secure\+\_\+path\+\_\+seg}} \texorpdfstring{$\ast$}{*}new\+\_\+seg)
\begin{DoxyCompactList}\small\item\em Prepend a given Secure Path Segment to \doxylink{group__mod__bgpsec__h_ga70c566ac333d38b555585a204f6fdb86}{rtr\+\_\+bgpsec\+::path}. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structrtr__signature__seg}{rtr\+\_\+signature\+\_\+seg}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__bgpsec__h_ga3c7a099f5bea442916ac5e8077611388}{rtr\+\_\+bgpsec\+\_\+new\+\_\+signature\+\_\+seg}} (uint8\+\_\+t \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{rtr__pdus_8h_a12038882b8c1e8109c0e4b1ea6f8cb5c}{ski}}, uint16\+\_\+t sig\+\_\+len, uint8\+\_\+t \texorpdfstring{$\ast$}{*}signature)
\begin{DoxyCompactList}\small\item\em Return an allocated and initialized Signature. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__bgpsec__h_ga785406619b2c36285bcaba7e5bc70153}{rtr\+\_\+bgpsec\+\_\+prepend\+\_\+sig\+\_\+seg}} (struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}bgpsec, struct \mbox{\hyperlink{structrtr__signature__seg}{rtr\+\_\+signature\+\_\+seg}} \texorpdfstring{$\ast$}{*}new\+\_\+seg)
\begin{DoxyCompactList}\small\item\em Prepend a given Signature Segment to \doxylink{group__mod__bgpsec__h_ga9ac4281b75fa0e3b0f33d5eb7ca26d56}{rtr\+\_\+bgpsec\+::sigs}. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__bgpsec__h_ga784213173402e6a0e7e445378e1c7914}{rtr\+\_\+bgpsec\+\_\+new}} (uint8\+\_\+t alg, uint8\+\_\+t safi, uint16\+\_\+t afi, uint32\+\_\+t my\+\_\+as, uint32\+\_\+t target\+\_\+as, struct \mbox{\hyperlink{structrtr__bgpsec__nlri}{rtr\+\_\+bgpsec\+\_\+nlri}} \texorpdfstring{$\ast$}{*}nlri)
\begin{DoxyCompactList}\small\item\em Initializes and returns a pointer to a \doxylink{structrtr__bgpsec}{rtr\+\_\+bgpsec} struct. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structrtr__bgpsec__nlri}{rtr\+\_\+bgpsec\+\_\+nlri}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__bgpsec__h_gab9e9157e6a9346340532f9bd61d572f3}{rtr\+\_\+bgpsec\+\_\+nlri\+\_\+new}} (int nlri\+\_\+len)
\begin{DoxyCompactList}\small\item\em Allocate memory for a \doxylink{structrtr__bgpsec__nlri}{rtr\+\_\+bgpsec\+\_\+nlri} struct. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__bgpsec__h_ga7341c1f304638573b90f9577d6c7b2e7}{rtr\+\_\+bgpsec\+\_\+nlri\+\_\+free}} (struct \mbox{\hyperlink{structrtr__bgpsec__nlri}{rtr\+\_\+bgpsec\+\_\+nlri}} \texorpdfstring{$\ast$}{*}nlri)
\begin{DoxyCompactList}\small\item\em Free a \doxylink{structrtr__bgpsec__nlri}{rtr\+\_\+bgpsec\+\_\+nlri} struct. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__bgpsec__h_ga83280be031a6dc6662ae4d1b6c29150f}{rtr\+\_\+bgpsec\+\_\+free}} (struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}bgpsec)
\begin{DoxyCompactList}\small\item\em Free a \doxylink{structrtr__bgpsec}{rtr\+\_\+bgpsec} struct and any Secure Path and Signature Segments it holds. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__bgpsec__h_gac2aa2ab380a95a3ce510f410055f9077}{rtr\+\_\+bgpsec\+\_\+free\+\_\+secure\+\_\+path}} (struct \mbox{\hyperlink{structrtr__secure__path__seg}{rtr\+\_\+secure\+\_\+path\+\_\+seg}} \texorpdfstring{$\ast$}{*}seg)
\begin{DoxyCompactList}\small\item\em Free a Secure Path Segment and any segments that are pointed to by \doxylink{group__mod__bgpsec__h_gaacb2a93cf30e6cbef1124f8479978bee}{rtr\+\_\+secure\+\_\+path\+\_\+seg\+::next}. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structrtr__signature__seg}{rtr\+\_\+signature\+\_\+seg}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__bgpsec__h_ga6faeb7d092e87b550f1abe39450e6fcc}{rtr\+\_\+bgpsec\+\_\+pop\+\_\+signature\+\_\+seg}} (struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}bgpsec)
\begin{DoxyCompactList}\small\item\em Pop off the first Signature Segment from a given \doxylink{structrtr__bgpsec}{rtr\+\_\+bgpsec} struct and return this Signature Segment. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structrtr__secure__path__seg}{rtr\+\_\+secure\+\_\+path\+\_\+seg}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__bgpsec__h_gaf4f16784026638c9edd45f1a02d2c230}{rtr\+\_\+bgpsec\+\_\+pop\+\_\+secure\+\_\+path\+\_\+seg}} (struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}bgpsec)
\begin{DoxyCompactList}\small\item\em Pop off the first Secure Path Segment from a given \doxylink{structrtr__bgpsec}{rtr\+\_\+bgpsec} struct and return this Secure Path Segment. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__bgpsec__h_ga90937970469024def59c46ba1e356bc4}{rtr\+\_\+bgpsec\+\_\+append\+\_\+sig\+\_\+seg}} (struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}bgpsec, struct \mbox{\hyperlink{structrtr__signature__seg}{rtr\+\_\+signature\+\_\+seg}} \texorpdfstring{$\ast$}{*}new\+\_\+seg)
\begin{DoxyCompactList}\small\item\em Append a Signature Segment to the end of the \doxylink{group__mod__bgpsec__h_ga9ac4281b75fa0e3b0f33d5eb7ca26d56}{rtr\+\_\+bgpsec\+::sigs} of a given \doxylink{structrtr__bgpsec}{rtr\+\_\+bgpsec} struct. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__bgpsec__h_ga24ecff08ba0976138ab9be55a74c8445}{rtr\+\_\+bgpsec\+\_\+append\+\_\+sec\+\_\+path\+\_\+seg}} (struct \mbox{\hyperlink{structrtr__bgpsec}{rtr\+\_\+bgpsec}} \texorpdfstring{$\ast$}{*}bgpsec, struct \mbox{\hyperlink{structrtr__secure__path__seg}{rtr\+\_\+secure\+\_\+path\+\_\+seg}} \texorpdfstring{$\ast$}{*}new\+\_\+seg)
\begin{DoxyCompactList}\small\item\em Append a Secure Path Segment to the end of the \doxylink{group__mod__bgpsec__h_ga70c566ac333d38b555585a204f6fdb86}{rtr\+\_\+bgpsec\+::path} of a given \doxylink{structrtr__bgpsec}{rtr\+\_\+bgpsec} struct. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__bgpsec__h_gafee29d5b9fa5efc3828dbd5ff354b41f}{rtr\+\_\+bgpsec\+\_\+add\+\_\+spki\+\_\+record}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}table, struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}record)
\begin{DoxyCompactList}\small\item\em Manually add a SPKI record into the SPKI table. \end{DoxyCompactList}\end{DoxyCompactItemize}
