summaryrefslogtreecommitdiffhomepage
path: root/packet
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-08-06 15:34:29 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-12 08:04:30 +0900
commita7682648404d444a44b953e4db0fed1660ce60ee (patch)
tree6a3b341d11565226b1bc617be6009c3eb69b30fa /packet
parentb3514d7e0a813ca1d023748d4b3365065dc43016 (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.go4
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)