Crate route_verification_ir
source ·Expand description
The intermediate representation (Ir
) for
the Routing Policy Specification Language (RPSL).
Modules§
Structs§
- An address prefix
IpNet
followed by an optional range operatorRangeOperator
. - Parsed RPSL intermediate representation.
The syntax of a peering specification is:
[ ] [at ] | where is an expression over AS numbers and AS sets using operators AND, OR, and EXCEPT, and and are expressions over router IP addresses, inet-rtr names, and rtr-set names using operators AND, OR, and EXCEPT. The binary “EXCEPT” operator is the set subtraction operator and has the same precedence as the operator AND (it is semantically equivalent to “AND NOT” combination). That is “(AS1 OR AS2) EXCEPT AS2” equals “AS1”.This form identifies all the peerings between any local router in to any of their peer routers in in the ASes in . If is not specified, it defaults to all routers of the local AS that peer with ASes in . If is not specified, it defaults to all routers of the peer ASes in that peer with the local AS. The attributes of the route-set class are shown in Figure 12. The route-set attribute defines the name of the set. It is an RPSL name that starts with “rs-”. The members attribute lists the members of the set. The members attribute is a list of address prefixes or other route-set names. Note that, the route-set class is a set of route prefixes, not of RPSL route objects.
Enums§
The filter attribute defines the set’s policy filter. A policy filter is a logical expression which when applied to a set of routes returns a subset of these routes. We say that the policy filter matches the subset returned. The policy filter can match routes using any BGP path attribute, such as the destination address prefix (or NLRI), AS-path, or community attributes.
- Expressions over router IP addresses, inet-rtr names, and rtr-set names using operators AND, OR, and EXCEPT. https://www.rfc-editor.org/rfc/rfc2622#page-25
Functions§
ips
must be sorted. Starting from the index of the closest element inips
, search right and left for address prefix that, combined withrange_operator
, containsip
. Stop searching either end when the index do not point toip
’s siblings.- Merge
irs
into a singleIr
in parallel, with no ordering guarantee. - A simple AS field is either a AS number or a AS set. Otherwise, return
AsExpr::Invalid
.