diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-08-06 15:34:29 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-12 08:04:30 +0900 |
commit | a7682648404d444a44b953e4db0fed1660ce60ee (patch) | |
tree | 6a3b341d11565226b1bc617be6009c3eb69b30fa /packet | |
parent | b3514d7e0a813ca1d023748d4b3365065dc43016 (diff) |
api: kill protobuf Addressfamily struct
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet')
-rw-r--r-- | packet/bgp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index a8b73864..bbe55742 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -263,7 +263,7 @@ func (c *CapMultiProtocol) Serialize() ([]byte, error) { func (c *CapMultiProtocol) ToApiStruct() *api.Capability { return &api.Capability{ Code: api.BGP_CAPABILITY(c.Code()), - MultiProtocol: &api.AddressFamily{api.AFI(c.CapValue.AFI), api.SAFI(c.CapValue.SAFI)}, + MultiProtocol: uint32(AfiSafiToRouteFamily(c.CapValue.AFI, c.CapValue.SAFI)), } } @@ -350,7 +350,7 @@ func (c *CapGracefulRestart) ToApiStruct() *api.Capability { tuples := []*api.GracefulRestartTuple{} for _, t := range c.CapValue.Tuples { tuple := &api.GracefulRestartTuple{ - Af: &api.AddressFamily{api.AFI(t.AFI), api.SAFI(t.SAFI)}, + Rf: uint32(AfiSafiToRouteFamily(t.AFI, t.SAFI)), Flags: uint32(t.Flags), } tuples = append(tuples, tuple) |