diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-27 06:58:50 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-27 06:58:50 -0800 |
commit | a3c1e53deda9f9834994751382f64827c14a9c32 (patch) | |
tree | 7c9504d979ac1afe425d8e57cb8117c389ec8f8c /table/destination.go | |
parent | eff70c21375742b44ae5ebfd845dba38d0f3fcfc (diff) |
RouteFamily cleanup
RouteFamily is defined in two files.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/destination.go')
-rw-r--r-- | table/destination.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/table/destination.go b/table/destination.go index 4bb77ae7..84643959 100644 --- a/table/destination.go +++ b/table/destination.go @@ -45,13 +45,13 @@ type PeerInfo struct { ID net.IP VersionNum int LocalID net.IP - RF RouteFamily + RF bgp.RouteFamily } type Destination interface { Calculate(localAsn uint32) (Path, string, error) - getRouteFamily() RouteFamily - setRouteFamily(ROUTE_FAMILY RouteFamily) + getRouteFamily() bgp.RouteFamily + setRouteFamily(ROUTE_FAMILY bgp.RouteFamily) getNlri() bgp.AddrPrefixInterface setNlri(nlri bgp.AddrPrefixInterface) getBestPathReason() string @@ -71,7 +71,7 @@ type Destination interface { } type DestinationDefault struct { - ROUTE_FAMILY RouteFamily + ROUTE_FAMILY bgp.RouteFamily nlri bgp.AddrPrefixInterface knownPathList []Path withdrawList []Path @@ -83,7 +83,7 @@ type DestinationDefault struct { func NewDestinationDefault(nlri bgp.AddrPrefixInterface) *DestinationDefault { destination := &DestinationDefault{} - destination.ROUTE_FAMILY = RF_IPv4_UC + destination.ROUTE_FAMILY = bgp.RF_IPv4_UC destination.nlri = nlri destination.knownPathList = make([]Path, 0) destination.withdrawList = make([]Path, 0) @@ -105,11 +105,11 @@ func (dd *DestinationDefault) MarshalJSON() ([]byte, error) { }) } -func (dd *DestinationDefault) getRouteFamily() RouteFamily { +func (dd *DestinationDefault) getRouteFamily() bgp.RouteFamily { return dd.ROUTE_FAMILY } -func (dd *DestinationDefault) setRouteFamily(ROUTE_FAMILY RouteFamily) { +func (dd *DestinationDefault) setRouteFamily(ROUTE_FAMILY bgp.RouteFamily) { dd.ROUTE_FAMILY = ROUTE_FAMILY } @@ -816,7 +816,7 @@ type IPv4Destination struct { func NewIPv4Destination(nlri bgp.AddrPrefixInterface) *IPv4Destination { ipv4Destination := &IPv4Destination{} ipv4Destination.DestinationDefault = NewDestinationDefault(nlri) - ipv4Destination.DestinationDefault.ROUTE_FAMILY = RF_IPv4_UC + ipv4Destination.DestinationDefault.ROUTE_FAMILY = bgp.RF_IPv4_UC //need Processing return ipv4Destination } @@ -834,7 +834,7 @@ type IPv6Destination struct { func NewIPv6Destination(nlri bgp.AddrPrefixInterface) *IPv6Destination { ipv6Destination := &IPv6Destination{} ipv6Destination.DestinationDefault = NewDestinationDefault(nlri) - ipv6Destination.DestinationDefault.ROUTE_FAMILY = RF_IPv6_UC + ipv6Destination.DestinationDefault.ROUTE_FAMILY = bgp.RF_IPv6_UC //need Processing return ipv6Destination } |