summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-05-29 20:11:27 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-06-01 18:02:20 +0900
commit007c0df5092df0be2e03df457dcfcb89c92080d6 (patch)
treeafe0db0f3637615df143081a46eac6e5141dfca2 /api
parent7ea3a18ef5abffc3c1bb01366b0f7e274a42dcff (diff)
cli: fix AS_PATH string format
Diffstat (limited to 'api')
-rw-r--r--api/gobgp.pb.go19
-rw-r--r--api/gobgp.proto7
2 files changed, 24 insertions, 2 deletions
diff --git a/api/gobgp.pb.go b/api/gobgp.pb.go
index 5df8c325..132701c1 100644
--- a/api/gobgp.pb.go
+++ b/api/gobgp.pb.go
@@ -26,6 +26,7 @@ It has these top-level messages:
TunnelEncapSubTLV
TunnelEncapTLV
PathAttr
+ AsPath
Path
Destination
PeerConf
@@ -767,7 +768,7 @@ type PathAttr struct {
Type BGP_ATTR_TYPE `protobuf:"varint,1,opt,name=type,enum=api.BGP_ATTR_TYPE" json:"type,omitempty"`
Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
Origin Origin `protobuf:"varint,3,opt,name=origin,enum=api.Origin" json:"origin,omitempty"`
- AsPath []uint32 `protobuf:"varint,4,rep,name=as_path" json:"as_path,omitempty"`
+ AsPaths []*AsPath `protobuf:"bytes,4,rep,name=as_paths" json:"as_paths,omitempty"`
Nexthop string `protobuf:"bytes,5,opt,name=nexthop" json:"nexthop,omitempty"`
Metric uint32 `protobuf:"varint,6,opt,name=metric" json:"metric,omitempty"`
Pref uint32 `protobuf:"varint,7,opt,name=pref" json:"pref,omitempty"`
@@ -783,6 +784,13 @@ func (m *PathAttr) Reset() { *m = PathAttr{} }
func (m *PathAttr) String() string { return proto.CompactTextString(m) }
func (*PathAttr) ProtoMessage() {}
+func (m *PathAttr) GetAsPaths() []*AsPath {
+ if m != nil {
+ return m.AsPaths
+ }
+ return nil
+}
+
func (m *PathAttr) GetAggregator() *Aggregator {
if m != nil {
return m.Aggregator
@@ -804,6 +812,15 @@ func (m *PathAttr) GetTunnelEncap() []*TunnelEncapTLV {
return nil
}
+type AsPath struct {
+ SegmentType uint32 `protobuf:"varint,1,opt,name=segment_type" json:"segment_type,omitempty"`
+ Asns []uint32 `protobuf:"varint,2,rep,name=asns" json:"asns,omitempty"`
+}
+
+func (m *AsPath) Reset() { *m = AsPath{} }
+func (m *AsPath) String() string { return proto.CompactTextString(m) }
+func (*AsPath) ProtoMessage() {}
+
type Path struct {
Nlri *Nlri `protobuf:"bytes,1,opt,name=nlri" json:"nlri,omitempty"`
Nexthop string `protobuf:"bytes,2,opt,name=nexthop" json:"nexthop,omitempty"`
diff --git a/api/gobgp.proto b/api/gobgp.proto
index 9bb0075f..0d38ad58 100644
--- a/api/gobgp.proto
+++ b/api/gobgp.proto
@@ -277,7 +277,7 @@ message PathAttr {
BGP_ATTR_TYPE type = 1;
repeated string value = 2;
Origin origin = 3;
- repeated uint32 as_path = 4;
+ repeated AsPath as_paths = 4;
string nexthop = 5;
uint32 metric = 6;
uint32 pref = 7;
@@ -289,6 +289,11 @@ message PathAttr {
repeated TunnelEncapTLV tunnel_encap = 13;
}
+message AsPath {
+ uint32 segment_type = 1;
+ repeated uint32 asns = 2;
+}
+
message Path {
Nlri nlri = 1;
string nexthop = 2;