mpls

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClearLSPRequest_Mode_name = map[int32]string{
		0: "DEFAULT",

		1: "AGGRESSIVE",
		2: "RESET",
		3: "AUTOBW_AGGRESSIVE",
		4: "AUTOBW_NONAGGRESSIVE",
	}
	ClearLSPRequest_Mode_value = map[string]int32{
		"DEFAULT":              0,
		"NONAGGRESSIVE":        0,
		"AGGRESSIVE":           1,
		"RESET":                2,
		"AUTOBW_AGGRESSIVE":    3,
		"AUTOBW_NONAGGRESSIVE": 4,
	}
)

Enum value maps for ClearLSPRequest_Mode.

View Source
var (
	MPLSPingRequest_ReplyMode_name = map[int32]string{
		0: "IPV4",
		1: "ROUTER_ALERT",
	}
	MPLSPingRequest_ReplyMode_value = map[string]int32{
		"IPV4":         0,
		"ROUTER_ALERT": 1,
	}
)

Enum value maps for MPLSPingRequest_ReplyMode.

View Source
var (
	MPLSPingResponse_EchoResponseCode_name = map[int32]string{
		0: "SUCCESS",
		1: "NOT_SENT",
		2: "TIMEOUT",
	}
	MPLSPingResponse_EchoResponseCode_value = map[string]int32{
		"SUCCESS":  0,
		"NOT_SENT": 1,
		"TIMEOUT":  2,
	}
)

Enum value maps for MPLSPingResponse_EchoResponseCode.

View Source
var File_mpls_mpls_proto protoreflect.FileDescriptor
View Source
var MPLS_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gnoi.mpls.MPLS",
	HandlerType: (*MPLSServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ClearLSP",
			Handler:    _MPLS_ClearLSP_Handler,
		},
		{
			MethodName: "ClearLSPCounters",
			Handler:    _MPLS_ClearLSPCounters_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "MPLSPing",
			Handler:       _MPLS_MPLSPing_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "mpls/mpls.proto",
}

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

Functions

func RegisterMPLSServer

func RegisterMPLSServer(s grpc.ServiceRegistrar, srv MPLSServer)

Types

type ClearLSPCountersRequest

type ClearLSPCountersRequest struct {
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Name of the tunnel to clear.
	// contains filtered or unexported fields
}

Request to clear a single tunnel counters on a target device.

func (*ClearLSPCountersRequest) Descriptor deprecated

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

Deprecated: Use ClearLSPCountersRequest.ProtoReflect.Descriptor instead.

func (*ClearLSPCountersRequest) GetName

func (x *ClearLSPCountersRequest) GetName() string

func (*ClearLSPCountersRequest) ProtoMessage

func (*ClearLSPCountersRequest) ProtoMessage()

func (*ClearLSPCountersRequest) ProtoReflect

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

func (*ClearLSPCountersRequest) Reset

func (x *ClearLSPCountersRequest) Reset()

func (*ClearLSPCountersRequest) String

func (x *ClearLSPCountersRequest) String() string

type ClearLSPCountersResponse

type ClearLSPCountersResponse struct {
	// contains filtered or unexported fields
}

func (*ClearLSPCountersResponse) Descriptor deprecated

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

Deprecated: Use ClearLSPCountersResponse.ProtoReflect.Descriptor instead.

func (*ClearLSPCountersResponse) ProtoMessage

func (*ClearLSPCountersResponse) ProtoMessage()

func (*ClearLSPCountersResponse) ProtoReflect

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

func (*ClearLSPCountersResponse) Reset

func (x *ClearLSPCountersResponse) Reset()

func (*ClearLSPCountersResponse) String

func (x *ClearLSPCountersResponse) String() string

type ClearLSPRequest

type ClearLSPRequest struct {
	Name string               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                      // Name of the tunnel to clear.
	Mode ClearLSPRequest_Mode `protobuf:"varint,3,opt,name=mode,proto3,enum=gnoi.mpls.ClearLSPRequest_Mode" json:"mode,omitempty"` // Tunnel clearing mode.
	// contains filtered or unexported fields
}

Request to clear a single tunnel on a target device.

func (*ClearLSPRequest) Descriptor deprecated

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

Deprecated: Use ClearLSPRequest.ProtoReflect.Descriptor instead.

