diff options
Diffstat (limited to 'table/table.go')
-rw-r--r-- | table/table.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/table/table.go b/table/table.go index 4739b292..b1434732 100644 --- a/table/table.go +++ b/table/table.go @@ -334,3 +334,22 @@ func (ipv4vpnt *EVPNTable) tableKey(nlri bgp.AddrPrefixInterface) string { addrPrefix := nlri.(*bgp.EVPNNLRI) return addrPrefix.String() } + +type EncapTable struct { + *TableDefault +} + +func NewEncapTable() *EncapTable { + EncapTable := &EncapTable{} + EncapTable.TableDefault = NewTableDefault(0) + EncapTable.TableDefault.ROUTE_FAMILY = bgp.RF_ENCAP + return EncapTable +} + +func (t *EncapTable) createDest(nlri bgp.AddrPrefixInterface) Destination { + return Destination(NewEncapDestination(nlri)) +} + +func (t *EncapTable) tableKey(nlri bgp.AddrPrefixInterface) string { + return nlri.String() +} |