summaryrefslogtreecommitdiffhomepage
path: root/table/table.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-06-13 22:47:39 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-07-06 11:08:15 +0900
commit51dad96b92fbd483d7674f8f8617cd2bf8ac965b (patch)
treeb9a6da4b026a57e57e66f05e4e0f2c57f9b31419 /table/table.go
parent6192f9020000a8e1d581a3f92c206189a033bf39 (diff)
api: remove table/ usage in util.go
This is a part of work removing table/ usage in api/. api/ will depend on only protobuf stuff and packet/. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/table.go')
-rw-r--r--table/table.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/table/table.go b/table/table.go
index 9d8edf40..82259b0f 100644
--- a/table/table.go
+++ b/table/table.go
@@ -18,7 +18,6 @@ package table
import (
"fmt"
"net"
- "sort"
"strings"
"unsafe"
@@ -190,27 +189,6 @@ func (t *Table) getOrCreateDest(nlri bgp.AddrPrefixInterface) *Destination {
return dest
}
-func (t *Table) GetSortedDestinations() []*Destination {
- results := make([]*Destination, 0, len(t.GetDestinations()))
- switch t.routeFamily {
- case bgp.RF_IPv4_UC, bgp.RF_IPv6_UC:
- r := radix.New()
- for _, dst := range t.GetDestinations() {
- r.Insert(AddrToRadixkey(dst.nlri), dst)
- }
- r.Walk(func(s string, v interface{}) bool {
- results = append(results, v.(*Destination))
- return false
- })
- default:
- for _, dst := range t.GetDestinations() {
- results = append(results, dst)
- }
- sort.Sort(destinations(results))
- }
- return results
-}
-
func (t *Table) GetDestinations() map[string]*Destination {
return t.destinations
}