func (*ClearLSPRequest) GetMode

func (*ClearLSPRequest) GetName

func (x *ClearLSPRequest) GetName() string

func (*ClearLSPRequest) ProtoMessage

func (*ClearLSPRequest) ProtoMessage()

func (*ClearLSPRequest) ProtoReflect

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

func (*ClearLSPRequest) Reset

func (x *ClearLSPRequest) Reset()

func (*ClearLSPRequest) String

func (x *ClearLSPRequest) String() string

type ClearLSPRequest_Mode

type ClearLSPRequest_Mode int32
const (
	ClearLSPRequest_DEFAULT ClearLSPRequest_Mode = 0 // Same as NONAGGRESSIVE.
	// Reoptimize the LSP using the current bandwidth.
	ClearLSPRequest_NONAGGRESSIVE ClearLSPRequest_Mode = 0
	// Reoptimize the LSP using the current bandwidth. Only use IGP metric in
	// calcuation.
	ClearLSPRequest_AGGRESSIVE ClearLSPRequest_Mode = 1
	// Reset and restart all LSPs that originated from this routing device.
	ClearLSPRequest_RESET ClearLSPRequest_Mode = 2
	// Apply the highest bandwidth collected on a tunnel without waiting for
	// the current application period to end. Only use IGP metric in
	// calcuation.
	ClearLSPRequest_AUTOBW_AGGRESSIVE ClearLSPRequest_Mode = 3
	// Apply the highest bandwidth collected on a tunnel without waiting for
	// the current application period to end.
	ClearLSPRequest_AUTOBW_NONAGGRESSIVE ClearLSPRequest_Mode = 4
)

func (ClearLSPRequest_Mode) Descriptor

func (ClearLSPRequest_Mode) Enum

func (ClearLSPRequest_Mode) EnumDescriptor deprecated

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

Deprecated: Use ClearLSPRequest_Mode.Descriptor instead.

func (ClearLSPRequest_Mode) Number

func (ClearLSPRequest_Mode) String

func (x ClearLSPRequest_Mode) String() string

func (ClearLSPRequest_Mode) Type

type ClearLSPResponse

type ClearLSPResponse struct {
	// contains filtered or unexported fields
}

func (*ClearLSPResponse) Descriptor deprecated

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

Deprecated: Use ClearLSPResponse.ProtoReflect.Descriptor instead.

func (*ClearLSPResponse) ProtoMessage

func (*ClearLSPResponse) ProtoMessage()

func (*ClearLSPResponse) ProtoReflect

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

func (*ClearLSPResponse) Reset

func (x *ClearLSPResponse) Reset()

func (*ClearLSPResponse) String

func (x *ClearLSPResponse) String() string

type MPLSClient

type MPLSClient interface {
	// ClearLSP clears a single tunnel (requests for it's route to be
	// recalculated).
	ClearLSP(ctx context.Context, in *ClearLSPRequest, opts ...grpc.CallOption) (*ClearLSPResponse, error)
	// ClearLSPCounters will clear the MPLS counters for the provided LSP.
	ClearLSPCounters(ctx context.Context, in *ClearLSPCountersRequest, opts ...grpc.CallOption) (*ClearLSPCountersResponse, error)
	// An MPLS ping, specified as per RFC4379.
	MPLSPing(ctx context.Context, in *MPLSPingRequest, opts ...grpc.CallOption) (MPLS_MPLSPingClient, error)
}

MPLSClient is the client API for MPLS 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 NewMPLSClient

func NewMPLSClient(cc grpc.ClientConnInterface) MPLSClient

type MPLSPingPWEDestination

type MPLSPingPWEDestination struct {

	// The address of the egress LER that the MPLS ping should be sent on when
	// destined to a PWE service.
	Eler string `protobuf:"bytes,1,opt,name=eler,proto3" json:"eler,omitempty"`
	// The virtual circuit ID for the PWE via which the ping should be sent.
	Vcid uint32 `protobuf:"varint,2,opt,name=vcid,proto3" json:"vcid,omitempty"`
	// contains filtered or unexported fields
}

func (*MPLSPingPWEDestination) Descriptor deprecated

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

Deprecated: Use MPLSPingPWEDestination.ProtoReflect.Descriptor instead.

