MCPcopy
hub / github.com/osrg/gobgp / NewIPAddrPrefix

Function NewIPAddrPrefix

pkg/packet/bgp/bgp.go:1514–1523  ·  view source on GitHub ↗
(prefix netip.Prefix)

Source from the content-addressed store, hash-verified

1512}
1513
1514func 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
1525const (
1526 BGP_RD_TWO_OCTET_AS = iota

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…