Function bgpkit_parser::models::validate_role_pairs
source · pub fn validate_role_pairs(local_role: &BgpRole, remote_role: &BgpRole) -> boolExpand 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 Role | Remote AS Role |
|---|---|
| Provider | Customer |
| Customer | Provider |
| RouteServer | RouterServer-Client |
| RouterServer-Client | RouteServer |
| Peer | Peer |