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

Function readAfiSafiConfigFromAPIStruct

pkg/server/grpc_server.go:853–860  ·  view source on GitHub ↗
(c *oc.AfiSafiConfig, a *api.AfiSafiConfig)

Source from the content-addressed store, hash-verified

851}
852
853func readAfiSafiConfigFromAPIStruct(c *oc.AfiSafiConfig, a *api.AfiSafiConfig) {
854 if c == nil || a == nil {
855 return
856 }
857 rf := bgp.NewFamily(uint16(a.Family.Afi), uint8(a.Family.Safi))
858 c.AfiSafiName = oc.AfiSafiType(rf.String())
859 c.Enabled = a.Enabled
860}
861
862func readAfiSafiStateFromAPIStruct(s *oc.AfiSafiState, a *api.AfiSafiConfig) {
863 if s == nil || a == nil {

Callers 2

newNeighborFromAPIStructFunction · 0.85

Calls 3

StringMethod · 0.95
NewFamilyFunction · 0.92
AfiSafiTypeTypeAlias · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…