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

Method string

pkg/zebra/zapi.go:2231–2244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2229}
2230
2231func (n Nexthop) string() string {
2232 s := make([]string, 0)
2233 s = append(s, fmt.Sprintf(
2234 "type: %s, vrf_id: %d, ifindex: %d, flags: %d, gate: %s, blackholeType: %d, label_num: %d, weight: %d, backupNum: %d, srteColor: %d",
2235 n.Type.String(), n.VrfID, n.Ifindex, n.flags, n.Gate.String(),
2236 n.blackholeType, n.LabelNum, n.Weight, n.backupNum, n.srteColor))
2237 for i := range n.LabelNum {
2238 s = append(s, fmt.Sprintf(" label[%d]: %d", i, n.MplsLabels[i]))
2239 }
2240 for i := range n.backupNum {
2241 s = append(s, fmt.Sprintf(" backupIndex[%d]: %d", i, n.backupIndex[i]))
2242 }
2243 return strings.Join(s, ", ")
2244}
2245
2246func (n Nexthop) gateToType(version uint8) nexthopType {
2247 if n.Gate.Is4() {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected