pb

package
v0.0.0-...-36dbe75 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMsgLen = 1024 * 1024
)

Variables

View Source
var (
	TcpConnState_name = map[int32]string{
		0: "INIT",
		1: "SYN_RECV",
		2: "EST",
		3: "FIN_WAIT_1",
		4: "FIN_WAIT_2",
		5: "CLOSE_WAIT",
		6: "CLOSING",
		7: "LAST_ACK",
		8: "TIME_WAIT",
		9: "CLOSED",
	}
	TcpConnState_value = map[string]int32{
		"INIT":       0,
		"SYN_RECV":   1,
		"EST":        2,
		"FIN_WAIT_1": 3,
		"FIN_WAIT_2": 4,
		"CLOSE_WAIT": 5,
		"CLOSING":    6,
		"LAST_ACK":   7,
		"TIME_WAIT":  8,
		"CLOSED":     9,
	}
)

Enum value maps for TcpConnState.

View Source
var File_messages_proto protoreflect.FileDescriptor

Functions

func ReadMessage

func ReadMessage(r io.Reader, msg proto.Message) (int, error)

func WriteMessage

func WriteMessage(w io.Writer, msg proto.Message) (int, error)

Types

type BufferStateUpdate

type BufferStateUpdate struct {

	// Sequence number of the first byte of un-ack'd/unread data in the buffer.
	StartSeq uint64 `protobuf:"varint,1,opt,name=start_seq,json=startSeq,proto3" json:"start_seq,omitempty"`
	BufLen   uint32 `protobuf:"varint,2,opt,name=buf_len,json=bufLen,proto3" json:"buf_len,omitempty"`
	// Sequence number to append data at.
	AppendSeq  uint64 `protobuf:"varint,3,opt,name=append_seq,json=appendSeq,proto3" json:"append_seq,omitempty"`
	AppendData []byte `protobuf:"bytes,4,opt,name=append_data,json=appendData,proto3" json:"append_data,omitempty"`
	// contains filtered or unexported fields
}

func (*BufferStateUpdate) Descriptor deprecated

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

Deprecated: Use BufferStateUpdate.ProtoReflect.Descriptor instead.

func (*BufferStateUpdate) GetAppendData

func (x *BufferStateUpdate) GetAppendData() []byte

func (*BufferStateUpdate) GetAppendSeq

func (x *BufferStateUpdate) GetAppendSeq() uint64

func (*BufferStateUpdate) GetBufLen

func (x *BufferStateUpdate) GetBufLen() uint32

func (*BufferStateUpdate) GetStartSeq

func (x *BufferStateUpdate) GetStartSeq() uint64

func (*BufferStateUpdate) ProtoMessage

func (*BufferStateUpdate) ProtoMessage()

func (*BufferStateUpdate) ProtoReflect

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

func (*BufferStateUpdate) Reset

func (x *BufferStateUpdate) Reset()

func (*BufferStateUpdate) String

func (x *BufferStateUpdate) String() string

type StreamKey

