RTRlib
Loading...
Searching...
No Matches
bgpsec.h
Go to the documentation of this file.
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"
22
23#include <stdint.h>
24
25#define BGPSEC_IPV4 1
26#define BGPSEC_IPV6 2
27
35
65
76 uint8_t pcount;
77 uint8_t flags;
78 uint32_t asn;
79};
80
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
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;
140};
141#endif
142/* @} */
rtr_bgpsec_algorithm_suites
All supported algorithm suites.
Definition bgpsec.h:31
uint8_t flags
Definition bgpsec.h:77
struct rtr_bgpsec_nlri * nlri
Definition bgpsec.h:135
uint32_t asn
Definition bgpsec.h:78
uint32_t my_as
Definition bgpsec.h:129
rtr_bgpsec_rtvals
Status codes for various cases.
Definition bgpsec.h:39
uint8_t safi
Definition bgpsec.h:127
struct rtr_secure_path_seg * path
Reference to the Secure Path Segments.
Definition bgpsec.h:139
uint8_t safi
Definition bgpsec.h:107
uint8_t ski[20]
Definition bgpsec.h:90
uint16_t afi
Definition bgpsec.h:106
struct rtr_signature_seg * sigs
Reference to the Signature Segments.
Definition bgpsec.h:137
struct rtr_signature_seg * next
Definition bgpsec.h:89
struct rtr_secure_path_seg * next
Reference to the next Secure Path Segment (do not edit manually).
Definition bgpsec.h:75
uint16_t afi
Definition bgpsec.h:128
uint16_t sigs_len
Count of Signature Segments (do not edit manually).
Definition bgpsec.h:132
uint32_t target_as
Definition bgpsec.h:130
uint8_t nlri_len
Definition bgpsec.h:108
uint8_t alg
Definition bgpsec.h:126
uint8_t pcount
Definition bgpsec.h:76
uint16_t sig_len
Definition bgpsec.h:91
uint8_t * nlri
Definition bgpsec.h:109
uint8_t * signature
The signature of the segment.
Definition bgpsec.h:93
uint8_t path_len
Count of Secure Path Segments (do not edit manually).
Definition bgpsec.h:134
@ RTR_BGPSEC_ALGORITHM_SUITE_1
Algorithm suite 1.
Definition bgpsec.h:33
@ RTR_BGPSEC_WRONG_SEGMENT_COUNT
The count of signature and secure path segments are not equal.
Definition bgpsec.h:61
@ RTR_BGPSEC_SUCCESS
An operation was successful.
Definition bgpsec.h:45
@ RTR_BGPSEC_VALID
All signatures are valid.
Definition bgpsec.h:43
@ RTR_BGPSEC_ROUTER_KEY_NOT_FOUND
The SKI for a router key was not found.
Definition bgpsec.h:53
@ RTR_BGPSEC_UNSUPPORTED_AFI
The specified AFI is not supported by BGPsec.
Definition bgpsec.h:59
@ RTR_BGPSEC_ERROR
An operation was not successful.
Definition bgpsec.h:47
@ RTR_BGPSEC_INVALID_ARGUMENTS
There is data missing for validation or signing.
Definition bgpsec.h:63
@ RTR_BGPSEC_UNSUPPORTED_ALGORITHM_SUITE
The specified algorithm suite is not supported by RTRlib.
Definition bgpsec.h:57
@ RTR_BGPSEC_LOAD_PRIV_KEY_ERROR
The private key could not be loaded.
Definition bgpsec.h:51
@ RTR_BGPSEC_SIGNING_ERROR
An error during signing occurred.
Definition bgpsec.h:55
@ RTR_BGPSEC_NOT_VALID
At least one signature is not valid.
Definition bgpsec.h:41
@ RTR_BGPSEC_LOAD_PUB_KEY_ERROR
The public key could not be loaded.
Definition bgpsec.h:49
#define SKI_SIZE
Definition spkitable.h:26
This struct contains the Network Layer Reachability Information (NLRI).
Definition bgpsec.h:105
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
A single Signature Segment.
Definition bgpsec.h:88