diff options
Diffstat (limited to 'table/table_manager.go')
-rw-r--r-- | table/table_manager.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/table/table_manager.go b/table/table_manager.go index f93c3a54..083889c7 100644 --- a/table/table_manager.go +++ b/table/table_manager.go @@ -378,3 +378,11 @@ func (manager *TableManager) GetDestination(path *Path) *Destination { } return t.GetDestination(path.getPrefix()) } + +func (manager *TableManager) TableInfo(id string, family bgp.RouteFamily) (*TableInfo, error) { + t, ok := manager.Tables[family] + if !ok { + return nil, fmt.Errorf("address family %s is not configured", family) + } + return t.Info(id), nil +} |