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

Function readUseMultiplePathsFromAPIStruct

pkg/server/grpc_server.go:920–942  ·  view source on GitHub ↗
(c *oc.UseMultiplePaths, a *api.UseMultiplePaths)

Source from the content-addressed store, hash-verified

918}
919
920func readUseMultiplePathsFromAPIStruct(c *oc.UseMultiplePaths, a *api.UseMultiplePaths) {
921 if c == nil || a == nil {
922 return
923 }
924 if a.Config != nil {
925 c.Config.Enabled = a.Config.Enabled
926 }
927 if a.Ebgp != nil && a.Ebgp.Config != nil {
928 c.Ebgp = oc.Ebgp{
929 Config: oc.EbgpConfig{
930 AllowMultipleAs: a.Ebgp.Config.AllowMultipleAsn,
931 MaximumPaths: a.Ebgp.Config.MaximumPaths,
932 },
933 }
934 }
935 if a.Ibgp != nil && a.Ibgp.Config != nil {
936 c.Ibgp = oc.Ibgp{
937 Config: oc.IbgpConfig{
938 MaximumPaths: a.Ibgp.Config.MaximumPaths,
939 },
940 }
941 }
942}
943
944func readRouteTargetMembershipFromAPIStruct(c *oc.RouteTargetMembership, a *api.RouteTargetMembership) {
945 if c == nil || a == nil {

Callers 2

newNeighborFromAPIStructFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…