summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/gobgp.pb.go116
-rw-r--r--api/gobgp.proto35
2 files changed, 9 insertions, 142 deletions
diff --git a/api/gobgp.pb.go b/api/gobgp.pb.go
index 182845ea..550863dc 100644
--- a/api/gobgp.pb.go
+++ b/api/gobgp.pb.go
@@ -15,9 +15,6 @@ It has these top-level messages:
PolicyArguments
MrtArguments
ModVrfArguments
- GracefulRestartTuple
- GracefulRestart
- Capability
Path
Destination
PeerConf
@@ -131,44 +128,6 @@ func (x Operation) String() string {
return proto.EnumName(Operation_name, int32(x))
}
-type BGP_CAPABILITY int32
-
-const (
- BGP_CAPABILITY_UNKNOWN_CAP BGP_CAPABILITY = 0
- BGP_CAPABILITY_MULTIPROTOCOL BGP_CAPABILITY = 1
- BGP_CAPABILITY_ROUTE_REFRESH BGP_CAPABILITY = 2
- BGP_CAPABILITY_CARRYING_LABEL_INFO BGP_CAPABILITY = 4
- BGP_CAPABILITY_GRACEFUL_RESTART BGP_CAPABILITY = 64
- BGP_CAPABILITY_FOUR_OCTET_AS_NUMBER BGP_CAPABILITY = 65
- BGP_CAPABILITY_ENHANCED_ROUTE_REFRESH BGP_CAPABILITY = 70
- BGP_CAPABILITY_ROUTE_REFRESH_CISCO BGP_CAPABILITY = 128
-)
-
-var BGP_CAPABILITY_name = map[int32]string{
- 0: "UNKNOWN_CAP",
- 1: "MULTIPROTOCOL",
- 2: "ROUTE_REFRESH",
- 4: "CARRYING_LABEL_INFO",
- 64: "GRACEFUL_RESTART",
- 65: "FOUR_OCTET_AS_NUMBER",
- 70: "ENHANCED_ROUTE_REFRESH",
- 128: "ROUTE_REFRESH_CISCO",
-}
-var BGP_CAPABILITY_value = map[string]int32{
- "UNKNOWN_CAP": 0,
- "MULTIPROTOCOL": 1,
- "ROUTE_REFRESH": 2,
- "CARRYING_LABEL_INFO": 4,
- "GRACEFUL_RESTART": 64,
- "FOUR_OCTET_AS_NUMBER": 65,
- "ENHANCED_ROUTE_REFRESH": 70,
- "ROUTE_REFRESH_CISCO": 128,
-}
-
-func (x BGP_CAPABILITY) String() string {
- return proto.EnumName(BGP_CAPABILITY_name, int32(x))
-}
-
type Error_ErrorCode int32
const (
@@ -281,50 +240,6 @@ func (m *ModVrfArguments) GetVrf() *Vrf {
return nil
}
-type GracefulRestartTuple struct {
- Rf uint32 `protobuf:"varint,1,opt,name=rf" json:"rf,omitempty"`
- Flags uint32 `protobuf:"varint,2,opt,name=flags" json:"flags,omitempty"`
-}
-
-func (m *GracefulRestartTuple) Reset() { *m = GracefulRestartTuple{} }
-func (m *GracefulRestartTuple) String() string { return proto.CompactTextString(m) }
-func (*GracefulRestartTuple) ProtoMessage() {}
-
-type GracefulRestart struct {
- Flags uint32 `protobuf:"varint,1,opt,name=flags" json:"flags,omitempty"`
- Time uint32 `protobuf:"varint,2,opt,name=time" json:"time,omitempty"`
- Tuples []*GracefulRestartTuple `protobuf:"bytes,3,rep,name=tuples" json:"tuples,omitempty"`
-}
-
-func (m *GracefulRestart) Reset() { *m = GracefulRestart{} }
-func (m *GracefulRestart) String() string { return proto.CompactTextString(m) }
-func (*GracefulRestart) ProtoMessage() {}
-
-func (m *GracefulRestart) GetTuples() []*GracefulRestartTuple {
- if m != nil {
- return m.Tuples
- }
- return nil
-}
-
-type Capability struct {
- Code BGP_CAPABILITY `protobuf:"varint,1,opt,name=code,enum=api.BGP_CAPABILITY" json:"code,omitempty"`
- MultiProtocol uint32 `protobuf:"varint,2,opt,name=multi_protocol" json:"multi_protocol,omitempty"`
- GracefulRestart *GracefulRestart `protobuf:"bytes,3,opt,name=graceful_restart" json:"graceful_restart,omitempty"`
- Asn uint32 `protobuf:"varint,4,opt,name=asn" json:"asn,omitempty"`
-}
-
-func (m *Capability) Reset() { *m = Capability{} }
-func (m *Capability) String() string { return proto.CompactTextString(m) }
-func (*Capability) ProtoMessage() {}
-
-func (m *Capability) GetGracefulRestart() *GracefulRestart {
- if m != nil {
- return m.GracefulRestart
- }
- return nil
-}
-
type Path struct {
Nlri []byte `protobuf:"bytes,1,opt,name=nlri,proto3" json:"nlri,omitempty"`
Pattrs [][]byte `protobuf:"bytes,2,rep,name=pattrs,proto3" json:"pattrs,omitempty"`
@@ -357,35 +272,19 @@ func (m *Destination) GetPaths() []*Path {
}
type PeerConf struct {
- RemoteIp string `protobuf:"bytes,1,opt,name=remote_ip" json:"remote_ip,omitempty"`
- Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
- RemoteAs uint32 `protobuf:"varint,3,opt,name=remote_as" json:"remote_as,omitempty"`
- CapRefresh bool `protobuf:"varint,4,opt,name=cap_refresh" json:"cap_refresh,omitempty"`
- CapEnhancedRefresh bool `protobuf:"varint,5,opt,name=cap_enhanced_refresh" json:"cap_enhanced_refresh,omitempty"`
- RemoteCap []*Capability `protobuf:"bytes,6,rep,name=remote_cap" json:"remote_cap,omitempty"`
- LocalCap []*Capability `protobuf:"bytes,7,rep,name=local_cap" json:"local_cap,omitempty"`
- Holdtime uint32 `protobuf:"varint,8,opt,name=holdtime" json:"holdtime,omitempty"`
- KeepaliveInterval uint32 `protobuf:"varint,9,opt,name=keepalive_interval" json:"keepalive_interval,omitempty"`
+ RemoteIp string `protobuf:"bytes,1,opt,name=remote_ip" json:"remote_ip,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
+ RemoteAs uint32 `protobuf:"varint,3,opt,name=remote_as" json:"remote_as,omitempty"`
+ RemoteCap [][]byte `protobuf:"bytes,6,rep,name=remote_cap,proto3" json:"remote_cap,omitempty"`
+ LocalCap [][]byte `protobuf:"bytes,7,rep,name=local_cap,proto3" json:"local_cap,omitempty"`
+ Holdtime uint32 `protobuf:"varint,8,opt,name=holdtime" json:"holdtime,omitempty"`
+ KeepaliveInterval uint32 `protobuf:"varint,9,opt,name=keepalive_interval" json:"keepalive_interval,omitempty"`
}
func (m *PeerConf) Reset() { *m = PeerConf{} }
func (m *PeerConf) String() string { return proto.CompactTextString(m) }
func (*PeerConf) ProtoMessage() {}
-func (m *PeerConf) GetRemoteCap() []*Capability {
- if m != nil {
- return m.RemoteCap
- }
- return nil
-}
-
-func (m *PeerConf) GetLocalCap() []*Capability {
- if m != nil {
- return m.LocalCap
- }
- return nil
-}
-
type PeerInfo struct {
BgpState string `protobuf:"bytes,1,opt,name=bgp_state" json:"bgp_state,omitempty"`
AdminState string `protobuf:"bytes,2,opt,name=admin_state" json:"admin_state,omitempty"`
@@ -788,7 +687,6 @@ func (*Vrf) ProtoMessage() {}
func init() {
proto.RegisterEnum("api.Resource", Resource_name, Resource_value)
proto.RegisterEnum("api.Operation", Operation_name, Operation_value)
- proto.RegisterEnum("api.BGP_CAPABILITY", BGP_CAPABILITY_name, BGP_CAPABILITY_value)
proto.RegisterEnum("api.Error_ErrorCode", Error_ErrorCode_name, Error_ErrorCode_value)
}
diff --git a/api/gobgp.proto b/api/gobgp.proto
index f08d5b26..ba39250c 100644
--- a/api/gobgp.proto
+++ b/api/gobgp.proto
@@ -109,35 +109,6 @@ enum Operation {
DEL_ALL = 2;
}
-enum BGP_CAPABILITY {
- UNKNOWN_CAP = 0;
- MULTIPROTOCOL = 1;
- ROUTE_REFRESH = 2;
- CARRYING_LABEL_INFO = 4;
- GRACEFUL_RESTART = 64;
- FOUR_OCTET_AS_NUMBER = 65;
- ENHANCED_ROUTE_REFRESH = 70;
- ROUTE_REFRESH_CISCO = 128;
-}
-
-message GracefulRestartTuple {
- uint32 rf = 1;
- uint32 flags = 2;
-}
-
-message GracefulRestart {
- uint32 flags = 1;
- uint32 time = 2;
- repeated GracefulRestartTuple tuples = 3;
-}
-
-message Capability {
- BGP_CAPABILITY code = 1;
- uint32 multi_protocol = 2;
- GracefulRestart graceful_restart = 3;
- uint32 asn = 4;
-}
-
message Path {
bytes nlri = 1;
repeated bytes pattrs = 2;
@@ -158,10 +129,8 @@ message PeerConf {
string remote_ip = 1;
string id = 2;
uint32 remote_as = 3;
- bool cap_refresh = 4;
- bool cap_enhanced_refresh = 5;
- repeated Capability remote_cap = 6;
- repeated Capability local_cap = 7;
+ repeated bytes remote_cap = 6;
+ repeated bytes local_cap = 7;
uint32 holdtime = 8;
uint32 keepalive_interval = 9;
}