diff options
author | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2016-09-18 05:06:18 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-07-04 15:02:10 +0900 |
commit | 87f0b0bdc52945ae98ef6d44b7f118216bde95ca (patch) | |
tree | 668e91c266c290ea0130dd71b7f8403ab62e6d30 /table/path.go | |
parent | 454fd93ef707c530b3ece04ef4727ad1f7371d4b (diff) |
api/cli: support showing path-identifier
$ gobgp neighbor <neighbor address>
ID Network Next Hop AS_PATH Age Attrs
2 10.0.0.10/32 10.10.1.2 01:05:35 [{Origin: i} {LocalPref: 100}]
1 10.0.0.10/32 10.10.1.1 01:05:35 [{Origin: i} {LocalPref: 100}]
3 10.1.0.10/32 10.10.1.3 01:05:35 [{Origin: i} {LocalPref: 100}]
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/path.go')
-rw-r--r-- | table/path.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go index b97ca40c..0ff1afce 100644 --- a/table/path.go +++ b/table/path.go @@ -971,6 +971,7 @@ func (path *Path) MarshalJSON() ([]byte, error) { Stale bool `json:"stale,omitempty"` Filtered bool `json:"filtered,omitempty"` UUID string `json:"uuid,omitempty"` + ID uint32 `json:"id,omitempty"` }{ Nlri: path.GetNlri(), PathAttrs: path.GetPathAttrs(), @@ -982,6 +983,7 @@ func (path *Path) MarshalJSON() ([]byte, error) { Stale: path.IsStale(), Filtered: path.Filtered("") > POLICY_DIRECTION_NONE, UUID: path.UUID().String(), + ID: path.GetNlri().PathIdentifier(), }) } |