sysrib

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetRouteRequest_Safi_name = map[int32]string{
		0: "SAFI_UNSPECIFIED",
		1: "SAFI_UNICAST",
	}
	SetRouteRequest_Safi_value = map[string]int32{
		"SAFI_UNSPECIFIED": 0,
		"SAFI_UNICAST":     1,
	}
)

Enum value maps for SetRouteRequest_Safi.

View Source
var (
	Prefix_Family_name = map[int32]string{
		0: "FAMILY_UNSPECIFIED",
		1: "FAMILY_IPV4",
		2: "FAMILY_IPV6",
	}
	Prefix_Family_value = map[string]int32{
		"FAMILY_UNSPECIFIED": 0,
		"FAMILY_IPV4":        1,
		"FAMILY_IPV6":        2,
	}
)

Enum value maps for Prefix_Family.

View Source
var (
	Nexthop_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_IPV4",
		2: "TYPE_IPV6",
	}
	Nexthop_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"TYPE_IPV4":        1,
		"TYPE_IPV6":        2,
	}
)

Enum value maps for Nexthop_Type.

View Source
var (
	SetRouteResponse_Status_name = map[int32]string{
		0: "STATUS_UNSPECIFIED",
		1: "STATUS_SUCCESS",
		2: "STATUS_FAIL",
	}
	SetRouteResponse_Status_value = map[string]int32{
		"STATUS_UNSPECIFIED": 0,
		"STATUS_SUCCESS":     1,
		"STATUS_FAIL":        2,
	}
)

Enum value maps for SetRouteResponse_Status.

View Source
var File_sysrib_proto protoreflect.FileDescriptor
View Source
var Sysrib_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sysrib.Sysrib",
	HandlerType: (*SysribServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetRoute",
			Handler:    _Sysrib_SetRoute_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sysrib.proto",
}

Sysrib_ServiceDesc is the grpc.ServiceDesc for Sysrib service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSysribServer

func RegisterSysribServer(s grpc.ServiceRegistrar, srv SysribServer)

Types

type Nexthop

type Nexthop struct {
	VrfId uint32       `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	Type  Nexthop_Type `protobuf:"varint,2,opt,name=type,proto3,enum=sysrib.Nexthop_Type" json:"type,omitempty"`
	//int32 ifindex = 3;
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	Weight  uint64 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

func (*Nexthop) Descriptor deprecated

func (*Nexthop) Descriptor() ([]byte, []int)

Deprecated: Use Nexthop.ProtoReflect.Descriptor instead.

func (*Nexthop) GetAddress

func (x *Nexthop) GetAddress() string

func (*Nexthop) GetType

func (x *Nexthop) GetType() Nexthop_Type

func (*Nexthop) GetVrfId

func (x *Nexthop) GetVrfId() uint32

func (*Nexthop) GetWeight

func (x *Nexthop) GetWeight() uint64

func (*Nexthop) ProtoMessage

func (*Nexthop) ProtoMessage()

func (*Nexthop) ProtoReflect

func (x *Nexthop) ProtoReflect() protoreflect.Message

func (*Nexthop) Reset

func (x *Nexthop) Reset()

func (*Nexthop) String

func (x *Nexthop) String() string

type Nexthop_Type

type Nexthop_Type int32
const (
	Nexthop_TYPE_UNSPECIFIED Nexthop_Type = 0
	Nexthop_TYPE_IPV4        Nexthop_Type = 1
	Nexthop_TYPE_IPV6        Nexthop_Type = 2
)

func (Nexthop_Type) Descriptor

func (Nexthop_Type) Enum

func (x Nexthop_Type) Enum() *Nexthop_Type

func (Nexthop_Type) EnumDescriptor deprecated

func (Nexthop_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Nexthop_Type.Descriptor instead.

func (Nexthop_Type) Number

func (Nexthop_Type) String

func (x Nexthop_Type) String() string

func (Nexthop_Type) Type

type Prefix

type Prefix struct {
	Family     Prefix_Family `protobuf:"varint,1,opt,name=family,proto3,enum=sysrib.Prefix_Family" json:"family,omitempty"`
	Address    string        `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	MaskLength uint32        `protobuf:"varint,3,opt,name=mask_length,json=maskLength,proto3" json:"mask_length,omitempty"`
	// contains filtered or unexported fields
}

