MCPcopy Create free account
hub / github.com/coreswitch/zebra / Serialize

Method Serialize

bgp/message.go:124–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122}
123
124func (o *OptParamCapability) Serialize() ([]byte, error) {
125 buf := make([]byte, 2)
126 buf[0] = o.OptParamType
127 for _, cap := range o.OptCaps {
128 cbuf, err := cap.Serialize()
129 if err != nil {
130 return nil, err
131 }
132 buf = append(buf, cbuf...)
133 }
134 o.OptParamLen = uint8(len(buf) - 2)
135 buf[1] = o.OptParamLen
136 return buf, nil
137}
138
139const (
140 BGP_CAP_MULTIPROTOCOL uint8 = 1 // RFC2858

Callers

nothing calls this directly

Calls 1

SerializeMethod · 0.65

Tested by

no test coverage detected