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

Method sendLabelManagerConnect

pkg/zebra/zapi.go:1659–1675  ·  view source on GitHub ↗

Ref: zread_label_manager_connect in zebra/zserv.c of FRR3 (ZAPI4) Ref: zread_label_manager_connect in zebra/zapi_msg.c of FRR5&6 (ZAPI5&6)

(async bool)

Source from the content-addressed store, hash-verified

1657// Ref: zread_label_manager_connect in zebra/zserv.c of FRR3 (ZAPI4)
1658// Ref: zread_label_manager_connect in zebra/zapi_msg.c of FRR5&6 (ZAPI5&6)
1659func (c *Client) sendLabelManagerConnect(async bool) error {
1660 if c.Version < 4 {
1661 return fmt.Errorf("LabelManagerConnect is not supported in zebra API version: %d", c.Version)
1662 }
1663 command := labelManagerConnectAsync
1664 // FRR version 4 (ZAPI version 5) and FRR version 3 (ZAPI version 4)
1665 if !async || c.Version == 4 || c.Version == 5 && c.Software.name == "frr" && c.Software.version < 5 {
1666 command = labelManagerConnect
1667 }
1668 c.sendCommand(
1669 command, 0,
1670 &labelManagerConnectBody{
1671 redistDefault: RouteBGP,
1672 instance: 0,
1673 })
1674 return nil
1675}
1676
1677// SendGetLabelChunk sends GET_LABEL_CHUNK message to zebra daemon.
1678func (c *Client) SendGetLabelChunk(body *GetLabelChunkBody) error {

Callers 1

NewClientFunction · 0.95

Calls 1

sendCommandMethod · 0.95

Tested by

no test coverage detected