Package list golang-github-farsightsec-go-nmsg / 44bbb223-b847-4815-9d00-80e8e968e025/main nmsg_base / ncap.pb.go
44bbb223-b847-4815-9d00-80e8e968e025/main

Tree @44bbb223-b847-4815-9d00-80e8e968e025/main (Download .tar.gz)

ncap.pb.go @44bbb223-b847-4815-9d00-80e8e968e025/mainraw · history · blame

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.25.0-devel
// 	protoc        (unknown)
// source: ncap.proto

package nmsg_base

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type Ncap_NcapType int32

const (
	Ncap_IPV4   Ncap_NcapType = 0
	Ncap_IPV6   Ncap_NcapType = 1
	Ncap_Legacy Ncap_NcapType = 2
)

// Enum value maps for Ncap_NcapType.
var (
	Ncap_NcapType_name = map[int32]string{
		0: "IPV4",
		1: "IPV6",
		2: "Legacy",
	}
	Ncap_NcapType_value = map[string]int32{
		"IPV4":   0,
		"IPV6":   1,
		"Legacy": 2,
	}
)

func (x Ncap_NcapType) Enum() *Ncap_NcapType {
	p := new(Ncap_NcapType)
	*p = x
	return p
}

func (x Ncap_NcapType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Ncap_NcapType) Descriptor() protoreflect.EnumDescriptor {
	return file_ncap_proto_enumTypes[0].Descriptor()
}

func (Ncap_NcapType) Type() protoreflect.EnumType {
	return &file_ncap_proto_enumTypes[0]
}

func (x Ncap_NcapType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *Ncap_NcapType) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = Ncap_NcapType(num)
	return nil
}

// Deprecated: Use Ncap_NcapType.Descriptor instead.
func (Ncap_NcapType) EnumDescriptor() ([]byte, []int) {
	return file_ncap_proto_rawDescGZIP(), []int{0, 0}
}

type Ncap_NcapLegacyType int32

const (
	Ncap_UDP  Ncap_NcapLegacyType = 0
	Ncap_TCP  Ncap_NcapLegacyType = 1
	Ncap_ICMP Ncap_NcapLegacyType = 2
)

// Enum value maps for Ncap_NcapLegacyType.
var (
	Ncap_NcapLegacyType_name = map[int32]string{
		0: "UDP",
		1: "TCP",
		2: "ICMP",
	}
	Ncap_NcapLegacyType_value = map[string]int32{
		"UDP":  0,
		"TCP":  1,
		"ICMP": 2,
	}
)

func (x Ncap_NcapLegacyType) Enum() *Ncap_NcapLegacyType {
	p := new(Ncap_NcapLegacyType)
	*p = x
	return p
}

func (x Ncap_NcapLegacyType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Ncap_NcapLegacyType) Descriptor() protoreflect.EnumDescriptor {
	return file_ncap_proto_enumTypes[1].Descriptor()
}

func (Ncap_NcapLegacyType) Type() protoreflect.EnumType {
	return &file_ncap_proto_enumTypes[1]
}

func (x Ncap_NcapLegacyType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *Ncap_NcapLegacyType) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = Ncap_NcapLegacyType(num)
	return nil
}

// Deprecated: Use Ncap_NcapLegacyType.Descriptor instead.
func (Ncap_NcapLegacyType) EnumDescriptor() ([]byte, []int) {
	return file_ncap_proto_rawDescGZIP(), []int{0, 1}
}

