Package list golang-github-farsightsec-go-nmsg / b42ffe10-85cc-4b60-bb2b-1564e215832c/main nmsg_base / packet.pb.go
b42ffe10-85cc-4b60-bb2b-1564e215832c/main

Tree @b42ffe10-85cc-4b60-bb2b-1564e215832c/main (Download .tar.gz)

packet.pb.go @b42ffe10-85cc-4b60-bb2b-1564e215832c/mainraw · history · blame

// Code generated by protoc-gen-go.
// source: packet.proto
// DO NOT EDIT!

package nmsg_base

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

type PacketType int32

const (
	// An IPv4 or IPv6 packet. The packet begins immediately with the IP
	// header and contains the complete packet payload. Distinguishing between
	// IPv4 and IPv6 packets is done by examining the IP version field in the
	// IP header.
	PacketType_IP PacketType = 1
)

var PacketType_name = map[int32]string{
	1: "IP",
}
var PacketType_value = map[string]int32{
	"IP": 1,
}

func (x PacketType) Enum() *PacketType {
	p := new(PacketType)
	*p = x
	return p
}
func (x PacketType) String() string {
	return proto.EnumName(PacketType_name, int32(x))
}
func (x *PacketType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(PacketType_value, data, "PacketType")
	if err != nil {
		return err
	}
	*x = PacketType(value)
	return nil
}
func (PacketType) EnumDescriptor() ([]byte, []int) { return fileDescriptor9, []int{0} }

type Packet struct {
	PayloadType      *PacketType `protobuf:"varint,1,req,name=payload_type,enum=nmsg.base.PacketType" json:"payload_type,omitempty"`
	Payload          []byte      `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

func (m *Packet) Reset()                    { *m = Packet{} }
func (m *Packet) String() string            { return proto.CompactTextString(m) }
func (*Packet) ProtoMessage()               {}
func (*Packet) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{0} }

func (m *Packet) GetPayloadType() PacketType {
	if m != nil && m.PayloadType != nil {
		return *m.PayloadType
	}
	return PacketType_IP
}

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

func init() {
	proto.RegisterType((*Packet)(nil), "nmsg.base.Packet")
	proto.RegisterEnum("nmsg.base.PacketType", PacketType_name, PacketType_value)
}

func init() { proto.RegisterFile("packet.proto", fileDescriptor9) }

var fileDescriptor9 = []byte{
	// 111 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x48, 0x4c, 0xce,
	0x4e, 0x2d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b,
	0x4a, 0x2c, 0x4e, 0x55, 0x72, 0xe3, 0x62, 0x0b, 0x00, 0x4b, 0x09, 0x69, 0x83, 0x14, 0x55, 0xe6,
	0xe4, 0x27, 0xa6, 0xc4, 0x97, 0x54, 0x16, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0xf0, 0x19, 0x89,
	0xea, 0xc1, 0xd5, 0xea, 0x41, 0x14, 0x86, 0x00, 0x25, 0x85, 0xf8, 0xb9, 0xd8, 0xa1, 0x8a, 0x25,
	0x98, 0x80, 0xea, 0x78, 0xb4, 0x44, 0xb8, 0xb8, 0x90, 0xa4, 0xd9, 0xb8, 0x98, 0x3c, 0x03, 0x04,
	0x18, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x3e, 0xce, 0x93, 0x77, 0x00, 0x00, 0x00,
}