func (*MPLSPingPWEDestination) GetEler

func (x *MPLSPingPWEDestination) GetEler() string

func (*MPLSPingPWEDestination) GetVcid

func (x *MPLSPingPWEDestination) GetVcid() uint32

func (*MPLSPingPWEDestination) ProtoMessage

func (*MPLSPingPWEDestination) ProtoMessage()

func (*MPLSPingPWEDestination) ProtoReflect

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

func (*MPLSPingPWEDestination) Reset

func (x *MPLSPingPWEDestination) Reset()

func (*MPLSPingPWEDestination) String

func (x *MPLSPingPWEDestination) String() string

type MPLSPingRSVPTEDestination

type MPLSPingRSVPTEDestination struct {

	// The IPv4 or IPv6 address used by the system initiating (acting as the
	// head-end) of the RSVP-TE LSP.
	Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
	// The IPv4 or IPv6 address used by the system terminating (acting as the
	// tail-end) of the RSVP-TE LSP.
	Dst string `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"`
	// The extended tunnel ID of the RSVP-TE LSP, expressed as an unsigned, 32b
	// integer.
	ExtendedTunnelId uint32 `protobuf:"varint,3,opt,name=extended_tunnel_id,json=extendedTunnelId,proto3" json:"extended_tunnel_id,omitempty"`
	// contains filtered or unexported fields
}

MPLSPingRSVPTEDestination specifies the destination for an MPLS Ping in terms of an absolute specification of an RSVP-TE LSP. It can be used to identify an individual RSVP-TE session via which a ping should be sent.

func (*MPLSPingRSVPTEDestination) Descriptor deprecated

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

Deprecated: Use MPLSPingRSVPTEDestination.ProtoReflect.Descriptor instead.

func (*MPLSPingRSVPTEDestination) GetDst

func (x *MPLSPingRSVPTEDestination) GetDst() string

func (*MPLSPingRSVPTEDestination) GetExtendedTunnelId

func (x *MPLSPingRSVPTEDestination) GetExtendedTunnelId() uint32

func (*MPLSPingRSVPTEDestination) GetSrc

func (x *MPLSPingRSVPTEDestination) GetSrc() string

func (*MPLSPingRSVPTEDestination) ProtoMessage

func (*MPLSPingRSVPTEDestination) ProtoMessage()

func (*MPLSPingRSVPTEDestination) ProtoReflect

func (*MPLSPingRSVPTEDestination) Reset

func (x *MPLSPingRSVPTEDestination) Reset()

func (*MPLSPingRSVPTEDestination) String

func (x *MPLSPingRSVPTEDestination) String() string

type MPLSPingRequest

type MPLSPingRequest struct {

	// One field within the destination field should be specified to determine
	// the destination of the LSP ping.
	//
	// Types that are assignable to Destination:
	//
	//	*MPLSPingRequest_LdpFec
	//	*MPLSPingRequest_Fec129Pwe
	//	*MPLSPingRequest_RsvpteLspName
	//	*MPLSPingRequest_RsvpteLsp
	Destination isMPLSPingRequest_Destination `protobuf_oneof:"destination"`
	// How the target LER should respond to the LSP ping.
	ReplyMode MPLSPingRequest_ReplyMode `` /* 130-byte string literal not displayed */
	// The number of MPLS echo request packets to send.
	Count uint32 `protobuf:"varint,7,opt,name=count,proto3" json:"count,omitempty"` // default=3
	// The size (in bytes) of each MPLS echo request packet.
	Size uint32 `protobuf:"varint,8,opt,name=size,proto3" json:"size,omitempty"` // default=64
	// The source IPv4 address that should be used in the request packet.
	SourceAddress string `protobuf:"bytes,9,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"`
	// The MPLS TTL that should be set in the packets sent.
	MplsTtl uint32 `protobuf:"varint,10,opt,name=mpls_ttl,json=mplsTtl,proto3" json:"mpls_ttl,omitempty"`
	// The value of the traffic class (TC, formerly known as EXP) bits that
	// should be set in the MPLS ping packets.
	TrafficClass uint32 `protobuf:"varint,11,opt,name=traffic_class,json=trafficClass,proto3" json:"traffic_class,omitempty"`
	// contains filtered or unexported fields
}