type StreamKey struct {
	RemoteAddr []byte `protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
	RemotePort uint32 `protobuf:"varint,2,opt,name=remote_port,json=remotePort,proto3" json:"remote_port,omitempty"`
	LocalPort  uint32 `protobuf:"varint,3,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamKey) Descriptor deprecated

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

Deprecated: Use StreamKey.ProtoReflect.Descriptor instead.

func (*StreamKey) GetLocalPort

func (x *StreamKey) GetLocalPort() uint32

func (*StreamKey) GetRemoteAddr

func (x *StreamKey) GetRemoteAddr() []byte

func (*StreamKey) GetRemotePort

func (x *StreamKey) GetRemotePort() uint32

func (*StreamKey) ProtoMessage

func (*StreamKey) ProtoMessage()

func (*StreamKey) ProtoReflect

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

func (*StreamKey) Reset

func (x *StreamKey) Reset()

func (*StreamKey) String

func (x *StreamKey) String() string

type SyncReply

type SyncReply struct {

	// Message ID. Matches the request ID.
	MsgId uint64 `protobuf:"varint,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
	// Synced connection state. If this is INIT, it should be ignored.
	State TcpConnState `protobuf:"varint,3,opt,name=state,proto3,enum=pb.TcpConnState" json:"state,omitempty"`
	// Buffer state update of the send buffer
	SendBufUpdate *BufferStateUpdate `protobuf:"bytes,8,opt,name=send_buf_update,json=sendBufUpdate,proto3" json:"send_buf_update,omitempty"`
	SendClosed    bool               `protobuf:"varint,9,opt,name=send_closed,json=sendClosed,proto3" json:"send_closed,omitempty"`
	// Buffer state update of the recv buffer
	RecvBufUpdate *BufferStateUpdate `protobuf:"bytes,12,opt,name=recv_buf_update,json=recvBufUpdate,proto3" json:"recv_buf_update,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncReply) Descriptor deprecated

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

Deprecated: Use SyncReply.ProtoReflect.Descriptor instead.

func (*SyncReply) GetMsgId

func (x *SyncReply) GetMsgId() uint64

func (*SyncReply) GetRecvBufUpdate

func (x *SyncReply) GetRecvBufUpdate() *BufferStateUpdate

func (*SyncReply) GetSendBufUpdate

func (x *SyncReply) GetSendBufUpdate() *BufferStateUpdate

func (*SyncReply) GetSendClosed

func (x *SyncReply) GetSendClosed() bool

func (*SyncReply) GetState

func (x *SyncReply) GetState() TcpConnState

func (*SyncReply) ProtoMessage

func (*SyncReply) ProtoMessage()

func (*SyncReply) ProtoReflect

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

func (*SyncReply) Reset

func (x *SyncReply) Reset()

func (*SyncReply) String

func (x *SyncReply) String() string

type SyncRequest

type SyncRequest struct {

	// Message ID. Expect a reply to have the same ID.
	MsgId uint64 `protobuf:"varint,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"`
	// 3-tuple key which identifies this stream.
	Key *StreamKey `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Connection state to update. If this is INIT, it should be ignored.
	State TcpConnState `protobuf:"varint,3,opt,name=state,proto3,enum=pb.TcpConnState" json:"state,omitempty"`
	// Buffer state update of the send buffer
	SendBufUpdate *BufferStateUpdate `protobuf:"bytes,8,opt,name=send_buf_update,json=sendBufUpdate,proto3" json:"send_buf_update,omitempty"`
	SendClosed    bool               `protobuf:"varint,9,opt,name=send_closed,json=sendClosed,proto3" json:"send_closed,omitempty"`
	SendInitSeq   uint64             `protobuf:"varint,10,opt,name=send_init_seq,json=sendInitSeq,proto3" json:"send_init_seq,omitempty"`
	// Buffer state update of the recv buffer
	RecvBufUpdate *BufferStateUpdate `protobuf:"bytes,12,opt,name=recv_buf_update,json=recvBufUpdate,proto3" json:"recv_buf_update,omitempty"`
	RecvInitSeq   uint64             `protobuf:"varint,13,opt,name=recv_init_seq,json=recvInitSeq,proto3" json:"recv_init_seq,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncRequest) Descriptor deprecated

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetKey

func (x *SyncRequest) GetKey() *StreamKey

func (*SyncRequest) GetMsgId

func (x *SyncRequest) GetMsgId() uint64

func (*SyncRequest) GetRecvBufUpdate

func (x *SyncRequest) GetRecvBufUpdate() *BufferStateUpdate

func (*SyncRequest) GetRecvInitSeq

func (x *SyncRequest) GetRecvInitSeq() uint64

func (*SyncRequest) GetSendBufUpdate

func (x *SyncRequest) GetSendBufUpdate() *BufferStateUpdate

func (*SyncRequest) GetSendClosed

func (x *SyncRequest) GetSendClosed() bool

func (*SyncRequest) GetSendInitSeq

func (x *SyncRequest) GetSendInitSeq() uint64

func (*SyncRequest) GetState

func (x *SyncRequest) GetState() TcpConnState

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

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

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type TcpConnState

type TcpConnState int32
const (
	TcpConnState_INIT       TcpConnState = 0
	TcpConnState_SYN_RECV   TcpConnState = 1
	TcpConnState_EST        TcpConnState = 2
	TcpConnState_FIN_WAIT_1 TcpConnState = 3
	TcpConnState_FIN_WAIT_2 TcpConnState = 4
	TcpConnState_CLOSE_WAIT TcpConnState = 5
	TcpConnState_CLOSING    TcpConnState = 6
	TcpConnState_LAST_ACK   TcpConnState = 7
	TcpConnState_TIME_WAIT  TcpConnState = 8
	TcpConnState_CLOSED     TcpConnState = 9
)

func (TcpConnState) Descriptor

func (TcpConnState) Enum

func (x TcpConnState) Enum() *TcpConnState

func (TcpConnState) EnumDescriptor deprecated

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

Deprecated: Use TcpConnState.Descriptor instead.

func (TcpConnState) Number

func (TcpConnState) String

func (x TcpConnState) String() string

func (TcpConnState) Type

Jump to

Keyboard shortcuts

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