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

Method Serialize

pkg/packet/bgp/bgp.go:1618–1623  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1616}
1617
1618func (rd *RouteDistinguisherIPAddressAS) Serialize() ([]byte, error) {
1619 buf := make([]byte, 6)
1620 copy(buf[:4], rd.Admin.AsSlice())
1621 binary.BigEndian.PutUint16(buf[4:6], rd.Assigned)
1622 return rd.serialize(buf)
1623}
1624
1625func (rd *RouteDistinguisherIPAddressAS) String() string {
1626 return fmt.Sprintf("%s:%d", rd.Admin.String(), rd.Assigned)

Callers

nothing calls this directly

Calls 1

serializeMethod · 0.65

Tested by

no test coverage detected