(prefix netip.Prefix)
| 1512 | } |
| 1513 | |
| 1514 | func NewIPAddrPrefix(prefix netip.Prefix) (*IPAddrPrefix, error) { |
| 1515 | if !prefix.IsValid() { |
| 1516 | return nil, fmt.Errorf("invalid prefix") |
| 1517 | } |
| 1518 | return &IPAddrPrefix{ |
| 1519 | IPAddrPrefixDefault: IPAddrPrefixDefault{ |
| 1520 | Prefix: prefix.Masked(), |
| 1521 | }, |
| 1522 | }, nil |
| 1523 | } |
| 1524 | |
| 1525 | const ( |
| 1526 | BGP_RD_TWO_OCTET_AS = iota |
no outgoing calls
searching dependent graphs…