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

Function GetNativeNlri

pkg/apiutil/util.go:207–215  ·  view source on GitHub ↗
(p *api.Path)

Source from the content-addressed store, hash-verified

205}
206
207func GetNativeNlri(p *api.Path) (bgp.NLRI, error) {
208 if p.Family == nil {
209 return nil, fmt.Errorf("family cannot be nil")
210 }
211 if len(p.NlriBinary) > 0 {
212 return bgp.NLRIFromSlice(ToFamily(p.Family), p.NlriBinary)
213 }
214 return UnmarshalNLRI(ToFamily(p.Family), p.Nlri)
215}
216
217func GetNativePathAttributes(p *api.Path) ([]bgp.PathAttributeInterface, error) {
218 pattrsLen := len(p.PattrsBinary)

Callers 7

TestMetricsFunction · 0.92
api2PathFunction · 0.92
api2apiutilPathFunction · 0.92
makeMonitorRouteArgsFunction · 0.92
makeShowRouteArgsFunction · 0.92
showValidationInfoFunction · 0.92
NewDestinationFunction · 0.85

Calls 3

NLRIFromSliceFunction · 0.92
ToFamilyFunction · 0.85
UnmarshalNLRIFunction · 0.85

Tested by 1

TestMetricsFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…