TODO(wenbli): This probably goes in some common proto file.

func (*Prefix) Descriptor deprecated

func (*Prefix) Descriptor() ([]byte, []int)

Deprecated: Use Prefix.ProtoReflect.Descriptor instead.

func (*Prefix) GetAddress

func (x *Prefix) GetAddress() string

func (*Prefix) GetFamily

func (x *Prefix) GetFamily() Prefix_Family

func (*Prefix) GetMaskLength

func (x *Prefix) GetMaskLength() uint32

func (*Prefix) ProtoMessage

func (*Prefix) ProtoMessage()

func (*Prefix) ProtoReflect

func (x *Prefix) ProtoReflect() protoreflect.Message

func (*Prefix) Reset

func (x *Prefix) Reset()

func (*Prefix) String

func (x *Prefix) String() string

type Prefix_Family

type Prefix_Family int32
const (
	Prefix_FAMILY_UNSPECIFIED Prefix_Family = 0
	Prefix_FAMILY_IPV4        Prefix_Family = 1
	Prefix_FAMILY_IPV6        Prefix_Family = 2
)

func (Prefix_Family) Descriptor

func (Prefix_Family) Enum

func (x Prefix_Family) Enum() *Prefix_Family

func (Prefix_Family) EnumDescriptor deprecated

func (Prefix_Family) EnumDescriptor() ([]byte, []int)

Deprecated: Use Prefix_Family.Descriptor instead.

func (Prefix_Family) Number

func (Prefix_Family) String

func (x Prefix_Family) String() string

func (Prefix_Family) Type

type SetRouteRequest

type SetRouteRequest struct {
	Delete         bool                 `protobuf:"varint,1,opt,name=delete,proto3" json:"delete,omitempty"`
	VrfId          uint32               `protobuf:"varint,2,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	AdminDistance  uint32               `protobuf:"varint,3,opt,name=admin_distance,json=adminDistance,proto3" json:"admin_distance,omitempty"`
	ProtocolName   string               `protobuf:"bytes,4,opt,name=protocol_name,json=protocolName,proto3" json:"protocol_name,omitempty"`
	Safi           SetRouteRequest_Safi `protobuf:"varint,5,opt,name=safi,proto3,enum=sysrib.SetRouteRequest_Safi" json:"safi,omitempty"`
	Prefix         *Prefix              `protobuf:"bytes,6,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Metric         uint32               `protobuf:"varint,7,opt,name=metric,proto3" json:"metric,omitempty"`
	Nexthops       []*Nexthop           `protobuf:"bytes,8,rep,name=nexthops,proto3" json:"nexthops,omitempty"`
	BackupNexthops []*Nexthop           `protobuf:"bytes,9,rep,name=backup_nexthops,json=backupNexthops,proto3" json:"backup_nexthops,omitempty"`
	// contains filtered or unexported fields
}

SetRouteRequest and its dependent messages are derived from ZEBRA_ROUTE_ADD/ZEBRA_ROUTE_DELETE.

func (*SetRouteRequest) Descriptor deprecated