type Ncap struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Type    *Ncap_NcapType `protobuf:"varint,1,req,name=type,enum=nmsg.base.Ncap_NcapType" json:"type,omitempty"`
	Payload []byte         `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
	// legacy NCAP fields
	Ltype *Ncap_NcapLegacyType `protobuf:"varint,3,opt,name=ltype,enum=nmsg.base.Ncap_NcapLegacyType" json:"ltype,omitempty"`
	Srcip []byte               `protobuf:"bytes,4,opt,name=srcip" json:"srcip,omitempty"`
	Dstip []byte               `protobuf:"bytes,5,opt,name=dstip" json:"dstip,omitempty"`
	Lint0 *uint32              `protobuf:"varint,6,opt,name=lint0" json:"lint0,omitempty"`
	Lint1 *uint32              `protobuf:"varint,7,opt,name=lint1" json:"lint1,omitempty"`
}

func (x *Ncap) Reset() {
	*x = Ncap{}
	if protoimpl.UnsafeEnabled {
		mi := &file_ncap_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *Ncap) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Ncap) ProtoMessage() {}

func (x *Ncap) ProtoReflect() protoreflect.Message {
	mi := &file_ncap_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Ncap.ProtoReflect.Descriptor instead.
func (*Ncap) Descriptor() ([]byte, []int) {
	return file_ncap_proto_rawDescGZIP(), []int{0}
}

func (x *Ncap) GetType() Ncap_NcapType {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return Ncap_IPV4
}

func (x *Ncap) GetPayload() []byte {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *Ncap) GetLtype() Ncap_NcapLegacyType {
	if x != nil && x.Ltype != nil {
		return *x.Ltype
	}
	return Ncap_UDP
}

func (x *Ncap) GetSrcip() []byte {
	if x != nil {
		return x.Srcip
	}
	return nil
}

func (x *Ncap) GetDstip() []byte {
	if x != nil {
		return x.Dstip
	}
	return nil
}

func (x *Ncap) GetLint0() uint32 {
	if x != nil && x.Lint0 != nil {
		return *x.Lint0
	}
	return 0
}

func (x *Ncap) GetLint1() uint32 {
	if x != nil && x.Lint1 != nil {
		return *x.Lint1
	}
	return 0
}

var File_ncap_proto protoreflect.FileDescriptor

var file_ncap_proto_rawDesc = []byte{
	0x0a, 0x0a, 0x6e, 0x63, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6d,
	0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x4e, 0x63, 0x61, 0x70,
	0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x18,
	0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x4e, 0x63, 0x61, 0x70, 0x2e,
	0x4e, 0x63, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18,
	0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52,
	0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x6c, 0x74, 0x79, 0x70,
	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62,
	0x61, 0x73, 0x65, 0x2e, 0x4e, 0x63, 0x61, 0x70, 0x2e, 0x4e, 0x63, 0x61, 0x70, 0x4c, 0x65, 0x67,
	0x61, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x6c, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14,
	0x0a, 0x05, 0x73, 0x72, 0x63, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73,
	0x72, 0x63, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x73, 0x74, 0x69, 0x70, 0x18, 0x05, 0x20,
	0x01, 0x28, 0x0c, 0x52, 0x05, 0x64, 0x73, 0x74, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69,
	0x6e, 0x74, 0x30, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x74, 0x30,
	0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x74, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52,
	0x05, 0x6c, 0x69, 0x6e, 0x74, 0x31, 0x22, 0x2a, 0x0a, 0x08, 0x4e, 0x63, 0x61, 0x70, 0x54, 0x79,
	0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x34, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04,
	0x49, 0x50, 0x56, 0x36, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,
	0x10, 0x02, 0x22, 0x2c, 0x0a, 0x0e, 0x4e, 0x63, 0x61, 0x70, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,
	0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a,
	0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x43, 0x4d, 0x50, 0x10, 0x02,
	0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66,
	0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d,
	0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
}

var (
	file_ncap_proto_rawDescOnce sync.Once
	file_ncap_proto_rawDescData = file_ncap_proto_rawDesc
)

func file_ncap_proto_rawDescGZIP() []byte {
	file_ncap_proto_rawDescOnce.Do(func() {
		file_ncap_proto_rawDescData = protoimpl.X.CompressGZIP(file_ncap_proto_rawDescData)
	})
	return file_ncap_proto_rawDescData
}

var file_ncap_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_ncap_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_ncap_proto_goTypes = []interface{}{
	(Ncap_NcapType)(0),       // 0: nmsg.base.Ncap.NcapType
	(Ncap_NcapLegacyType)(0), // 1: nmsg.base.Ncap.NcapLegacyType
	(*Ncap)(nil),             // 2: nmsg.base.Ncap
}
var file_ncap_proto_depIdxs = []int32{
	0, // 0: nmsg.base.Ncap.type:type_name -> nmsg.base.Ncap.NcapType
	1, // 1: nmsg.base.Ncap.ltype:type_name -> nmsg.base.Ncap.NcapLegacyType
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_ncap_proto_init() }
func file_ncap_proto_init() {
	if File_ncap_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_ncap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*Ncap); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_ncap_proto_rawDesc,
			NumEnums:      2,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_ncap_proto_goTypes,
		DependencyIndexes: file_ncap_proto_depIdxs,
		EnumInfos:         file_ncap_proto_enumTypes,
		MessageInfos:      file_ncap_proto_msgTypes,
	}.Build()
	File_ncap_proto = out.File
	file_ncap_proto_rawDesc = nil
	file_ncap_proto_goTypes = nil
	file_ncap_proto_depIdxs = nil
}