MPLSPingRequest specifies the parameters that should be used as input from the client, to a system that is initiating an RFC4379 MPLS ping request.

func (*MPLSPingRequest) Descriptor deprecated

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

Deprecated: Use MPLSPingRequest.ProtoReflect.Descriptor instead.

func (*MPLSPingRequest) GetCount

func (x *MPLSPingRequest) GetCount() uint32

func (*MPLSPingRequest) GetDestination

func (m *MPLSPingRequest) GetDestination() isMPLSPingRequest_Destination

func (*MPLSPingRequest) GetFec129Pwe

func (x *MPLSPingRequest) GetFec129Pwe() *MPLSPingPWEDestination

func (*MPLSPingRequest) GetLdpFec

func (x *MPLSPingRequest) GetLdpFec() string

func (*MPLSPingRequest) GetMplsTtl

func (x *MPLSPingRequest) GetMplsTtl() uint32

func (*MPLSPingRequest) GetReplyMode

func (x *MPLSPingRequest) GetReplyMode() MPLSPingRequest_ReplyMode

func (*MPLSPingRequest) GetRsvpteLsp

func (x *MPLSPingRequest) GetRsvpteLsp() *MPLSPingRSVPTEDestination

func (*MPLSPingRequest) GetRsvpteLspName

func (x *MPLSPingRequest) GetRsvpteLspName() string

func (*MPLSPingRequest) GetSize

func (x *MPLSPingRequest) GetSize() uint32

func (*MPLSPingRequest) GetSourceAddress

func (x *MPLSPingRequest) GetSourceAddress() string

func (*MPLSPingRequest) GetTrafficClass

func (x *MPLSPingRequest) GetTrafficClass() uint32

func (*MPLSPingRequest) ProtoMessage

func (*MPLSPingRequest) ProtoMessage()

func (*MPLSPingRequest) ProtoReflect

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

func (*MPLSPingRequest) Reset

func (x *MPLSPingRequest) Reset()

func (*MPLSPingRequest) String

func (x *MPLSPingRequest) String() string

type MPLSPingRequest_Fec129Pwe

type MPLSPingRequest_Fec129Pwe struct {
	// The FEC129 PWE to which the LSP ping should be sent.
	Fec129Pwe *MPLSPingPWEDestination `protobuf:"bytes,2,opt,name=fec129_pwe,json=fec129Pwe,proto3,oneof"`
}

type MPLSPingRequest_LdpFec

type MPLSPingRequest_LdpFec struct {
	// The LDP forwarding equivalence class that the ping should be sent to
	// expressed as an IPv4 or IPv6 prefix.
	LdpFec string `protobuf:"bytes,1,opt,name=ldp_fec,json=ldpFec,proto3,oneof"`
}

type MPLSPingRequest_ReplyMode

type MPLSPingRequest_ReplyMode int32
const (
	// Reply via an IPv4 packet to this system.
	MPLSPingRequest_IPV4 MPLSPingRequest_ReplyMode = 0
	// Reply with a labeled packet with the router alert bit set.
	MPLSPingRequest_ROUTER_ALERT MPLSPingRequest_ReplyMode = 1
)

func (MPLSPingRequest_ReplyMode) Descriptor

func (MPLSPingRequest_ReplyMode) Enum

func (MPLSPingRequest_ReplyMode) EnumDescriptor deprecated

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

Deprecated: Use MPLSPingRequest_ReplyMode.Descriptor instead.

func (MPLSPingRequest_ReplyMode) Number

func (MPLSPingRequest_ReplyMode) String

func (x MPLSPingRequest_ReplyMode) String() string

func (MPLSPingRequest_ReplyMode) Type

type MPLSPingRequest_RsvpteLsp

type MPLSPingRequest_RsvpteLsp struct {
	// An exact specification of an RSVP-TE LSP to which the system should send
	// an MPLS ping message.
	RsvpteLsp *MPLSPingRSVPTEDestination `protobuf:"bytes,5,opt,name=rsvpte_lsp,json=rsvpteLsp,proto3,oneof"` // TODO(robjs): L3VPN, BGP-LU destination types. See RFC4379.
}

type MPLSPingRequest_RsvpteLspName