func (*SetRouteRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetRouteRequest.ProtoReflect.Descriptor instead.

func (*SetRouteRequest) GetAdminDistance

func (x *SetRouteRequest) GetAdminDistance() uint32

func (*SetRouteRequest) GetBackupNexthops

func (x *SetRouteRequest) GetBackupNexthops() []*Nexthop

func (*SetRouteRequest) GetDelete

func (x *SetRouteRequest) GetDelete() bool

func (*SetRouteRequest) GetMetric

func (x *SetRouteRequest) GetMetric() uint32

func (*SetRouteRequest) GetNexthops

func (x *SetRouteRequest) GetNexthops() []*Nexthop

func (*SetRouteRequest) GetPrefix

func (x *SetRouteRequest) GetPrefix() *Prefix

func (*SetRouteRequest) GetProtocolName

func (x *SetRouteRequest) GetProtocolName() string

func (*SetRouteRequest) GetSafi

func (*SetRouteRequest) GetVrfId

func (x *SetRouteRequest) GetVrfId() uint32

func (*SetRouteRequest) ProtoMessage

func (*SetRouteRequest) ProtoMessage()

func (*SetRouteRequest) ProtoReflect

func (x *SetRouteRequest) ProtoReflect() protoreflect.Message

func (*SetRouteRequest) Reset

func (x *SetRouteRequest) Reset()

func (*SetRouteRequest) String

func (x *SetRouteRequest) String() string

type SetRouteRequest_Safi

type SetRouteRequest_Safi int32
const (
	SetRouteRequest_SAFI_UNSPECIFIED SetRouteRequest_Safi = 0
	SetRouteRequest_SAFI_UNICAST     SetRouteRequest_Safi = 1 //MULTICAST = 1;
)

func (SetRouteRequest_Safi) Descriptor

func (SetRouteRequest_Safi) Enum

func (SetRouteRequest_Safi) EnumDescriptor deprecated

func (SetRouteRequest_Safi) EnumDescriptor() ([]byte, []int)

Deprecated: Use SetRouteRequest_Safi.Descriptor instead.

func (SetRouteRequest_Safi) Number

func (SetRouteRequest_Safi) String

func (x SetRouteRequest_Safi) String() string

func (SetRouteRequest_Safi) Type

type SetRouteResponse

type SetRouteResponse struct {
	Status SetRouteResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=sysrib.SetRouteResponse_Status" json:"status,omitempty"` // tableid
	// contains filtered or unexported fields
}

func (*SetRouteResponse) Descriptor deprecated

func (*SetRouteResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetRouteResponse.ProtoReflect.Descriptor instead.

func (*SetRouteResponse) GetStatus

func (*SetRouteResponse) ProtoMessage

func (*SetRouteResponse) ProtoMessage()

func (*SetRouteResponse) ProtoReflect

func (x *SetRouteResponse) ProtoReflect() protoreflect.Message

func (*SetRouteResponse) Reset

func (x *SetRouteResponse) Reset()

func (*SetRouteResponse) String

func (x *SetRouteResponse) String() string

type SetRouteResponse_Status

type SetRouteResponse_Status int32
const (
	SetRouteResponse_STATUS_UNSPECIFIED SetRouteResponse_Status = 0
	SetRouteResponse_STATUS_SUCCESS     SetRouteResponse_Status = 1
	SetRouteResponse_STATUS_FAIL        SetRouteResponse_Status = 2
)

func (SetRouteResponse_Status) Descriptor

func (SetRouteResponse_Status) Enum

func (SetRouteResponse_Status) EnumDescriptor deprecated

func (SetRouteResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use SetRouteResponse_Status.Descriptor instead.

func (SetRouteResponse_Status) Number

func (SetRouteResponse_Status) String

func (x SetRouteResponse_Status) String() string

func (SetRouteResponse_Status) Type

type SysribClient

type SysribClient interface {
	SetRoute(ctx context.Context, in *SetRouteRequest, opts ...grpc.CallOption) (*SetRouteResponse, error)
}

SysribClient is the client API for Sysrib service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSysribClient

func NewSysribClient(cc grpc.ClientConnInterface) SysribClient

type SysribServer

type SysribServer interface {
	SetRoute(context.Context, *SetRouteRequest) (*SetRouteResponse, error)
	// contains filtered or unexported methods
}

SysribServer is the server API for Sysrib service. All implementations must embed UnimplementedSysribServer for forward compatibility

type UnimplementedSysribServer

type UnimplementedSysribServer struct {
}

UnimplementedSysribServer must be embedded to have forward compatible implementations.

func (UnimplementedSysribServer) SetRoute

type UnsafeSysribServer

type UnsafeSysribServer interface {
	// contains filtered or unexported methods
}

UnsafeSysribServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SysribServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL