RTRlib
Loading...
Searching...
No Matches
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
35
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
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/* @} */
rtr_bgpsec_algorithm_suites
All supported algorithm suites.
Definition bgpsec.h:31
rtr_bgpsec_rtvals
Status codes for various cases.
Definition bgpsec.h:39
struct rtr_secure_path_seg * path
Definition bgpsec.h:139
struct rtr_signature_seg * sigs
Definition bgpsec.h:137
struct rtr_secure_path_seg * next
Definition bgpsec.h:75
uint16_t sigs_len
Definition bgpsec.h:132
uint8_t * signature
Definition bgpsec.h:93
uint8_t path_len
Definition bgpsec.h:134
@ RTR_BGPSEC_ALGORITHM_SUITE_1
Definition bgpsec.h:33
@ RTR_BGPSEC_WRONG_SEGMENT_COUNT
Definition bgpsec.h:61
@ RTR_BGPSEC_SUCCESS
Definition bgpsec.h:45
@ RTR_BGPSEC_VALID
Definition bgpsec.h:43
@ RTR_BGPSEC_ROUTER_KEY_NOT_FOUND
Definition bgpsec.h:53
@ RTR_BGPSEC_UNSUPPORTED_AFI
Definition bgpsec.h:59
@ RTR_BGPSEC_ERROR
Definition bgpsec.h:47
@ RTR_BGPSEC_INVALID_ARGUMENTS
Definition bgpsec.h:63
@ RTR_BGPSEC_UNSUPPORTED_ALGORITHM_SUITE
Definition bgpsec.h:57
@ RTR_BGPSEC_LOAD_PRIV_KEY_ERROR
Definition bgpsec.h:51
@ RTR_BGPSEC_SIGNING_ERROR
Definition bgpsec.h:55
@ RTR_BGPSEC_NOT_VALID
Definition bgpsec.h:41
@ RTR_BGPSEC_LOAD_PUB_KEY_ERROR
Definition bgpsec.h:49
This struct contains the Network Layer Reachability Information (NLRI). The NLRI consists of a prefix...
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