Function bgpkit_parser::models::validate_role_pairs

source ยท
pub fn validate_role_pairs(local_role: &BgpRole, remote_role: &BgpRole) -> bool
Expand description

Validate the local-remote BGP Role pairs.

This function checks the role correctness by following the description in Section 4.2 of RFC9234.

The acceptable local-remote BGP pairs are:

Local AS RoleRemote AS Role
ProviderCustomer
CustomerProvider
RouteServerRouterServer-Client
RouterServer-ClientRouteServer
PeerPeer