// Code generated by protoc-gen-go. // source: gobgp.proto // DO NOT EDIT! /* Package api is a generated protocol buffer package. It is generated from these files: gobgp.proto It has these top-level messages: Error Arguments ModPathArguments AddressFamily Aggregator EVPNNlri EvpnMacIpAdvertisement Nlri TunnelEncapSubTLV TunnelEncapTLV PathAttr Path Destination PeerConf PeerInfo Peer */ package api import proto "github.com/golang/protobuf/proto" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal type Resource int32 const ( Resource_GLOBAL Resource = 0 Resource_LOCAL Resource = 1 Resource_ADJ_IN Resource = 2 Resource_ADJ_OUT Resource = 3 ) var Resource_name = map[int32]string{ 0: "GLOBAL", 1: "LOCAL", 2: "ADJ_IN", 3: "ADJ_OUT", } var Resource_value = map[string]int32{ "GLOBAL": 0, "LOCAL": 1, "ADJ_IN": 2, "ADJ_OUT": 3, } func (x Resource) String() string { return proto.EnumName(Resource_name, int32(x)) } type AFI int32 const ( AFI_UNKNOWN_AFI AFI = 0 AFI_IP AFI = 1 AFI_IP6 AFI = 2 AFI_L2VPN AFI = 25 ) var AFI_name = map[int32]string{ 0: "UNKNOWN_AFI", 1: "IP", 2: "IP6", 25: "L2VPN", } var AFI_value = map[string]int32{ "UNKNOWN_AFI": 0, "IP": 1, "IP6": 2, "L2VPN": 25, } func (x AFI) String() string { return proto.EnumName(AFI_name, int32(x)) } type SAFI int32 const ( SAFI_UNKNOWN_SAFI SAFI = 0 SAFI_UNICAST SAFI = 1 SAFI_MULTICAST SAFI = 2 SAFI_MPLS_LABEL SAFI = 4 SAFI_VPLS SAFI = 65 SAFI_EVPN SAFI = 70 SAFI_MPLS_VPN SAFI = 128 SAFI_MPLS_VPN_MULTICAST SAFI = 129 SAFI_ROUTE_TARGET_CONSTRTAINS SAFI = 132 ) var SAFI_name = map[int32]string{ 0: "UNKNOWN_SAFI", 1: "UNICAST", 2: "MULTICAST", 4: "MPLS_LABEL", 65: "VPLS", 70: "EVPN", 128: "MPLS_VPN", 129: "MPLS_VPN_MULTICAST", 132: "ROUTE_TARGET_CONSTRTAINS", } var SAFI_value = map[string]int32{ "UNKNOWN_SAFI": 0, "UNICAST": 1, "MULTICAST": 2, "MPLS_LABEL": 4, "VPLS": 65, "EVPN": 70, "MPLS_VPN": 128, "MPLS_VPN_MULTICAST": 129, "ROUTE_TARGET_CONSTRTAINS": 132, } func (x SAFI) String() string { return proto.EnumName(SAFI_name, int32(x)) } type Origin int32 const ( Origin_IGP Origin = 0 Origin_EGP Origin = 1 Origin_INCOMPLETE Origin = 2 ) var Origin_name = map[int32]string{ 0: "IGP", 1: "EGP", 2: "INCOMPLETE", } var Origin_value = map[string]int32{ "IGP": 0, "EGP": 1, "INCOMPLETE": 2, } func (x Origin) String() string { return proto.EnumName(Origin_name, int32(x)) } type TUNNEL_TYPE int32 const ( TUNNEL_TYPE_UNKNOWN_TUNNEL_TYPE TUNNEL_TYPE = 0 TUNNEL_TYPE_L2TPV3_OVER_IP TUNNEL_TYPE = 1 TUNNEL_TYPE_GRE TUNNEL_TYPE = 2 TUNNEL_TYPE_IP_IN_IP TUNNEL_TYPE = 7 TUNNEL_TYPE_VXLAN TUNNEL_TYPE = 8 TUNNEL_TYPE_NVGRE TUNNEL_TYPE = 9 TUNNEL_TYPE_MPLS TUNNEL_TYPE = 10 TUNNEL_TYPE_MPLS_IN_GRE TUNNEL_TYPE = 11 TUNNEL_TYPE_VXLAN_GRE TUNNEL_TYPE = 12 ) var TUNNEL_TYPE_name = map[int32]string{ 0: "UNKNOWN_TUNNEL_TYPE", 1: "L2TPV3_OVER_IP", 2: "GRE", 7: "IP_IN_IP", 8: "VXLAN", 9: "NVGRE", 10: "MPLS", 11: "MPLS_IN_GRE", 12: "VXLAN_GRE", } var TUNNEL_TYPE_value = map[string]int32{ "UNKNOWN_TUNNEL_TYPE": 0, "L2TPV3_OVER_IP": 1, "GRE": 2, "IP_IN_IP": 7, "VXLAN": 8, "NVGRE": 9, "MPLS": 10, "MPLS_IN_GRE": 11, "VXLAN_GRE": 12, } func (x TUNNEL_TYPE) String() string { return proto.EnumName(TUNNEL_TYPE_name, int32(x)) } type EVPN_TYPE int32 const ( EVPN_TYPE_UNKNOWN_EVPN_TYPE EVPN_TYPE = 0 EVPN_TYPE_ROUTE_TYPE_ETHERNET_AUTO_DISCOVERY EVPN_TYPE = 1 EVPN_TYPE_ROUTE_TYPE_MAC_IP_ADVERTISEMENT EVPN_TYPE = 2 EVPN_TYPE_INCLUSIVE_MULTICAST_ETHERNET_TAG EVPN_TYPE = 3 EVPN_TYPE_ETHERNET_SEGMENT_ROUTE EVPN_TYPE = 4 ) var EVPN_TYPE_name = map[int32]string{ 0: "UNKNOWN_EVPN_TYPE", 1: "ROUTE_TYPE_ETHERNET_AUTO_DISCOVERY", 2: "ROUTE_TYPE_MAC_IP_ADVERTISEMENT", 3: "INCLUSIVE_MULTICAST_ETHERNET_TAG", 4: "ETHERNET_SEGMENT_ROUTE", } var EVPN_TYPE_value = map[string]int32{ "UNKNOWN_EVPN_TYPE": 0, "ROUTE_TYPE_ETHERNET_AUTO_DISCOVERY": 1, "ROUTE_TYPE_MAC_IP_ADVERTISEMENT": 2, "INCLUSIVE_MULTICAST_ETHERNET_TAG": 3, "ETHERNET_SEGMENT_ROUTE": 4, } func (x EVPN_TYPE) String() string { return proto.EnumName(EVPN_TYPE_name, int32(x)) } type BGP_ATTR_TYPE int32 const ( BGP_ATTR_TYPE_UNKNOWN_ATTR BGP_ATTR_TYPE = 0 BGP_ATTR_TYPE_ORIGIN BGP_ATTR_TYPE = 1 BGP_ATTR_TYPE_AS_PATH BGP_ATTR_TYPE = 2 BGP_ATTR_TYPE_NEXT_HOP BGP_ATTR_TYPE = 3 BGP_ATTR_TYPE_MULTI_EXIT_DISC BGP_ATTR_TYPE = 4 BGP_ATTR_TYPE_LOCAL_PREF BGP_ATTR_TYPE = 5 BGP_ATTR_TYPE_ATOMIC_AGGREGATE BGP_ATTR_TYPE = 6 BGP_ATTR_TYPE_AGGREGATOR BGP_ATTR_TYPE = 7 BGP_ATTR_TYPE_COMMUNITIES BGP_ATTR_TYPE = 8 BGP_ATTR_TYPE_ORIGINATOR_ID BGP_ATTR_TYPE = 9 BGP_ATTR_TYPE_CLUSTER_LIST BGP_ATTR_TYPE = 10 BGP_ATTR_TYPE_MP_REACH_NLRI BGP_ATTR_TYPE = 14 BGP_ATTR_TYPE_MP_UNREACH_NLRI BGP_ATTR_TYPE = 15 BGP_ATTR_TYPE_EXTENDED_COMMUNITIES BGP_ATTR_TYPE = 16 BGP_ATTR_TYPE_AS4_PATH BGP_ATTR_TYPE = 17 BGP_ATTR_TYPE_AS4_AGGREGATOR BGP_ATTR_TYPE = 18 BGP_ATTR_TYPE_TUNNEL_ENCAP BGP_ATTR_TYPE = 23 ) var BGP_ATTR_TYPE_name = map[int32]string{ 0: "UNKNOWN_ATTR", 1: "ORIGIN", 2: "AS_PATH", 3: "NEXT_HOP", 4: "MULTI_EXIT_DISC", 5: "LOCAL_PREF", 6: "ATOMIC_AGGREGATE", 7: "AGGREGATOR", 8: "COMMUNITIES", 9: "ORIGINATOR_ID", 10: "CLUSTER_LIST", 14: "MP_REACH_NLRI", 15: "MP_UNREACH_NLRI", 16: "EXTENDED_COMMUNITIES", 17: "AS4_PATH", 18: "AS4_AGGREGATOR", 23: "TUNNEL_ENCAP", } var BGP_ATTR_TYPE_value = map[string]int32{ "UNKNOWN_ATTR": 0, "ORIGIN": 1, "AS_PATH": 2, "NEXT_HOP": 3, "MULTI_EXIT_DISC": 4, "LOCAL_PREF": 5, "ATOMIC_AGGREGATE": 6, "AGGREGATOR": 7, "COMMUNITIES": 8, "ORIGINATOR_ID": 9, "CLUSTER_LIST": 10, "MP_REACH_NLRI": 14, "MP_UNREACH_NLRI": 15, "EXTENDED_COMMUNITIES": 16, "AS4_PATH": 17, "AS4_AGGREGATOR": 18, "TUNNEL_ENCAP": 23, } func (x BGP_ATTR_TYPE) String() string { return proto.EnumName(BGP_ATTR_TYPE_name, int32(x)) } type Error_ErrorCode int32 const ( Error_SUCCESS Error_ErrorCode = 0 Error_FAIL Error_ErrorCode = 1 ) var Error_ErrorCode_name = map[int32]string{ 0: "SUCCESS", 1: "FAIL", } var Error_ErrorCode_value = map[string]int32{ "SUCCESS": 0, "FAIL": 1, } func (x Error_ErrorCode) String() string { return proto.EnumName(Error_ErrorCode_name, int32(x)) } type Error struct { Code Error_ErrorCode `protobuf:"varint,1,opt,name=code,enum=api.Error_ErrorCode" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"` } func (m *Error) Reset() { *m = Error{} } func (m *Error) String() string { return proto.CompactTextString(m) } func (*Error) ProtoMessage() {} type Arguments struct { Resource Resource `protobuf:"varint,1,opt,name=resource,enum=api.Resource" json:"resource,omitempty"` Af *AddressFamily `protobuf:"bytes,2,opt,name=af" json:"af,omitempty"` RouterId string `protobuf:"bytes,3,opt,name=router_id" json:"router_id,omitempty"` } func (m *Arguments) Reset() { *m = Arguments{} } func (m *Arguments) String() string { return proto.CompactTextString(m) } func (*Arguments) ProtoMessage() {} func (m *Arguments) GetAf() *AddressFamily { if m != nil { return m.Af } return nil } type ModPathArguments struct { Resource Resource `protobuf:"varint,1,opt,name=resource,enum=api.Resource" json:"resource,omitempty"` Path *Path `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` } func (m *ModPathArguments) Reset() { *m = ModPathArguments{} } func (m *ModPathArguments) String() string { return proto.CompactTextString(m) } func (*ModPathArguments) ProtoMessage() {} func (m *ModPathArguments) GetPath() *Path { if m != nil { return m.Path } return nil } type AddressFamily struct { Afi AFI `protobuf:"varint,1,opt,enum=api.AFI" json:"Afi,omitempty"` Safi SAFI `protobuf:"varint,2,opt,enum=api.SAFI" json:"Safi,omitempty"` } func (m *AddressFamily) Reset() { *m = AddressFamily{} } func (m *AddressFamily) String() string { return proto.CompactTextString(m) } func (*AddressFamily) ProtoMessage() {} type Aggregator struct { As uint32 `protobuf:"varint,1,opt,name=as" json:"as,omitempty"` Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` } func (m *Aggregator) Reset() { *m = Aggregator{} } func (m *Aggregator) String() string { return proto.CompactTextString(m) } func (*Aggregator) ProtoMessage() {} type EVPNNlri struct { Type EVPN_TYPE `protobuf:"varint,1,opt,name=type,enum=api.EVPN_TYPE" json:"type,omitempty"` // EvpnAutoDiscoveryRoute = 2; MacIpAdv *EvpnMacIpAdvertisement `protobuf:"bytes,3,opt,name=mac_ip_adv" json:"mac_ip_adv,omitempty"` } func (m *EVPNNlri) Reset() { *m = EVPNNlri{} } func (m *EVPNNlri) String() string { return proto.CompactTextString(m) } func (*EVPNNlri) ProtoMessage() {} func (m *EVPNNlri) GetMacIpAdv() *EvpnMacIpAdvertisement { if m != nil { return m.MacIpAdv } return nil } type EvpnMacIpAdvertisement struct { MacAddr string `protobuf:"bytes,1,opt,name=mac_addr" json:"mac_addr,omitempty"` MacAddrLen uint32 `protobuf:"varint,2,opt,name=mac_addr_len" json:"mac_addr_len,omitempty"` IpAddr string `protobuf:"bytes,3,opt,name=ip_addr" json:"ip_addr,omitempty"` IpAddrLen uint32 `protobuf:"varint,4,opt,name=ip_addr_len" json:"ip_addr_len,omitempty"` Rd string `protobuf:"bytes,5,opt,name=rd" json:"rd,omitempty"` Esi string `protobuf:"bytes,6,opt,name=esi" json:"esi,omitempty"` Etag uint32 `protobuf:"varint,7,opt,name=etag" json:"etag,omitempty"` Labels []uint32 `protobuf:"varint,8,rep,name=labels" json:"labels,omitempty"` } func (m *EvpnMacIpAdvertisement) Reset() { *m = EvpnMacIpAdvertisement{} } func (m *EvpnMacIpAdvertisement) String() string { return proto.CompactTextString(m) } func (*EvpnMacIpAdvertisement) ProtoMessage() {} type Nlri struct { Af *AddressFamily `protobuf:"bytes,1,opt,name=af" json:"af,omitempty"` Prefix string `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"` EvpnNlri *EVPNNlri `protobuf:"bytes,3,opt,name=evpn_nlri" json:"evpn_nlri,omitempty"` Nexthop string `protobuf:"bytes,4,opt,name=nexthop" json:"nexthop,omitempty"` } func (m *Nlri) Reset() { *m = Nlri{} } func (m *Nlri) String() string { return proto.CompactTextString(m) } func (*Nlri) ProtoMessage() {} func (m *Nlri) GetAf() *AddressFamily { if m != nil { return m.Af } return nil } func (m *Nlri) GetEvpnNlri() *EVPNNlri { if m != nil { return m.EvpnNlri } return nil } type TunnelEncapSubTLV struct { Type uint32 `protobuf:"varint,1,opt,name=type" json:"type,omitempty"` Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` } func (m *TunnelEncapSubTLV) Reset() { *m = TunnelEncapSubTLV{} } func (m *TunnelEncapSubTLV) String() string { return proto.CompactTextString(m) } func (*TunnelEncapSubTLV) ProtoMessage() {} type TunnelEncapTLV struct { Type TUNNEL_TYPE `protobuf:"varint,1,opt,name=type,enum=api.TUNNEL_TYPE" json:"type,omitempty"` SubTlv []*TunnelEncapSubTLV `protobuf:"bytes,2,rep,name=sub_tlv" json:"sub_tlv,omitempty"` } func (m *TunnelEncapTLV) Reset() { *m = TunnelEncapTLV{} } func (m *TunnelEncapTLV) String() string { return proto.CompactTextString(m) } func (*TunnelEncapTLV) ProtoMessage() {} func (m *TunnelEncapTLV) GetSubTlv() []*TunnelEncapSubTLV { if m != nil { return m.SubTlv } return nil } 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"` 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"` Aggregator *Aggregator `protobuf:"bytes,8,opt,name=aggregator" json:"aggregator,omitempty"` Communites []uint32 `protobuf:"varint,9,rep,name=communites" json:"communites,omitempty"` Originator string `protobuf:"bytes,10,opt,name=originator" json:"originator,omitempty"` Cluster []string `protobuf:"bytes,11,rep,name=cluster" json:"cluster,omitempty"` Nlri *Nlri `protobuf:"bytes,12,opt,name=nlri" json:"nlri,omitempty"` TunnelEncap []*TunnelEncapTLV `protobuf:"bytes,13,rep,name=tunnel_encap" json:"tunnel_encap,omitempty"` } func (m *PathAttr) Reset() { *m = PathAttr{} } func (m *PathAttr) String() string { return proto.CompactTextString(m) } func (*PathAttr) ProtoMessage() {} func (m *PathAttr) GetAggregator() *Aggregator { if m != nil { return m.Aggregator } return nil } func (m *PathAttr) GetNlri() *Nlri { if m != nil { return m.Nlri } return nil } func (m *PathAttr) GetTunnelEncap() []*TunnelEncapTLV { if m != nil { return m.TunnelEncap } return nil } 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"` Age int64 `protobuf:"varint,3,opt,name=age" json:"age,omitempty"` Attrs []*PathAttr `protobuf:"bytes,4,rep,name=attrs" json:"attrs,omitempty"` Best bool `protobuf:"varint,5,opt,name=best" json:"best,omitempty"` IsWithdraw bool `protobuf:"varint,6,opt,name=is_withdraw" json:"is_withdraw,omitempty"` } func (m *Path) Reset() { *m = Path{} } func (m *Path) String() string { return proto.CompactTextString(m) } func (*Path) ProtoMessage() {} func (m *Path) GetNlri() *Nlri { if m != nil { return m.Nlri } return nil } func (m *Path) GetAttrs() []*PathAttr { if m != nil { return m.Attrs } return nil } type Destination struct { Prefix string `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"` Paths []*Path `protobuf:"bytes,2,rep,name=paths" json:"paths,omitempty"` BestPathIdx uint32 `protobuf:"varint,3,opt,name=best_path_idx" json:"best_path_idx,omitempty"` } func (m *Destination) Reset() { *m = Destination{} } func (m *Destination) String() string { return proto.CompactTextString(m) } func (*Destination) ProtoMessage() {} func (m *Destination) GetPaths() []*Path { if m != nil { return m.Paths } return nil } 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 []int32 `protobuf:"varint,6,rep,name=remote_cap" json:"remote_cap,omitempty"` LocalCap []int32 `protobuf:"varint,7,rep,name=local_cap" json:"local_cap,omitempty"` } func (m *PeerConf) Reset() { *m = PeerConf{} } func (m *PeerConf) String() string { return proto.CompactTextString(m) } func (*PeerConf) ProtoMessage() {} 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"` FsmEstablishedTransitions uint32 `protobuf:"varint,3,opt,name=fsm_established_transitions" json:"fsm_established_transitions,omitempty"` TotalMessageOut uint32 `protobuf:"varint,4,opt,name=total_message_out" json:"total_message_out,omitempty"` TotalMessageIn uint32 `protobuf:"varint,5,opt,name=total_message_in" json:"total_message_in,omitempty"` UpdateMessageOut uint32 `protobuf:"varint,6,opt,name=update_message_out" json:"update_message_out,omitempty"` UpdateMessageIn uint32 `protobuf:"varint,7,opt,name=update_message_in" json:"update_message_in,omitempty"` KeepAliveMessageOut uint32 `protobuf:"varint,8,opt,name=keep_alive_message_out" json:"keep_alive_message_out,omitempty"` KeepAliveMessageIn uint32 `protobuf:"varint,9,opt,name=keep_alive_message_in" json:"keep_alive_message_in,omitempty"` OpenMessageOut uint32 `protobuf:"varint,10,opt,name=open_message_out" json:"open_message_out,omitempty"` OpenMessageIn uint32 `protobuf:"varint,11,opt,name=open_message_in" json:"open_message_in,omitempty"` NotificationOut uint32 `protobuf:"varint,12,opt,name=notification_out" json:"notification_out,omitempty"` NotificationIn uint32 `protobuf:"varint,13,opt,name=notification_in" json:"notification_in,omitempty"` RefreshMessageOut uint32 `protobuf:"varint,14,opt,name=refresh_message_out" json:"refresh_message_out,omitempty"` RefreshMessageIn uint32 `protobuf:"varint,15,opt,name=refresh_message_in" json:"refresh_message_in,omitempty"` DiscardedOut uint32 `protobuf:"varint,16,opt,name=discarded_out" json:"discarded_out,omitempty"` DiscardedIn uint32 `protobuf:"varint,17,opt,name=discarded_in" json:"discarded_in,omitempty"` Uptime int64 `protobuf:"varint,18,opt,name=uptime" json:"uptime,omitempty"` Downtime int64 `protobuf:"varint,19,opt,name=downtime" json:"downtime,omitempty"` LastError string `protobuf:"bytes,20,opt,name=last_error" json:"last_error,omitempty"` Received uint32 `protobuf:"varint,21,opt,name=received" json:"received,omitempty"` Accepted uint32 `protobuf:"varint,22,opt,name=accepted" json:"accepted,omitempty"` Advertized uint32 `protobuf:"varint,23,opt,name=advertized" json:"advertized,omitempty"` OutQ uint32 `protobuf:"varint,24,opt,name=out_q" json:"out_q,omitempty"` Flops uint32 `protobuf:"varint,25,opt,name=flops" json:"flops,omitempty"` } func (m *PeerInfo) Reset() { *m = PeerInfo{} } func (m *PeerInfo) String() string { return proto.CompactTextString(m) } func (*PeerInfo) ProtoMessage() {} type Peer struct { Conf *PeerConf `protobuf:"bytes,1,opt,name=conf" json:"conf,omitempty"` Info *PeerInfo `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` } func (m *Peer) Reset() { *m = Peer{} } func (m *Peer) String() string { return proto.CompactTextString(m) } func (*Peer) ProtoMessage() {} func (m *Peer) GetConf() *PeerConf { if m != nil { return m.Conf } return nil } func (m *Peer) GetInfo() *PeerInfo { if m != nil { return m.Info } return nil } func init() { proto.RegisterEnum("api.Resource", Resource_name, Resource_value) proto.RegisterEnum("api.AFI", AFI_name, AFI_value) proto.RegisterEnum("api.SAFI", SAFI_name, SAFI_value) proto.RegisterEnum("api.Origin", Origin_name, Origin_value) proto.RegisterEnum("api.TUNNEL_TYPE", TUNNEL_TYPE_name, TUNNEL_TYPE_value) proto.RegisterEnum("api.EVPN_TYPE", EVPN_TYPE_name, EVPN_TYPE_value) proto.RegisterEnum("api.BGP_ATTR_TYPE", BGP_ATTR_TYPE_name, BGP_ATTR_TYPE_value) proto.RegisterEnum("api.Error_ErrorCode", Error_ErrorCode_name, Error_ErrorCode_value) } // Client API for Grpc service type GrpcClient interface { GetNeighbors(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetNeighborsClient, error) GetNeighbor(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Peer, error) GetRib(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetRibClient, error) GetAdjRib(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetAdjRibClient, error) Reset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) SoftReset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) SoftResetIn(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) SoftResetOut(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) Shutdown(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) Enable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) Disable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) ModPath(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModPathClient, error) } type grpcClient struct { cc *grpc.ClientConn } func NewGrpcClient(cc *grpc.ClientConn) GrpcClient { return &grpcClient{cc} } func (c *grpcClient) GetNeighbors(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetNeighborsClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[0], c.cc, "/api.Grpc/GetNeighbors", opts...) if err != nil { return nil, err } x := &grpcGetNeighborsClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetNeighborsClient interface { Recv() (*Peer, error) grpc.ClientStream } type grpcGetNeighborsClient struct { grpc.ClientStream } func (x *grpcGetNeighborsClient) Recv() (*Peer, error) { m := new(Peer) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetNeighbor(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Peer, error) { out := new(Peer) err := grpc.Invoke(ctx, "/api.Grpc/GetNeighbor", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) GetRib(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetRibClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[1], c.cc, "/api.Grpc/GetRib", opts...) if err != nil { return nil, err } x := &grpcGetRibClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetRibClient interface { Recv() (*Destination, error) grpc.ClientStream } type grpcGetRibClient struct { grpc.ClientStream } func (x *grpcGetRibClient) Recv() (*Destination, error) { m := new(Destination) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetAdjRib(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetAdjRibClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[2], c.cc, "/api.Grpc/GetAdjRib", opts...) if err != nil { return nil, err } x := &grpcGetAdjRibClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetAdjRibClient interface { Recv() (*Path, error) grpc.ClientStream } type grpcGetAdjRibClient struct { grpc.ClientStream } func (x *grpcGetAdjRibClient) Recv() (*Path, error) { m := new(Path) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) Reset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Reset", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) SoftReset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/SoftReset", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) SoftResetIn(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/SoftResetIn", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) SoftResetOut(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/SoftResetOut", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) Shutdown(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Shutdown", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) Enable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Enable", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) Disable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Disable", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) ModPath(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModPathClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[3], c.cc, "/api.Grpc/ModPath", opts...) if err != nil { return nil, err } x := &grpcModPathClient{stream} return x, nil } type Grpc_ModPathClient interface { Send(*ModPathArguments) error Recv() (*Error, error) grpc.ClientStream } type grpcModPathClient struct { grpc.ClientStream } func (x *grpcModPathClient) Send(m *ModPathArguments) error { return x.ClientStream.SendMsg(m) } func (x *grpcModPathClient) Recv() (*Error, error) { m := new(Error) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // Server API for Grpc service type GrpcServer interface { GetNeighbors(*Arguments, Grpc_GetNeighborsServer) error GetNeighbor(context.Context, *Arguments) (*Peer, error) GetRib(*Arguments, Grpc_GetRibServer) error GetAdjRib(*Arguments, Grpc_GetAdjRibServer) error Reset(context.Context, *Arguments) (*Error, error) SoftReset(context.Context, *Arguments) (*Error, error) SoftResetIn(context.Context, *Arguments) (*Error, error) SoftResetOut(context.Context, *Arguments) (*Error, error) Shutdown(context.Context, *Arguments) (*Error, error) Enable(context.Context, *Arguments) (*Error, error) Disable(context.Context, *Arguments) (*Error, error) ModPath(Grpc_ModPathServer) error } func RegisterGrpcServer(s *grpc.Server, srv GrpcServer) { s.RegisterService(&_Grpc_serviceDesc, srv) } func _Grpc_GetNeighbors_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetNeighbors(m, &grpcGetNeighborsServer{stream}) } type Grpc_GetNeighborsServer interface { Send(*Peer) error grpc.ServerStream } type grpcGetNeighborsServer struct { grpc.ServerStream } func (x *grpcGetNeighborsServer) Send(m *Peer) error { return x.ServerStream.SendMsg(m) } func _Grpc_GetNeighbor_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).GetNeighbor(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_GetRib_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetRib(m, &grpcGetRibServer{stream}) } type Grpc_GetRibServer interface { Send(*Destination) error grpc.ServerStream } type grpcGetRibServer struct { grpc.ServerStream } func (x *grpcGetRibServer) Send(m *Destination) error { return x.ServerStream.SendMsg(m) } func _Grpc_GetAdjRib_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetAdjRib(m, &grpcGetAdjRibServer{stream}) } type Grpc_GetAdjRibServer interface { Send(*Path) error grpc.ServerStream } type grpcGetAdjRibServer struct { grpc.ServerStream } func (x *grpcGetAdjRibServer) Send(m *Path) error { return x.ServerStream.SendMsg(m) } func _Grpc_Reset_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Reset(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_SoftReset_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).SoftReset(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_SoftResetIn_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).SoftResetIn(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_SoftResetOut_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).SoftResetOut(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_Shutdown_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Shutdown(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_Enable_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Enable(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_Disable_Handler(srv interface{}, ctx context.Context, buf []byte) (interface{}, error) { in := new(Arguments) if err := proto.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Disable(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_ModPath_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(GrpcServer).ModPath(&grpcModPathServer{stream}) } type Grpc_ModPathServer interface { Send(*Error) error Recv() (*ModPathArguments, error) grpc.ServerStream } type grpcModPathServer struct { grpc.ServerStream } func (x *grpcModPathServer) Send(m *Error) error { return x.ServerStream.SendMsg(m) } func (x *grpcModPathServer) Recv() (*ModPathArguments, error) { m := new(ModPathArguments) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } var _Grpc_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.Grpc", HandlerType: (*GrpcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetNeighbor", Handler: _Grpc_GetNeighbor_Handler, }, { MethodName: "Reset", Handler: _Grpc_Reset_Handler, }, { MethodName: "SoftReset", Handler: _Grpc_SoftReset_Handler, }, { MethodName: "SoftResetIn", Handler: _Grpc_SoftResetIn_Handler, }, { MethodName: "SoftResetOut", Handler: _Grpc_SoftResetOut_Handler, }, { MethodName: "Shutdown", Handler: _Grpc_Shutdown_Handler, }, { MethodName: "Enable", Handler: _Grpc_Enable_Handler, }, { MethodName: "Disable", Handler: _Grpc_Disable_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetNeighbors", Handler: _Grpc_GetNeighbors_Handler, ServerStreams: true, }, { StreamName: "GetRib", Handler: _Grpc_GetRib_Handler, ServerStreams: true, }, { StreamName: "GetAdjRib", Handler: _Grpc_GetAdjRib_Handler, ServerStreams: true, }, { StreamName: "ModPath", Handler: _Grpc_ModPath_Handler, ServerStreams: true, ClientStreams: true, }, }, }