RTRlib
bgpsec.h
1 /*
2  * This file is part of RTRlib.
3  *
4  * This file is subject to the terms and conditions of the MIT license.
5  * See the file LICENSE in the top level directory for more details.
6  *
7  * Website: http://rtrlib.realmv6.org/
8  */
9 
17 #ifndef RTR_BGPSEC_H
18 #define RTR_BGPSEC_H
19 
20 #include "rtrlib/lib/ip.h"
21 #include "rtrlib/spki/spkitable.h"
22 
23 #include <stdint.h>
24 
25 #define BGPSEC_IPV4 1
26 #define BGPSEC_IPV6 2
27 
34 };
35 
64 };
65 
76  uint8_t pcount;
77  uint8_t flags;
78  uint32_t asn;
79 };
80 
89  struct rtr_signature_seg *next;
90  uint8_t ski[SKI_SIZE];
91  uint16_t sig_len;
93  uint8_t *signature;
94 };
95 
106  uint16_t afi;
107  uint8_t safi;
108  uint8_t nlri_len;
109  uint8_t *nlri;
110 };
111 
125 struct rtr_bgpsec {
126  uint8_t alg;
127  uint8_t safi;
128  uint16_t afi;
129  uint32_t my_as;
130  uint32_t target_as;
132  uint16_t sigs_len;
134  uint8_t path_len;
135  struct rtr_bgpsec_nlri *nlri;
140 };
141 #endif
142 /* @} */
The data that is passed to the rtr_mgr_bgpsec_validate_as_path function.
Definition: bgpsec.h:125
A single Secure Path Segment.
Definition: bgpsec.h:73
This struct contains the Network Layer Reachability Information (NLRI). The NLRI consists of a prefix...
Definition: bgpsec.h:105
uint8_t * signature
Definition: bgpsec.h:93
rtr_bgpsec_rtvals
Status codes for various cases.
Definition: bgpsec.h:39
A single Signature Segment.
Definition: bgpsec.h:88
struct rtr_secure_path_seg * next
Definition: bgpsec.h:75
Definition: bgpsec.h:59
Definition: bgpsec.h:41
uint8_t path_len
Definition: bgpsec.h:134
Definition: bgpsec.h:53
Definition: bgpsec.h:63
struct rtr_secure_path_seg * path
Definition: bgpsec.h:139
Definition: bgpsec.h:43
Definition: bgpsec.h:61
Definition: bgpsec.h:47
Definition: bgpsec.h:49
Definition: bgpsec.h:33
struct rtr_signature_seg * sigs
Definition: bgpsec.h:137
Definition: bgpsec.h:55
Definition: bgpsec.h:45
rtr_bgpsec_algorithm_suites
All supported algorithm suites.
Definition: bgpsec.h:31
Definition: bgpsec.h:51
uint16_t sigs_len
Definition: bgpsec.h:132