type MPLSPingRequest_RsvpteLspName struct {
	// The name of an RSVP-TE LSP via which the ping should be sent. The system
	// should locally resolve the name to a particular RSVP-TE session.
	RsvpteLspName string `protobuf:"bytes,4,opt,name=rsvpte_lsp_name,json=rsvpteLspName,proto3,oneof"`
}

type MPLSPingResponse

type MPLSPingResponse struct {
	Seq uint32 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` // The sequence number of the MPLS Echo Reply.
	// The response that was received from the egress LER.
	Response MPLSPingResponse_EchoResponseCode `protobuf:"varint,2,opt,name=response,proto3,enum=gnoi.mpls.MPLSPingResponse_EchoResponseCode" json:"response,omitempty"`
	// The time (in nanoseconds) between transmission of the Echo Response,
	// and the echo reply.
	ResponseTime uint64 `protobuf:"varint,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"`
	// contains filtered or unexported fields
}

MPLSPingResponse (MPLSPong?) is sent from the target to the client based on each MPLS Echo Response packet it receives associated with an input MPLSPing RPC.

func (*MPLSPingResponse) Descriptor deprecated

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

Deprecated: Use MPLSPingResponse.ProtoReflect.Descriptor instead.

func (*MPLSPingResponse) GetResponse

func (*MPLSPingResponse) GetResponseTime

func (x *MPLSPingResponse) GetResponseTime() uint64

func (*MPLSPingResponse) GetSeq

func (x *MPLSPingResponse) GetSeq() uint32

func (*MPLSPingResponse) ProtoMessage

func (*MPLSPingResponse) ProtoMessage()

func (*MPLSPingResponse) ProtoReflect

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

func (*MPLSPingResponse) Reset

func (x *MPLSPingResponse) Reset()

func (*MPLSPingResponse) String

func (x *MPLSPingResponse) String() string

type MPLSPingResponse_EchoResponseCode

type MPLSPingResponse_EchoResponseCode int32
const (
	// A successful echo response was received.
	MPLSPingResponse_SUCCESS MPLSPingResponse_EchoResponseCode = 0
	// The MPLS ping packet was not sent, for an unknown reason.
	MPLSPingResponse_NOT_SENT MPLSPingResponse_EchoResponseCode = 1
	// The local system timed out waiting for an LSP ping response.
	MPLSPingResponse_TIMEOUT MPLSPingResponse_EchoResponseCode = 2 // TODO(robjs): Add additional error codes.
)

func (MPLSPingResponse_EchoResponseCode) Descriptor

func (MPLSPingResponse_EchoResponseCode) Enum

func (MPLSPingResponse_EchoResponseCode) EnumDescriptor deprecated

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

Deprecated: Use MPLSPingResponse_EchoResponseCode.Descriptor instead.

func (MPLSPingResponse_EchoResponseCode) Number

func (MPLSPingResponse_EchoResponseCode) String

func (MPLSPingResponse_EchoResponseCode) Type

type MPLSServer

type MPLSServer interface {
	// ClearLSP clears a single tunnel (requests for it's route to be
	// recalculated).
	ClearLSP(context.Context, *ClearLSPRequest) (*ClearLSPResponse, error)
	// ClearLSPCounters will clear the MPLS counters for the provided LSP.
	ClearLSPCounters(context.Context, *ClearLSPCountersRequest) (*ClearLSPCountersResponse, error)
	// An MPLS ping, specified as per RFC4379.
	MPLSPing(*MPLSPingRequest, MPLS_MPLSPingServer) error
	// contains filtered or unexported methods
}

MPLSServer is the server API for MPLS service. All implementations must embed UnimplementedMPLSServer for forward compatibility

type MPLS_MPLSPingClient

type MPLS_MPLSPingClient interface {
	Recv() (*MPLSPingResponse, error)
	grpc.ClientStream
}

type MPLS_MPLSPingServer

type MPLS_MPLSPingServer interface {
	Send(*MPLSPingResponse) error
	grpc.ServerStream
}

type UnimplementedMPLSServer

type UnimplementedMPLSServer struct {
}

UnimplementedMPLSServer must be embedded to have forward compatible implementations.

func (UnimplementedMPLSServer) ClearLSP

func (UnimplementedMPLSServer) MPLSPing

type UnsafeMPLSServer

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

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

Jump to

Keyboard shortcuts

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