Codebase list golang-github-farsightsec-go-nmsg / upstream/0.2.0
New upstream version 0.2.0 Sascha Steinbiss 2 years ago
50 changed file(s) with 3683 addition(s) and 1612 deletion(s). Raw diff Collapse all Expand all
00 # Pure Golang NMSG Library
11
22 `go-nmsg` is a pure go implementation of the NMSG container and payload
3 format used by the C (nmsg)[https://github.com/farsightsec/nmsg] toolkit
3 format used by the C [nmsg](https://github.com/farsightsec/nmsg) toolkit
44 and library.
55
66 ## Synopsis
1616 output.SetMaxSize(nmsg.MaxContainerSize, 0)
1717
1818 for {
19 payload, err := inp.Recv()
19 payload, err := input.Recv()
2020 if err != nil {
2121 if nmsg.IsDataError(err) {
2222 continue
4040
4141 `go-nmsg` requires the following open source libraries:
4242
43 "github.com/golang/protobuf/proto"
43 "google.golang.org/protobuf/proto"
4444 "github.com/dnstap/golang-dnstap"
4545
4646 ## Limitations
1515 "io"
1616 "math/rand"
1717
18 "github.com/golang/protobuf/proto"
18 "google.golang.org/protobuf/proto"
1919 )
2020
2121 const (
2828 var (
2929 nmsgMagic = [4]byte{'N', 'M', 'S', 'G'}
3030 errBadMagic = errors.New("Bad NMSG Magic Number")
31 u32max uint32 = (1 << 31)
3231 containerOverhead = 10
33 fragmentOverhead = 10 + 4 + proto.Size(
34 &NmsgFragment{
35 Id: &u32max,
36 Current: &u32max,
37 Last: &u32max,
38 Crc: &u32max,
39 })
32 fragmentOverhead = 10 + 4 + 24
4033 )
4134
4235 type containerHeader struct {
0 go-nmsg (0.2.0-1) debian-fsi; urgency=medium
1
2 * Update to use new protobuf library from google.golang.org/protobuf/proto
3
4 -- Farsight Security, Inc. <software@farsightsecurity.com> Mon, 08 Feb 2021 11:15:57 -0500
5
6 go-nmsg (0.1.1-1) debian-farsightsec; urgency=medium
7
8 * Initial public release.
9
10 -- Farsight Security, Inc. <software@farsightsecurity.com> Fri, 23 Aug 2019 12:00:00 -0500
11
0 Source: go-nmsg
1 Section: net
2 Priority: optional
3 Maintainer: Farsight Security, Inc. <software@farsightsecurity.com>
4 Build-Depends: debhelper (>= 9), dh-golang, golang-1.11-go,
5 golang-google-protobuf-dev,
6 golang-github-dnstap-go-dnstap-dev,
7 golang-gopkg-yaml.v2-dev,
8 libnmsg-dev,
9 pkg-config
10 Standards-Version: 3.9.8
11 Vcs-Git: https://github.com/farsightsec/go-nmsg.git
12 Vcs-Browser: https://github.com/farsightsec/go-nmsg
13 XS-Go-Import-Path: github.com/farsightsec/go-nmsg
14
15 Package: golang-github-farsightsec-go-nmsg-dev
16 Architecture: any
17 Depends: ${shlibs:Depends}, ${misc:Depends},
18 golang-google-protobuf-dev
19 Description: Pure Golang NMSG Library
20 go-nmsg is a pure go implementation of the NMSG container and payload
21 format used by the C nmsg toolkit and library. It does not implement
22 the full functionality of the C libnmsg message modules.
23 .
24 The NMSG network message encapsulation library format is an efficient
25 encoding of typed, structured data into payloads which are packed into
26 containers which can be transmitted over the network or stored to disk.
27
28 Package: golang-github-farsightsec-go-nmsg-base-dev
29 Architecture: any
30 Depends: golang-github-farsightsec-go-nmsg-dev (= ${binary:Version}),
31 ${shlibs:Depends}, ${misc:Depends}
32 Description: NMSG vendor base encoding modules for Golang
33 This package provides generated Go code from Protocol Buffers Version 2
34 specifications for NMSG vendor base encoding modules: Dns, DnsQR, Email,
35 Encode, Http, IPConn, Linkpair, LogLine, Ncap, Packet, Pkt, and Xml.
36
37 Package: golang-github-farsightsec-go-nmsg-cgo-nmsg-dev
38 Architecture: any
39 Depends: ${shlibs:Depends}, ${misc:Depends},
40 pkg-config,
41 libnmsg-dev,
42 libxs-dev
43 Description: Golang bindings to the C libnmsg library
44 The NMSG network message encapsulation library format is an efficient
45 encoding of typed, structured data into payloads which are packed into
46 containers which can be transmitted over the network or stored to disk.
0 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
1 Upstream-Name: go-nmsg
2
3 Files: *
4 Copyright: 2015-2018 Farsight Security, Inc. <software@farsightsecurity.com>
5 License: MPL-2.0
6
7 License: MPL-2.0
8 This Source Code Form is subject to the terms of the Mozilla Public
9 License, v. 2.0. If a copy of the MPL was not distributed with this
10 file, You can obtain one at http://mozilla.org/MPL/2.0/.
0 README.md
0 [DEFAULT]
1 upstream-branch = master
2 upstream-tag = tags/v%(version)s
3 pristine-tar = False
0 usr/share/gocode/src/github.com/farsightsec/go-nmsg/nmsg_base/*.go
0 usr/share/gocode/src/github.com/farsightsec/go-nmsg/cgo-nmsg/*.go
0 usr/share/gocode/src/github.com/farsightsec/go-nmsg/container.go
1 usr/share/gocode/src/github.com/farsightsec/go-nmsg/endian.go
2 usr/share/gocode/src/github.com/farsightsec/go-nmsg/input_frag.go
3 usr/share/gocode/src/github.com/farsightsec/go-nmsg/input.go
4 usr/share/gocode/src/github.com/farsightsec/go-nmsg/input_seq.go
5 usr/share/gocode/src/github.com/farsightsec/go-nmsg/nmsg.go
6 usr/share/gocode/src/github.com/farsightsec/go-nmsg/nmsg.pb.go
7 usr/share/gocode/src/github.com/farsightsec/go-nmsg/output.go
8 usr/share/gocode/src/github.com/farsightsec/go-nmsg/payload.go
9 usr/share/gocode/src/github.com/farsightsec/go-nmsg/register.go
10 usr/share/gocode/src/github.com/farsightsec/go-nmsg/sockspec.go
11 usr/share/gocode/src/github.com/farsightsec/go-nmsg/zbuf.go
0 #!/usr/bin/make -f
1 # See debhelper(7) (uncomment to enable)
2 # output every command that modifies files on the build system.
3 #export DH_VERBOSE = 1
4
5 # set executable path to see the golang-1.11-go install
6 export PATH := /usr/lib/go-1.11/bin:/usr/bin:/bin
7
8 %:
9 dh $@ --buildsystem=golang --with=golang
0 3.0 (quilt)
0 #!/bin/sh
1
2 go_package() {
3 local file pkg line script
4 file=$1; shift
5 pkg=$1; shift
6
7 line="option go_package = \"$pkg\";"
8 grep "^$line\$" $file > /dev/null && return
9
10 script="/^package nmsg/|a|$line|.|w|q|"
11 if grep "^option go_package" $file > /dev/null; then
12 script="/^option go_package/d|1|${script}"
13 fi
14 echo "$script" | tr '|' '\n' | ed $file || exit
15 }
16
17 dir=$(dirname $0)
18 [ -n "$dir" ] && cd $dir
19
20 go_package nmsg.proto "github.com/farsightsec/go-nmsg;nmsg"
21 protoc --go_out=../../.. nmsg.proto
22
23 cd nmsg_base
24 for f in *.proto; do
25 go_package $f "github.com/farsightsec/go-nmsg/nmsg_base"
26 done
27
28 protoc --go_out=../../../.. *.proto
0 module github.com/farsightsec/go-nmsg
1
2 require (
3 github.com/dnstap/golang-dnstap v0.4.0
4 google.golang.org/protobuf v1.25.0
5 gopkg.in/yaml.v2 v2.4.0
6 )
0 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
1 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
3 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
4 github.com/dnstap/golang-dnstap v0.4.0 h1:KRHBoURygdGtBjDI2w4HifJfMAhhOqDuktAokaSa234=
5 github.com/dnstap/golang-dnstap v0.4.0/go.mod h1:FqsSdH58NAmkAvKcpyxht7i4FoBjKu8E4JUPt8ipSUs=
6 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
7 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
8 github.com/farsightsec/golang-framestream v0.3.0 h1:/spFQHucTle/ZIPkYqrfshQqPe2VQEzesH243TjIwqA=
9 github.com/farsightsec/golang-framestream v0.3.0/go.mod h1:eNde4IQyEiA5br02AouhEHCu3p3UzrCdFR4LuQHklMI=
10 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
11 github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
12 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
13 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
14 github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
15 github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
16 github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
17 github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
18 github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
19 github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
20 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
21 github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
22 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
23 github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
24 github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
25 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
26 github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo=
27 github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
28 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
29 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
30 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
31 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
32 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
33 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
34 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
35 golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
36 golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
37 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
38 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
39 golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
40 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
41 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
42 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
43 golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g=
44 golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
45 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
46 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
47 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
48 golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
49 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
50 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
51 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
52 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
53 golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe h1:6fAMxZRR6sl1Uq8U61gxU+kPTs2tR8uOySCbBP7BN/M=
54 golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
55 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
56 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
57 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
58 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
59 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
60 golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
61 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
62 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
63 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
64 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
65 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
66 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
67 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
68 google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
69 google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
70 google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
71 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
72 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
73 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
74 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
75 google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
76 google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
77 google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
78 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
79 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
80 google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
81 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
82 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
83 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
84 gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
85 gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
86 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
87 honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
55 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
66 */
77
8 //go:generate protoc --go_out=. nmsg.proto
8 //go:generate ./genproto.sh
99
1010 package nmsg
1111
1212 import (
1313 "hash/crc32"
1414
15 "github.com/golang/protobuf/proto"
15 "google.golang.org/protobuf/proto"
1616 )
1717
1818 // Container size limits to avoid silly fragmentation and memory
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: nmsg.proto
2 // DO NOT EDIT!
3
4 /*
5 Package nmsg is a generated protocol buffer package.
6
7 It is generated from these files:
8 nmsg.proto
9
10 It has these top-level messages:
11 Nmsg
12 NmsgFragment
13 NmsgPayload
14 */
5
156 package nmsg
167
17 import proto "github.com/golang/protobuf/proto"
18 import fmt "fmt"
19 import math "math"
20
21 // Reference imports to suppress errors if they are not otherwise used.
22 var _ = proto.Marshal
23 var _ = fmt.Errorf
24 var _ = math.Inf
25
26 // This is a compile-time assertion to ensure that this generated file
27 // is compatible with the proto package it is being compiled against.
28 // A compilation error at this line likely means your copy of the
29 // proto package needs to be updated.
30 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
14
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
3121
3222 type Nmsg struct {
33 Payloads []*NmsgPayload `protobuf:"bytes,1,rep,name=payloads" json:"payloads,omitempty"`
34 PayloadCrcs []uint32 `protobuf:"varint,2,rep,name=payload_crcs" json:"payload_crcs,omitempty"`
35 Sequence *uint32 `protobuf:"varint,3,opt,name=sequence" json:"sequence,omitempty"`
36 SequenceId *uint64 `protobuf:"varint,4,opt,name=sequence_id" json:"sequence_id,omitempty"`
37 XXX_unrecognized []byte `json:"-"`
38 }
39
40 func (m *Nmsg) Reset() { *m = Nmsg{} }
41 func (m *Nmsg) String() string { return proto.CompactTextString(m) }
42 func (*Nmsg) ProtoMessage() {}
43 func (*Nmsg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
44
45 func (m *Nmsg) GetPayloads() []*NmsgPayload {
46 if m != nil {
47 return m.Payloads
23 state protoimpl.MessageState
24 sizeCache protoimpl.SizeCache
25 unknownFields protoimpl.UnknownFields
26
27 Payloads []*NmsgPayload `protobuf:"bytes,1,rep,name=payloads" json:"payloads,omitempty"`
28 PayloadCrcs []uint32 `protobuf:"varint,2,rep,name=payload_crcs,json=payloadCrcs" json:"payload_crcs,omitempty"`
29 Sequence *uint32 `protobuf:"varint,3,opt,name=sequence" json:"sequence,omitempty"`
30 SequenceId *uint64 `protobuf:"varint,4,opt,name=sequence_id,json=sequenceId" json:"sequence_id,omitempty"`
31 }
32
33 func (x *Nmsg) Reset() {
34 *x = Nmsg{}
35 if protoimpl.UnsafeEnabled {
36 mi := &file_nmsg_proto_msgTypes[0]
37 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
38 ms.StoreMessageInfo(mi)
39 }
40 }
41
42 func (x *Nmsg) String() string {
43 return protoimpl.X.MessageStringOf(x)
44 }
45
46 func (*Nmsg) ProtoMessage() {}
47
48 func (x *Nmsg) ProtoReflect() protoreflect.Message {
49 mi := &file_nmsg_proto_msgTypes[0]
50 if protoimpl.UnsafeEnabled && x != nil {
51 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
52 if ms.LoadMessageInfo() == nil {
53 ms.StoreMessageInfo(mi)
54 }
55 return ms
56 }
57 return mi.MessageOf(x)
58 }
59
60 // Deprecated: Use Nmsg.ProtoReflect.Descriptor instead.
61 func (*Nmsg) Descriptor() ([]byte, []int) {
62 return file_nmsg_proto_rawDescGZIP(), []int{0}
63 }
64
65 func (x *Nmsg) GetPayloads() []*NmsgPayload {
66 if x != nil {
67 return x.Payloads
4868 }
4969 return nil
5070 }
5171
52 func (m *Nmsg) GetPayloadCrcs() []uint32 {
53 if m != nil {
54 return m.PayloadCrcs
72 func (x *Nmsg) GetPayloadCrcs() []uint32 {
73 if x != nil {
74 return x.PayloadCrcs
5575 }
5676 return nil
5777 }
5878
59 func (m *Nmsg) GetSequence() uint32 {
60 if m != nil && m.Sequence != nil {
61 return *m.Sequence
62 }
63 return 0
64 }
65
66 func (m *Nmsg) GetSequenceId() uint64 {
67 if m != nil && m.SequenceId != nil {
68 return *m.SequenceId
79 func (x *Nmsg) GetSequence() uint32 {
80 if x != nil && x.Sequence != nil {
81 return *x.Sequence
82 }
83 return 0
84 }
85
86 func (x *Nmsg) GetSequenceId() uint64 {
87 if x != nil && x.SequenceId != nil {
88 return *x.SequenceId
6989 }
7090 return 0
7191 }
7292
7393 type NmsgFragment struct {
74 Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
75 Current *uint32 `protobuf:"varint,2,req,name=current" json:"current,omitempty"`
76 Last *uint32 `protobuf:"varint,3,req,name=last" json:"last,omitempty"`
77 Fragment []byte `protobuf:"bytes,4,req,name=fragment" json:"fragment,omitempty"`
78 Crc *uint32 `protobuf:"varint,5,opt,name=crc" json:"crc,omitempty"`
79 XXX_unrecognized []byte `json:"-"`
80 }
81
82 func (m *NmsgFragment) Reset() { *m = NmsgFragment{} }
83 func (m *NmsgFragment) String() string { return proto.CompactTextString(m) }
84 func (*NmsgFragment) ProtoMessage() {}
85 func (*NmsgFragment) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
86
87 func (m *NmsgFragment) GetId() uint32 {
88 if m != nil && m.Id != nil {
89 return *m.Id
90 }
91 return 0
92 }
93
94 func (m *NmsgFragment) GetCurrent() uint32 {
95 if m != nil && m.Current != nil {
96 return *m.Current
97 }
98 return 0
99 }
100
101 func (m *NmsgFragment) GetLast() uint32 {
102 if m != nil && m.Last != nil {
103 return *m.Last
104 }
105 return 0
106 }
107
108 func (m *NmsgFragment) GetFragment() []byte {
109 if m != nil {
110 return m.Fragment
94 state protoimpl.MessageState
95 sizeCache protoimpl.SizeCache
96 unknownFields protoimpl.UnknownFields
97
98 Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
99 Current *uint32 `protobuf:"varint,2,req,name=current" json:"current,omitempty"`
100 Last *uint32 `protobuf:"varint,3,req,name=last" json:"last,omitempty"`
101 Fragment []byte `protobuf:"bytes,4,req,name=fragment" json:"fragment,omitempty"`
102 Crc *uint32 `protobuf:"varint,5,opt,name=crc" json:"crc,omitempty"`
103 }
104
105 func (x *NmsgFragment) Reset() {
106 *x = NmsgFragment{}
107 if protoimpl.UnsafeEnabled {
108 mi := &file_nmsg_proto_msgTypes[1]
109 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
110 ms.StoreMessageInfo(mi)
111 }
112 }
113
114 func (x *NmsgFragment) String() string {
115 return protoimpl.X.MessageStringOf(x)
116 }
117
118 func (*NmsgFragment) ProtoMessage() {}
119
120 func (x *NmsgFragment) ProtoReflect() protoreflect.Message {
121 mi := &file_nmsg_proto_msgTypes[1]
122 if protoimpl.UnsafeEnabled && x != nil {
123 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
124 if ms.LoadMessageInfo() == nil {
125 ms.StoreMessageInfo(mi)
126 }
127 return ms
128 }
129 return mi.MessageOf(x)
130 }
131
132 // Deprecated: Use NmsgFragment.ProtoReflect.Descriptor instead.
133 func (*NmsgFragment) Descriptor() ([]byte, []int) {
134 return file_nmsg_proto_rawDescGZIP(), []int{1}
135 }
136
137 func (x *NmsgFragment) GetId() uint32 {
138 if x != nil && x.Id != nil {
139 return *x.Id
140 }
141 return 0
142 }
143
144 func (x *NmsgFragment) GetCurrent() uint32 {
145 if x != nil && x.Current != nil {
146 return *x.Current
147 }
148 return 0
149 }
150
151 func (x *NmsgFragment) GetLast() uint32 {
152 if x != nil && x.Last != nil {
153 return *x.Last
154 }
155 return 0
156 }
157
158 func (x *NmsgFragment) GetFragment() []byte {
159 if x != nil {
160 return x.Fragment
111161 }
112162 return nil
113163 }
114164
115 func (m *NmsgFragment) GetCrc() uint32 {
116 if m != nil && m.Crc != nil {
117 return *m.Crc
165 func (x *NmsgFragment) GetCrc() uint32 {
166 if x != nil && x.Crc != nil {
167 return *x.Crc
118168 }
119169 return 0
120170 }
121171
122172 type NmsgPayload struct {
123 Vid *uint32 `protobuf:"varint,1,req,name=vid" json:"vid,omitempty"`
124 Msgtype *uint32 `protobuf:"varint,2,req,name=msgtype" json:"msgtype,omitempty"`
125 TimeSec *int64 `protobuf:"varint,3,req,name=time_sec" json:"time_sec,omitempty"`
126 TimeNsec *uint32 `protobuf:"fixed32,4,req,name=time_nsec" json:"time_nsec,omitempty"`
127 Payload []byte `protobuf:"bytes,5,opt,name=payload" json:"payload,omitempty"`
128 Source *uint32 `protobuf:"varint,7,opt,name=source" json:"source,omitempty"`
129 Operator *uint32 `protobuf:"varint,8,opt,name=operator" json:"operator,omitempty"`
130 Group *uint32 `protobuf:"varint,9,opt,name=group" json:"group,omitempty"`
131 XXX_unrecognized []byte `json:"-"`
132 }
133
134 func (m *NmsgPayload) Reset() { *m = NmsgPayload{} }
135 func (m *NmsgPayload) String() string { return proto.CompactTextString(m) }
136 func (*NmsgPayload) ProtoMessage() {}
137 func (*NmsgPayload) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
138
139 func (m *NmsgPayload) GetVid() uint32 {
140 if m != nil && m.Vid != nil {
141 return *m.Vid
142 }
143 return 0
144 }
145
146 func (m *NmsgPayload) GetMsgtype() uint32 {
147 if m != nil && m.Msgtype != nil {
148 return *m.Msgtype
149 }
150 return 0
151 }
152
153 func (m *NmsgPayload) GetTimeSec() int64 {
154 if m != nil && m.TimeSec != nil {
155 return *m.TimeSec
156 }
157 return 0
158 }
159
160 func (m *NmsgPayload) GetTimeNsec() uint32 {
161 if m != nil && m.TimeNsec != nil {
162 return *m.TimeNsec
163 }
164 return 0
165 }
166
167 func (m *NmsgPayload) GetPayload() []byte {
168 if m != nil {
169 return m.Payload
173 state protoimpl.MessageState
174 sizeCache protoimpl.SizeCache
175 unknownFields protoimpl.UnknownFields
176
177 Vid *uint32 `protobuf:"varint,1,req,name=vid" json:"vid,omitempty"`
178 Msgtype *uint32 `protobuf:"varint,2,req,name=msgtype" json:"msgtype,omitempty"`
179 TimeSec *int64 `protobuf:"varint,3,req,name=time_sec,json=timeSec" json:"time_sec,omitempty"`
180 TimeNsec *uint32 `protobuf:"fixed32,4,req,name=time_nsec,json=timeNsec" json:"time_nsec,omitempty"`
181 Payload []byte `protobuf:"bytes,5,opt,name=payload" json:"payload,omitempty"`
182 Source *uint32 `protobuf:"varint,7,opt,name=source" json:"source,omitempty"`
183 Operator *uint32 `protobuf:"varint,8,opt,name=operator" json:"operator,omitempty"`
184 Group *uint32 `protobuf:"varint,9,opt,name=group" json:"group,omitempty"`
185 }
186
187 func (x *NmsgPayload) Reset() {
188 *x = NmsgPayload{}
189 if protoimpl.UnsafeEnabled {
190 mi := &file_nmsg_proto_msgTypes[2]
191 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
192 ms.StoreMessageInfo(mi)
193 }
194 }
195
196 func (x *NmsgPayload) String() string {
197 return protoimpl.X.MessageStringOf(x)
198 }
199
200 func (*NmsgPayload) ProtoMessage() {}
201
202 func (x *NmsgPayload) ProtoReflect() protoreflect.Message {
203 mi := &file_nmsg_proto_msgTypes[2]
204 if protoimpl.UnsafeEnabled && x != nil {
205 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
206 if ms.LoadMessageInfo() == nil {
207 ms.StoreMessageInfo(mi)
208 }
209 return ms
210 }
211 return mi.MessageOf(x)
212 }
213
214 // Deprecated: Use NmsgPayload.ProtoReflect.Descriptor instead.
215 func (*NmsgPayload) Descriptor() ([]byte, []int) {
216 return file_nmsg_proto_rawDescGZIP(), []int{2}
217 }
218
219 func (x *NmsgPayload) GetVid() uint32 {
220 if x != nil && x.Vid != nil {
221 return *x.Vid
222 }
223 return 0
224 }
225
226 func (x *NmsgPayload) GetMsgtype() uint32 {
227 if x != nil && x.Msgtype != nil {
228 return *x.Msgtype
229 }
230 return 0
231 }
232
233 func (x *NmsgPayload) GetTimeSec() int64 {
234 if x != nil && x.TimeSec != nil {
235 return *x.TimeSec
236 }
237 return 0
238 }
239
240 func (x *NmsgPayload) GetTimeNsec() uint32 {
241 if x != nil && x.TimeNsec != nil {
242 return *x.TimeNsec
243 }
244 return 0
245 }
246
247 func (x *NmsgPayload) GetPayload() []byte {
248 if x != nil {
249 return x.Payload
170250 }
171251 return nil
172252 }
173253
174 func (m *NmsgPayload) GetSource() uint32 {
175 if m != nil && m.Source != nil {
176 return *m.Source
177 }
178 return 0
179 }
180
181 func (m *NmsgPayload) GetOperator() uint32 {
182 if m != nil && m.Operator != nil {
183 return *m.Operator
184 }
185 return 0
186 }
187
188 func (m *NmsgPayload) GetGroup() uint32 {
189 if m != nil && m.Group != nil {
190 return *m.Group
191 }
192 return 0
193 }
194
195 func init() {
196 proto.RegisterType((*Nmsg)(nil), "nmsg.Nmsg")
197 proto.RegisterType((*NmsgFragment)(nil), "nmsg.NmsgFragment")
198 proto.RegisterType((*NmsgPayload)(nil), "nmsg.NmsgPayload")
199 }
200
201 func init() { proto.RegisterFile("nmsg.proto", fileDescriptor0) }
202
203 var fileDescriptor0 = []byte{
204 // 259 bytes of a gzipped FileDescriptorProto
205 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0x8f, 0xb1, 0x4e, 0xc3, 0x30,
206 0x10, 0x86, 0x15, 0xc7, 0x25, 0xe9, 0xc5, 0x05, 0x6a, 0x18, 0x3c, 0x46, 0x61, 0xe9, 0xd4, 0x81,
207 0x87, 0x60, 0x44, 0x8c, 0x6c, 0x91, 0xe5, 0x9a, 0x50, 0xa9, 0x89, 0x8d, 0xed, 0x20, 0xf5, 0x35,
208 0x78, 0x62, 0xee, 0xdc, 0x54, 0xea, 0x94, 0xf8, 0xfb, 0xef, 0xbe, 0xbb, 0x03, 0x98, 0xc6, 0x38,
209 0xec, 0x7d, 0x70, 0xc9, 0x49, 0x4e, 0xff, 0xdd, 0x37, 0xf0, 0x77, 0xfc, 0xca, 0x17, 0xa8, 0xbd,
210 0x3e, 0x9f, 0x9c, 0x3e, 0x44, 0x55, 0xb4, 0xe5, 0xae, 0x79, 0xdd, 0xee, 0x73, 0x31, 0xa5, 0x1f,
211 0x97, 0x44, 0x3e, 0x83, 0x58, 0x8a, 0x7a, 0x13, 0x4c, 0x54, 0x0c, 0x0b, 0x37, 0xf2, 0x11, 0xea,
212 0x68, 0x7f, 0x66, 0x3b, 0x19, 0xab, 0xca, 0xb6, 0x40, 0xf2, 0x04, 0xcd, 0x95, 0xf4, 0xc7, 0x83,
213 0xe2, 0x08, 0x79, 0xf7, 0x09, 0x82, 0x5c, 0x6f, 0x41, 0x0f, 0xa3, 0x9d, 0x92, 0x04, 0x60, 0x98,
214 0x15, 0x2d, 0xc3, 0x86, 0x07, 0xa8, 0xcc, 0x1c, 0x02, 0x62, 0x74, 0x12, 0x10, 0xc0, 0x4f, 0x3a,
215 0x26, 0xf4, 0xb1, 0xcb, 0x84, 0xaf, 0xa5, 0x0d, 0x65, 0x6c, 0x27, 0x64, 0x03, 0x25, 0x6e, 0xa0,
216 0x56, 0x34, 0xae, 0xfb, 0x2b, 0xa0, 0xb9, 0x5d, 0x13, 0xc3, 0xdf, 0x5b, 0x35, 0x46, 0xe9, 0xec,
217 0xed, 0xa2, 0x46, 0x59, 0x3a, 0x8e, 0xb6, 0x8f, 0xd6, 0x64, 0x7d, 0x29, 0xb7, 0xb0, 0xce, 0x64,
218 0x22, 0x44, 0xfe, 0x8a, 0xba, 0x96, 0x4b, 0xf3, 0x0c, 0x21, 0xef, 0xe1, 0x2e, 0xba, 0x39, 0xe0,
219 0x89, 0x55, 0x3e, 0x11, 0x2d, 0xce, 0xdb, 0xa0, 0x93, 0x0b, 0xaa, 0xce, 0x64, 0x03, 0xab, 0x21,
220 0xb8, 0xd9, 0xab, 0x35, 0x3d, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x73, 0x07, 0x52, 0x34, 0x6b,
221 0x01, 0x00, 0x00,
222 }
254 func (x *NmsgPayload) GetSource() uint32 {
255 if x != nil && x.Source != nil {
256 return *x.Source
257 }
258 return 0
259 }
260
261 func (x *NmsgPayload) GetOperator() uint32 {
262 if x != nil && x.Operator != nil {
263 return *x.Operator
264 }
265 return 0
266 }
267
268 func (x *NmsgPayload) GetGroup() uint32 {
269 if x != nil && x.Group != nil {
270 return *x.Group
271 }
272 return 0
273 }
274
275 var File_nmsg_proto protoreflect.FileDescriptor
276
277 var file_nmsg_proto_rawDesc = []byte{
278 0x0a, 0x0a, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6e, 0x6d,
279 0x73, 0x67, 0x22, 0x95, 0x01, 0x0a, 0x04, 0x4e, 0x6d, 0x73, 0x67, 0x12, 0x2d, 0x0a, 0x08, 0x70,
280 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e,
281 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x4e, 0x6d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
282 0x52, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61,
283 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x63, 0x72, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d,
284 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x72, 0x63, 0x73, 0x12, 0x1a, 0x0a,
285 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
286 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x71,
287 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a,
288 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x0c, 0x4e, 0x6d,
289 0x73, 0x67, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
290 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75,
291 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x75, 0x72,
292 0x72, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x02,
293 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x61, 0x67,
294 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x66, 0x72, 0x61, 0x67,
295 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x72, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28,
296 0x0d, 0x52, 0x03, 0x63, 0x72, 0x63, 0x22, 0xd5, 0x01, 0x0a, 0x0b, 0x4e, 0x6d, 0x73, 0x67, 0x50,
297 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x64, 0x18, 0x01, 0x20,
298 0x02, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x74,
299 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x74, 0x79,
300 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x03,
301 0x20, 0x02, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x1b, 0x0a,
302 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x04, 0x20, 0x02, 0x28, 0x07,
303 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61,
304 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79,
305 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07,
306 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08,
307 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
308 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75,
309 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x25,
310 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72,
311 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67,
312 0x3b, 0x6e, 0x6d, 0x73, 0x67,
313 }
314
315 var (
316 file_nmsg_proto_rawDescOnce sync.Once
317 file_nmsg_proto_rawDescData = file_nmsg_proto_rawDesc
318 )
319
320 func file_nmsg_proto_rawDescGZIP() []byte {
321 file_nmsg_proto_rawDescOnce.Do(func() {
322 file_nmsg_proto_rawDescData = protoimpl.X.CompressGZIP(file_nmsg_proto_rawDescData)
323 })
324 return file_nmsg_proto_rawDescData
325 }
326
327 var file_nmsg_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
328 var file_nmsg_proto_goTypes = []interface{}{
329 (*Nmsg)(nil), // 0: nmsg.Nmsg
330 (*NmsgFragment)(nil), // 1: nmsg.NmsgFragment
331 (*NmsgPayload)(nil), // 2: nmsg.NmsgPayload
332 }
333 var file_nmsg_proto_depIdxs = []int32{
334 2, // 0: nmsg.Nmsg.payloads:type_name -> nmsg.NmsgPayload
335 1, // [1:1] is the sub-list for method output_type
336 1, // [1:1] is the sub-list for method input_type
337 1, // [1:1] is the sub-list for extension type_name
338 1, // [1:1] is the sub-list for extension extendee
339 0, // [0:1] is the sub-list for field type_name
340 }
341
342 func init() { file_nmsg_proto_init() }
343 func file_nmsg_proto_init() {
344 if File_nmsg_proto != nil {
345 return
346 }
347 if !protoimpl.UnsafeEnabled {
348 file_nmsg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
349 switch v := v.(*Nmsg); i {
350 case 0:
351 return &v.state
352 case 1:
353 return &v.sizeCache
354 case 2:
355 return &v.unknownFields
356 default:
357 return nil
358 }
359 }
360 file_nmsg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
361 switch v := v.(*NmsgFragment); i {
362 case 0:
363 return &v.state
364 case 1:
365 return &v.sizeCache
366 case 2:
367 return &v.unknownFields
368 default:
369 return nil
370 }
371 }
372 file_nmsg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
373 switch v := v.(*NmsgPayload); i {
374 case 0:
375 return &v.state
376 case 1:
377 return &v.sizeCache
378 case 2:
379 return &v.unknownFields
380 default:
381 return nil
382 }
383 }
384 }
385 type x struct{}
386 out := protoimpl.TypeBuilder{
387 File: protoimpl.DescBuilder{
388 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
389 RawDescriptor: file_nmsg_proto_rawDesc,
390 NumEnums: 0,
391 NumMessages: 3,
392 NumExtensions: 0,
393 NumServices: 0,
394 },
395 GoTypes: file_nmsg_proto_goTypes,
396 DependencyIndexes: file_nmsg_proto_depIdxs,
397 MessageInfos: file_nmsg_proto_msgTypes,
398 }.Build()
399 File_nmsg_proto = out.File
400 file_nmsg_proto_rawDesc = nil
401 file_nmsg_proto_goTypes = nil
402 file_nmsg_proto_depIdxs = nil
403 }
00 syntax = "proto2";
11 package nmsg;
2 option go_package = "github.com/farsightsec/go-nmsg;nmsg";
23
34 message Nmsg {
45 repeated NmsgPayload payloads = 1;
1010 import (
1111 "github.com/dnstap/golang-dnstap"
1212 "github.com/farsightsec/go-nmsg"
13 "github.com/golang/protobuf/proto"
13 "google.golang.org/protobuf/proto"
1414 )
1515
1616 func (p *Ncap) GetVid() uint32 { return 1 }
0 package nmsg_base
1
2 //
3 // Compatibility definitions for code written against older versions
4 // of the nmsg_base .proto files.
5 //
6
7 type DnsQRType = DnsQR_DnsQRType
8
9 const (
10 DnsQRType_UDP_INVALID = DnsQR_UDP_INVALID
11 DnsQRType_UDP_QUERY_RESPONSE = DnsQR_UDP_QUERY_RESPONSE
12 DnsQRType_UDP_UNANSWERED_QUERY = DnsQR_UDP_UNANSWERED_QUERY
13 DnsQRType_UDP_UNSOLICITED_RESPONSE = DnsQR_UDP_UNSOLICITED_RESPONSE
14 DnsQRType_TCP = DnsQR_TCP
15 DnsQRType_ICMP = DnsQR_ICMP
16 DnsQRType_UDP_QUERY_ONLY = DnsQR_UDP_QUERY_ONLY
17 DnsQRType_UDP_RESPONSE_ONLY = DnsQR_UDP_RESPONSE_ONLY
18 )
19
20 type UdpChecksum = DnsQR_UdpChecksum
21
22 const (
23 UdpChecksum_ERROR = DnsQR_ERROR
24 UdpChecksum_ABSENT = DnsQR_ABSENT
25 UdpChecksum_INCORRECT = DnsQR_INCORRECT
26 UdpChecksum_CORRECT = DnsQR_CORRECT
27 )
28
29 type EmailType = Email_EmailType
30
31 const (
32 EmailType_unknown = Email_unknown
33 EmailType_spamtrap = Email_spamtrap
34 EmailType_rej_network = Email_rej_network
35 EmailType_rej_content = Email_rej_content
36 EmailType_rej_user = Email_rej_user
37 )
38
39 type EncodeType = Encode_EncodeType
40
41 const (
42 EncodeType_TEXT = Encode_TEXT
43 EncodeType_JSON = Encode_JSON
44 EncodeType_YAML = Encode_YAML
45 EncodeType_MSGPACK = Encode_MSGPACK
46 EncodeType_XML = Encode_XML
47 )
48
49 type HttpType = Http_HttpType
50
51 const (
52 HttpType_unknown = Http_unknown
53 HttpType_sinkhole = Http_sinkhole
54 )
55
56 type LinkType = Linkpair_Linktype
57
58 const (
59 Linktype_anchor = Linkpair_anchor
60 Linktype_redirect = Linkpair_redirect
61 )
62
63 type NcapType Ncap_NcapType
64
65 const (
66 NcapType_IPV4 = Ncap_IPV4
67 NcapType_IPV6 = Ncap_IPV6
68 NcapType_Legacy = Ncap_Legacy
69 )
70
71 type NcapLegacyType = Ncap_NcapLegacyType
72
73 const (
74 NcapLegacyType_Ncap_UDP = Ncap_UDP
75 NcapLegacyType_Ncap_TCP = Ncap_TCP
76 NcapLegacyType_Ncap_ICMP = Ncap_ICMP
77 )
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: dns.proto
2 // DO NOT EDIT!
3
4 /*
5 Package nmsg_base is a generated protocol buffer package.
6
7 It is generated from these files:
8 dns.proto
9 dnsqr.proto
10 email.proto
11 encode.proto
12 http.proto
13 ipconn.proto
14 linkpair.proto
15 logline.proto
16 ncap.proto
17 packet.proto
18 pkt.proto
19 xml.proto
20
21 It has these top-level messages:
22 Dns
23 DnsQR
24 Email
25 Encode
26 Http
27 IPConn
28 Linkpair
29 LogLine
30 Ncap
31 Packet
32 Pkt
33 Xml
34 */
5
356 package nmsg_base
367
37 import proto "github.com/golang/protobuf/proto"
38 import fmt "fmt"
39 import math "math"
40
41 // Reference imports to suppress errors if they are not otherwise used.
42 var _ = proto.Marshal
43 var _ = fmt.Errorf
44 var _ = math.Inf
45
46 // This is a compile-time assertion to ensure that this generated file
47 // is compatible with the proto package it is being compiled against.
48 // A compilation error at this line likely means your copy of the
49 // proto package needs to be updated.
50 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
14
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
5121
5222 type Dns struct {
53 Section *uint32 `protobuf:"varint,6,opt,name=section" json:"section,omitempty"`
54 Qname []byte `protobuf:"bytes,7,opt,name=qname" json:"qname,omitempty"`
55 Qtype *uint32 `protobuf:"varint,8,opt,name=qtype" json:"qtype,omitempty"`
56 Qclass *uint32 `protobuf:"varint,9,opt,name=qclass" json:"qclass,omitempty"`
57 Rrname []byte `protobuf:"bytes,1,opt,name=rrname" json:"rrname,omitempty"`
58 Rrtype *uint32 `protobuf:"varint,2,opt,name=rrtype" json:"rrtype,omitempty"`
59 Rrclass *uint32 `protobuf:"varint,3,opt,name=rrclass" json:"rrclass,omitempty"`
60 Rrttl *uint32 `protobuf:"varint,4,opt,name=rrttl" json:"rrttl,omitempty"`
61 Rdata [][]byte `protobuf:"bytes,5,rep,name=rdata" json:"rdata,omitempty"`
62 XXX_unrecognized []byte `json:"-"`
63 }
64
65 func (m *Dns) Reset() { *m = Dns{} }
66 func (m *Dns) String() string { return proto.CompactTextString(m) }
67 func (*Dns) ProtoMessage() {}
68 func (*Dns) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
69
70 func (m *Dns) GetSection() uint32 {
71 if m != nil && m.Section != nil {
72 return *m.Section
73 }
74 return 0
75 }
76
77 func (m *Dns) GetQname() []byte {
78 if m != nil {
79 return m.Qname
23 state protoimpl.MessageState
24 sizeCache protoimpl.SizeCache
25 unknownFields protoimpl.UnknownFields
26
27 Section *uint32 `protobuf:"varint,6,opt,name=section" json:"section,omitempty"`
28 Qname []byte `protobuf:"bytes,7,opt,name=qname" json:"qname,omitempty"`
29 Qtype *uint32 `protobuf:"varint,8,opt,name=qtype" json:"qtype,omitempty"`
30 Qclass *uint32 `protobuf:"varint,9,opt,name=qclass" json:"qclass,omitempty"`
31 Rrname []byte `protobuf:"bytes,1,opt,name=rrname" json:"rrname,omitempty"`
32 Rrtype *uint32 `protobuf:"varint,2,opt,name=rrtype" json:"rrtype,omitempty"`
33 Rrclass *uint32 `protobuf:"varint,3,opt,name=rrclass" json:"rrclass,omitempty"`
34 Rrttl *uint32 `protobuf:"varint,4,opt,name=rrttl" json:"rrttl,omitempty"`
35 Rdata [][]byte `protobuf:"bytes,5,rep,name=rdata" json:"rdata,omitempty"`
36 }
37
38 func (x *Dns) Reset() {
39 *x = Dns{}
40 if protoimpl.UnsafeEnabled {
41 mi := &file_dns_proto_msgTypes[0]
42 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
43 ms.StoreMessageInfo(mi)
44 }
45 }
46
47 func (x *Dns) String() string {
48 return protoimpl.X.MessageStringOf(x)
49 }
50
51 func (*Dns) ProtoMessage() {}
52
53 func (x *Dns) ProtoReflect() protoreflect.Message {
54 mi := &file_dns_proto_msgTypes[0]
55 if protoimpl.UnsafeEnabled && x != nil {
56 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
57 if ms.LoadMessageInfo() == nil {
58 ms.StoreMessageInfo(mi)
59 }
60 return ms
61 }
62 return mi.MessageOf(x)
63 }
64
65 // Deprecated: Use Dns.ProtoReflect.Descriptor instead.
66 func (*Dns) Descriptor() ([]byte, []int) {
67 return file_dns_proto_rawDescGZIP(), []int{0}
68 }
69
70 func (x *Dns) GetSection() uint32 {
71 if x != nil && x.Section != nil {
72 return *x.Section
73 }
74 return 0
75 }
76
77 func (x *Dns) GetQname() []byte {
78 if x != nil {
79 return x.Qname
8080 }
8181 return nil
8282 }
8383
84 func (m *Dns) GetQtype() uint32 {
85 if m != nil && m.Qtype != nil {
86 return *m.Qtype
87 }
88 return 0
89 }
90
91 func (m *Dns) GetQclass() uint32 {
92 if m != nil && m.Qclass != nil {
93 return *m.Qclass
94 }
95 return 0
96 }
97
98 func (m *Dns) GetRrname() []byte {
99 if m != nil {
100 return m.Rrname
84 func (x *Dns) GetQtype() uint32 {
85 if x != nil && x.Qtype != nil {
86 return *x.Qtype
87 }
88 return 0
89 }
90
91 func (x *Dns) GetQclass() uint32 {
92 if x != nil && x.Qclass != nil {
93 return *x.Qclass
94 }
95 return 0
96 }
97
98 func (x *Dns) GetRrname() []byte {
99 if x != nil {
100 return x.Rrname
101101 }
102102 return nil
103103 }
104104
105 func (m *Dns) GetRrtype() uint32 {
106 if m != nil && m.Rrtype != nil {
107 return *m.Rrtype
108 }
109 return 0
110 }
111
112 func (m *Dns) GetRrclass() uint32 {
113 if m != nil && m.Rrclass != nil {
114 return *m.Rrclass
115 }
116 return 0
117 }
118
119 func (m *Dns) GetRrttl() uint32 {
120 if m != nil && m.Rrttl != nil {
121 return *m.Rrttl
122 }
123 return 0
124 }
125
126 func (m *Dns) GetRdata() [][]byte {
127 if m != nil {
128 return m.Rdata
105 func (x *Dns) GetRrtype() uint32 {
106 if x != nil && x.Rrtype != nil {
107 return *x.Rrtype
108 }
109 return 0
110 }
111
112 func (x *Dns) GetRrclass() uint32 {
113 if x != nil && x.Rrclass != nil {
114 return *x.Rrclass
115 }
116 return 0
117 }
118
119 func (x *Dns) GetRrttl() uint32 {
120 if x != nil && x.Rrttl != nil {
121 return *x.Rrttl
122 }
123 return 0
124 }
125
126 func (x *Dns) GetRdata() [][]byte {
127 if x != nil {
128 return x.Rdata
129129 }
130130 return nil
131131 }
132132
133 func init() {
134 proto.RegisterType((*Dns)(nil), "nmsg.base.Dns")
135 }
136
137 func init() { proto.RegisterFile("dns.proto", fileDescriptor0) }
138
139 var fileDescriptor0 = []byte{
140 // 148 bytes of a gzipped FileDescriptorProto
141 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0xc9, 0x2b, 0xd6,
142 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b, 0x4a, 0x2c, 0x4e,
143 0x55, 0x9a, 0xcc, 0xc8, 0xc5, 0xec, 0x92, 0x57, 0x2c, 0xc4, 0xcf, 0xc5, 0x5e, 0x9c, 0x9a, 0x5c,
144 0x92, 0x99, 0x9f, 0x27, 0xc1, 0xa6, 0xc0, 0xa8, 0xc1, 0x2b, 0xc4, 0xcb, 0xc5, 0x5a, 0x98, 0x97,
145 0x98, 0x9b, 0x2a, 0xc1, 0x0e, 0xe4, 0xf2, 0x80, 0xb9, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x1c, 0x60,
146 0x59, 0x3e, 0x2e, 0xb6, 0xc2, 0xe4, 0x9c, 0xc4, 0xe2, 0x62, 0x09, 0x4e, 0x18, 0xbf, 0xa8, 0x08,
147 0xac, 0x9c, 0x11, 0xac, 0x1c, 0xcc, 0x07, 0xab, 0x67, 0x02, 0xcb, 0x03, 0x8d, 0x2f, 0x2a, 0x82,
148 0x68, 0x60, 0x86, 0x19, 0x0f, 0x54, 0x50, 0x92, 0x23, 0xc1, 0x02, 0xe7, 0xa6, 0x24, 0x96, 0x24,
149 0x4a, 0xb0, 0x2a, 0x30, 0x6b, 0xf0, 0x00, 0x02, 0x00, 0x00, 0xff, 0xff, 0x75, 0x4a, 0x12, 0x4c,
150 0xac, 0x00, 0x00, 0x00,
151 }
133 var File_dns_proto protoreflect.FileDescriptor
134
135 var file_dns_proto_rawDesc = []byte{
136 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6d, 0x73,
137 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x03, 0x44, 0x6e, 0x73, 0x12, 0x18,
138 0x0a, 0x07, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52,
139 0x07, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x6e, 0x61, 0x6d,
140 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,
141 0x0a, 0x05, 0x71, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x71,
142 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x71, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x09,
143 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x71, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06,
144 0x72, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x72,
145 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02,
146 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
147 0x72, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72,
148 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x72, 0x74, 0x74, 0x6c, 0x18,
149 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x72, 0x74, 0x74, 0x6c, 0x12, 0x14, 0x0a, 0x05,
150 0x72, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x64, 0x61,
151 0x74, 0x61, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
152 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d,
153 0x6e, 0x6d, 0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
154 }
155
156 var (
157 file_dns_proto_rawDescOnce sync.Once
158 file_dns_proto_rawDescData = file_dns_proto_rawDesc
159 )
160
161 func file_dns_proto_rawDescGZIP() []byte {
162 file_dns_proto_rawDescOnce.Do(func() {
163 file_dns_proto_rawDescData = protoimpl.X.CompressGZIP(file_dns_proto_rawDescData)
164 })
165 return file_dns_proto_rawDescData
166 }
167
168 var file_dns_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
169 var file_dns_proto_goTypes = []interface{}{
170 (*Dns)(nil), // 0: nmsg.base.Dns
171 }
172 var file_dns_proto_depIdxs = []int32{
173 0, // [0:0] is the sub-list for method output_type
174 0, // [0:0] is the sub-list for method input_type
175 0, // [0:0] is the sub-list for extension type_name
176 0, // [0:0] is the sub-list for extension extendee
177 0, // [0:0] is the sub-list for field type_name
178 }
179
180 func init() { file_dns_proto_init() }
181 func file_dns_proto_init() {
182 if File_dns_proto != nil {
183 return
184 }
185 if !protoimpl.UnsafeEnabled {
186 file_dns_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
187 switch v := v.(*Dns); i {
188 case 0:
189 return &v.state
190 case 1:
191 return &v.sizeCache
192 case 2:
193 return &v.unknownFields
194 default:
195 return nil
196 }
197 }
198 }
199 type x struct{}
200 out := protoimpl.TypeBuilder{
201 File: protoimpl.DescBuilder{
202 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
203 RawDescriptor: file_dns_proto_rawDesc,
204 NumEnums: 0,
205 NumMessages: 1,
206 NumExtensions: 0,
207 NumServices: 0,
208 },
209 GoTypes: file_dns_proto_goTypes,
210 DependencyIndexes: file_dns_proto_depIdxs,
211 MessageInfos: file_dns_proto_msgTypes,
212 }.Build()
213 File_dns_proto = out.File
214 file_dns_proto_rawDesc = nil
215 file_dns_proto_goTypes = nil
216 file_dns_proto_depIdxs = nil
217 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
34 message Dns {
45 optional uint32 section = 6;
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: dnsqr.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
14
15 type DnsQRType int32
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
1614
1715 const (
18 DnsQRType_UDP_INVALID DnsQRType = 0
19 DnsQRType_UDP_QUERY_RESPONSE DnsQRType = 1
20 DnsQRType_UDP_UNANSWERED_QUERY DnsQRType = 2
21 DnsQRType_UDP_UNSOLICITED_RESPONSE DnsQRType = 3
22 DnsQRType_TCP DnsQRType = 4
23 DnsQRType_ICMP DnsQRType = 5
24 DnsQRType_UDP_QUERY_ONLY DnsQRType = 6
25 DnsQRType_UDP_RESPONSE_ONLY DnsQRType = 7
26 )
27
28 var DnsQRType_name = map[int32]string{
29 0: "UDP_INVALID",
30 1: "UDP_QUERY_RESPONSE",
31 2: "UDP_UNANSWERED_QUERY",
32 3: "UDP_UNSOLICITED_RESPONSE",
33 4: "TCP",
34 5: "ICMP",
35 6: "UDP_QUERY_ONLY",
36 7: "UDP_RESPONSE_ONLY",
37 }
38 var DnsQRType_value = map[string]int32{
39 "UDP_INVALID": 0,
40 "UDP_QUERY_RESPONSE": 1,
41 "UDP_UNANSWERED_QUERY": 2,
42 "UDP_UNSOLICITED_RESPONSE": 3,
43 "TCP": 4,
44 "ICMP": 5,
45 "UDP_QUERY_ONLY": 6,
46 "UDP_RESPONSE_ONLY": 7,
47 }
48
49 func (x DnsQRType) Enum() *DnsQRType {
50 p := new(DnsQRType)
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 type DnsQR_DnsQRType int32
23
24 const (
25 DnsQR_UDP_INVALID DnsQR_DnsQRType = 0
26 DnsQR_UDP_QUERY_RESPONSE DnsQR_DnsQRType = 1
27 DnsQR_UDP_UNANSWERED_QUERY DnsQR_DnsQRType = 2
28 DnsQR_UDP_UNSOLICITED_RESPONSE DnsQR_DnsQRType = 3
29 DnsQR_TCP DnsQR_DnsQRType = 4
30 DnsQR_ICMP DnsQR_DnsQRType = 5
31 DnsQR_UDP_QUERY_ONLY DnsQR_DnsQRType = 6
32 DnsQR_UDP_RESPONSE_ONLY DnsQR_DnsQRType = 7
33 )
34
35 // Enum value maps for DnsQR_DnsQRType.
36 var (
37 DnsQR_DnsQRType_name = map[int32]string{
38 0: "UDP_INVALID",
39 1: "UDP_QUERY_RESPONSE",
40 2: "UDP_UNANSWERED_QUERY",
41 3: "UDP_UNSOLICITED_RESPONSE",
42 4: "TCP",
43 5: "ICMP",
44 6: "UDP_QUERY_ONLY",
45 7: "UDP_RESPONSE_ONLY",
46 }
47 DnsQR_DnsQRType_value = map[string]int32{
48 "UDP_INVALID": 0,
49 "UDP_QUERY_RESPONSE": 1,
50 "UDP_UNANSWERED_QUERY": 2,
51 "UDP_UNSOLICITED_RESPONSE": 3,
52 "TCP": 4,
53 "ICMP": 5,
54 "UDP_QUERY_ONLY": 6,
55 "UDP_RESPONSE_ONLY": 7,
56 }
57 )
58
59 func (x DnsQR_DnsQRType) Enum() *DnsQR_DnsQRType {
60 p := new(DnsQR_DnsQRType)
5161 *p = x
5262 return p
5363 }
54 func (x DnsQRType) String() string {
55 return proto.EnumName(DnsQRType_name, int32(x))
56 }
57 func (x *DnsQRType) UnmarshalJSON(data []byte) error {
58 value, err := proto.UnmarshalJSONEnum(DnsQRType_value, data, "DnsQRType")
64
65 func (x DnsQR_DnsQRType) String() string {
66 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
67 }
68
69 func (DnsQR_DnsQRType) Descriptor() protoreflect.EnumDescriptor {
70 return file_dnsqr_proto_enumTypes[0].Descriptor()
71 }
72
73 func (DnsQR_DnsQRType) Type() protoreflect.EnumType {
74 return &file_dnsqr_proto_enumTypes[0]
75 }
76
77 func (x DnsQR_DnsQRType) Number() protoreflect.EnumNumber {
78 return protoreflect.EnumNumber(x)
79 }
80
81 // Deprecated: Do not use.
82 func (x *DnsQR_DnsQRType) UnmarshalJSON(b []byte) error {
83 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
5984 if err != nil {
6085 return err
6186 }
62 *x = DnsQRType(value)
63 return nil
64 }
65 func (DnsQRType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
66
67 type UdpChecksum int32
87 *x = DnsQR_DnsQRType(num)
88 return nil
89 }
90
91 // Deprecated: Use DnsQR_DnsQRType.Descriptor instead.
92 func (DnsQR_DnsQRType) EnumDescriptor() ([]byte, []int) {
93 return file_dnsqr_proto_rawDescGZIP(), []int{0, 0}
94 }
95
96 type DnsQR_UdpChecksum int32
6897
6998 const (
70 UdpChecksum_ERROR UdpChecksum = 0
71 UdpChecksum_ABSENT UdpChecksum = 1
72 UdpChecksum_INCORRECT UdpChecksum = 2
73 UdpChecksum_CORRECT UdpChecksum = 3
74 )
75
76 var UdpChecksum_name = map[int32]string{
77 0: "ERROR",
78 1: "ABSENT",
79 2: "INCORRECT",
80 3: "CORRECT",
81 }
82 var UdpChecksum_value = map[string]int32{
83 "ERROR": 0,
84 "ABSENT": 1,
85 "INCORRECT": 2,
86 "CORRECT": 3,
87 }
88
89 func (x UdpChecksum) Enum() *UdpChecksum {
90 p := new(UdpChecksum)
99 DnsQR_ERROR DnsQR_UdpChecksum = 0
100 DnsQR_ABSENT DnsQR_UdpChecksum = 1
101 DnsQR_INCORRECT DnsQR_UdpChecksum = 2
102 DnsQR_CORRECT DnsQR_UdpChecksum = 3
103 )
104
105 // Enum value maps for DnsQR_UdpChecksum.
106 var (
107 DnsQR_UdpChecksum_name = map[int32]string{
108 0: "ERROR",
109 1: "ABSENT",
110 2: "INCORRECT",
111 3: "CORRECT",
112 }
113 DnsQR_UdpChecksum_value = map[string]int32{
114 "ERROR": 0,
115 "ABSENT": 1,
116 "INCORRECT": 2,
117 "CORRECT": 3,
118 }
119 )
120
121 func (x DnsQR_UdpChecksum) Enum() *DnsQR_UdpChecksum {
122 p := new(DnsQR_UdpChecksum)
91123 *p = x
92124 return p
93125 }
94 func (x UdpChecksum) String() string {
95 return proto.EnumName(UdpChecksum_name, int32(x))
96 }
97 func (x *UdpChecksum) UnmarshalJSON(data []byte) error {
98 value, err := proto.UnmarshalJSONEnum(UdpChecksum_value, data, "UdpChecksum")
126
127 func (x DnsQR_UdpChecksum) String() string {
128 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
129 }
130
131 func (DnsQR_UdpChecksum) Descriptor() protoreflect.EnumDescriptor {
132 return file_dnsqr_proto_enumTypes[1].Descriptor()
133 }
134
135 func (DnsQR_UdpChecksum) Type() protoreflect.EnumType {
136 return &file_dnsqr_proto_enumTypes[1]
137 }
138
139 func (x DnsQR_UdpChecksum) Number() protoreflect.EnumNumber {
140 return protoreflect.EnumNumber(x)
141 }
142
143 // Deprecated: Do not use.
144 func (x *DnsQR_UdpChecksum) UnmarshalJSON(b []byte) error {
145 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
99146 if err != nil {
100147 return err
101148 }
102 *x = UdpChecksum(value)
103 return nil
104 }
105 func (UdpChecksum) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
149 *x = DnsQR_UdpChecksum(num)
150 return nil
151 }
152
153 // Deprecated: Use DnsQR_UdpChecksum.Descriptor instead.
154 func (DnsQR_UdpChecksum) EnumDescriptor() ([]byte, []int) {
155 return file_dnsqr_proto_rawDescGZIP(), []int{0, 1}
156 }
106157
107158 type DnsQR struct {
108 Type *DnsQRType `protobuf:"varint,1,req,name=type,enum=nmsg.base.DnsQRType" json:"type,omitempty"`
109 QueryIp []byte `protobuf:"bytes,2,req,name=query_ip" json:"query_ip,omitempty"`
110 ResponseIp []byte `protobuf:"bytes,3,req,name=response_ip" json:"response_ip,omitempty"`
111 Proto *uint32 `protobuf:"varint,4,req,name=proto" json:"proto,omitempty"`
112 QueryPort *uint32 `protobuf:"varint,5,req,name=query_port" json:"query_port,omitempty"`
113 ResponsePort *uint32 `protobuf:"varint,6,req,name=response_port" json:"response_port,omitempty"`
114 Id *uint32 `protobuf:"varint,7,req,name=id" json:"id,omitempty"`
115 Qname []byte `protobuf:"bytes,8,opt,name=qname" json:"qname,omitempty"`
116 Qtype *uint32 `protobuf:"varint,9,opt,name=qtype" json:"qtype,omitempty"`
117 Qclass *uint32 `protobuf:"varint,10,opt,name=qclass" json:"qclass,omitempty"`
118 Rcode *uint32 `protobuf:"varint,11,opt,name=rcode" json:"rcode,omitempty"`
119 QueryPacket [][]byte `protobuf:"bytes,12,rep,name=query_packet" json:"query_packet,omitempty"`
120 QueryTimeSec []int64 `protobuf:"varint,13,rep,name=query_time_sec" json:"query_time_sec,omitempty"`
121 QueryTimeNsec []int32 `protobuf:"fixed32,14,rep,name=query_time_nsec" json:"query_time_nsec,omitempty"`
122 ResponsePacket [][]byte `protobuf:"bytes,15,rep,name=response_packet" json:"response_packet,omitempty"`
123 ResponseTimeSec []int64 `protobuf:"varint,16,rep,name=response_time_sec" json:"response_time_sec,omitempty"`
124 ResponseTimeNsec []int32 `protobuf:"fixed32,17,rep,name=response_time_nsec" json:"response_time_nsec,omitempty"`
125 Tcp []byte `protobuf:"bytes,18,opt,name=tcp" json:"tcp,omitempty"`
126 Icmp []byte `protobuf:"bytes,19,opt,name=icmp" json:"icmp,omitempty"`
127 Timeout *float64 `protobuf:"fixed64,20,opt,name=timeout" json:"timeout,omitempty"`
128 UdpChecksum *UdpChecksum `protobuf:"varint,21,opt,name=udp_checksum,enum=nmsg.base.UdpChecksum" json:"udp_checksum,omitempty"`
129 ResolverAddressZeroed *bool `protobuf:"varint,22,opt,name=resolver_address_zeroed" json:"resolver_address_zeroed,omitempty"`
130 XXX_unrecognized []byte `json:"-"`
131 }
132
133 func (m *DnsQR) Reset() { *m = DnsQR{} }
134 func (m *DnsQR) String() string { return proto.CompactTextString(m) }
135 func (*DnsQR) ProtoMessage() {}
136 func (*DnsQR) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
137
138 func (m *DnsQR) GetType() DnsQRType {
139 if m != nil && m.Type != nil {
140 return *m.Type
141 }
142 return DnsQRType_UDP_INVALID
143 }
144
145 func (m *DnsQR) GetQueryIp() []byte {
146 if m != nil {
147 return m.QueryIp
148 }
149 return nil
150 }
151
152 func (m *DnsQR) GetResponseIp() []byte {
153 if m != nil {
154 return m.ResponseIp
155 }
156 return nil
157 }
158
159 func (m *DnsQR) GetProto() uint32 {
160 if m != nil && m.Proto != nil {
161 return *m.Proto
162 }
163 return 0
164 }
165
166 func (m *DnsQR) GetQueryPort() uint32 {
167 if m != nil && m.QueryPort != nil {
168 return *m.QueryPort
169 }
170 return 0
171 }
172
173 func (m *DnsQR) GetResponsePort() uint32 {
174 if m != nil && m.ResponsePort != nil {
175 return *m.ResponsePort
176 }
177 return 0
178 }
179
180 func (m *DnsQR) GetId() uint32 {
181 if m != nil && m.Id != nil {
182 return *m.Id
183 }
184 return 0
185 }
186
187 func (m *DnsQR) GetQname() []byte {
188 if m != nil {
189 return m.Qname
190 }
191 return nil
192 }
193
194 func (m *DnsQR) GetQtype() uint32 {
195 if m != nil && m.Qtype != nil {
196 return *m.Qtype
197 }
198 return 0
199 }
200
201 func (m *DnsQR) GetQclass() uint32 {
202 if m != nil && m.Qclass != nil {
203 return *m.Qclass
204 }
205 return 0
206 }
207
208 func (m *DnsQR) GetRcode() uint32 {
209 if m != nil && m.Rcode != nil {
210 return *m.Rcode
211 }
212 return 0
213 }
214
215 func (m *DnsQR) GetQueryPacket() [][]byte {
216 if m != nil {
217 return m.QueryPacket
218 }
219 return nil
220 }
221
222 func (m *DnsQR) GetQueryTimeSec() []int64 {
223 if m != nil {
224 return m.QueryTimeSec
225 }
226 return nil
227 }
228
229 func (m *DnsQR) GetQueryTimeNsec() []int32 {
230 if m != nil {
231 return m.QueryTimeNsec
232 }
233 return nil
234 }
235
236 func (m *DnsQR) GetResponsePacket() [][]byte {
237 if m != nil {
238 return m.ResponsePacket
239 }
240 return nil
241 }
242
243 func (m *DnsQR) GetResponseTimeSec() []int64 {
244 if m != nil {
245 return m.ResponseTimeSec
246 }
247 return nil
248 }
249
250 func (m *DnsQR) GetResponseTimeNsec() []int32 {
251 if m != nil {
252 return m.ResponseTimeNsec
253 }
254 return nil
255 }
256
257 func (m *DnsQR) GetTcp() []byte {
258 if m != nil {
259 return m.Tcp
260 }
261 return nil
262 }
263
264 func (m *DnsQR) GetIcmp() []byte {
265 if m != nil {
266 return m.Icmp
267 }
268 return nil
269 }
270
271 func (m *DnsQR) GetTimeout() float64 {
272 if m != nil && m.Timeout != nil {
273 return *m.Timeout
274 }
275 return 0
276 }
277
278 func (m *DnsQR) GetUdpChecksum() UdpChecksum {
279 if m != nil && m.UdpChecksum != nil {
280 return *m.UdpChecksum
281 }
282 return UdpChecksum_ERROR
283 }
284
285 func (m *DnsQR) GetResolverAddressZeroed() bool {
286 if m != nil && m.ResolverAddressZeroed != nil {
287 return *m.ResolverAddressZeroed
159 state protoimpl.MessageState
160 sizeCache protoimpl.SizeCache
161 unknownFields protoimpl.UnknownFields
162
163 Type *DnsQR_DnsQRType `protobuf:"varint,1,req,name=type,enum=nmsg.base.DnsQR_DnsQRType" json:"type,omitempty"`
164 QueryIp []byte `protobuf:"bytes,2,req,name=query_ip,json=queryIp" json:"query_ip,omitempty"`
165 ResponseIp []byte `protobuf:"bytes,3,req,name=response_ip,json=responseIp" json:"response_ip,omitempty"`
166 Proto *uint32 `protobuf:"varint,4,req,name=proto" json:"proto,omitempty"`
167 QueryPort *uint32 `protobuf:"varint,5,req,name=query_port,json=queryPort" json:"query_port,omitempty"`
168 ResponsePort *uint32 `protobuf:"varint,6,req,name=response_port,json=responsePort" json:"response_port,omitempty"`
169 Id *uint32 `protobuf:"varint,7,req,name=id" json:"id,omitempty"`
170 Qname []byte `protobuf:"bytes,8,opt,name=qname" json:"qname,omitempty"`
171 Qtype *uint32 `protobuf:"varint,9,opt,name=qtype" json:"qtype,omitempty"`
172 Qclass *uint32 `protobuf:"varint,10,opt,name=qclass" json:"qclass,omitempty"`
173 Rcode *uint32 `protobuf:"varint,11,opt,name=rcode" json:"rcode,omitempty"`
174 QueryPacket [][]byte `protobuf:"bytes,12,rep,name=query_packet,json=queryPacket" json:"query_packet,omitempty"`
175 QueryTimeSec []int64 `protobuf:"varint,13,rep,name=query_time_sec,json=queryTimeSec" json:"query_time_sec,omitempty"`
176 QueryTimeNsec []int32 `protobuf:"fixed32,14,rep,name=query_time_nsec,json=queryTimeNsec" json:"query_time_nsec,omitempty"`
177 ResponsePacket [][]byte `protobuf:"bytes,15,rep,name=response_packet,json=responsePacket" json:"response_packet,omitempty"`
178 ResponseTimeSec []int64 `protobuf:"varint,16,rep,name=response_time_sec,json=responseTimeSec" json:"response_time_sec,omitempty"`
179 ResponseTimeNsec []int32 `protobuf:"fixed32,17,rep,name=response_time_nsec,json=responseTimeNsec" json:"response_time_nsec,omitempty"`
180 Tcp []byte `protobuf:"bytes,18,opt,name=tcp" json:"tcp,omitempty"`
181 Icmp []byte `protobuf:"bytes,19,opt,name=icmp" json:"icmp,omitempty"`
182 Timeout *float64 `protobuf:"fixed64,20,opt,name=timeout" json:"timeout,omitempty"`
183 UdpChecksum *DnsQR_UdpChecksum `protobuf:"varint,21,opt,name=udp_checksum,json=udpChecksum,enum=nmsg.base.DnsQR_UdpChecksum" json:"udp_checksum,omitempty"`
184 ResolverAddressZeroed *bool `protobuf:"varint,22,opt,name=resolver_address_zeroed,json=resolverAddressZeroed" json:"resolver_address_zeroed,omitempty"`
185 }
186
187 func (x *DnsQR) Reset() {
188 *x = DnsQR{}
189 if protoimpl.UnsafeEnabled {
190 mi := &file_dnsqr_proto_msgTypes[0]
191 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
192 ms.StoreMessageInfo(mi)
193 }
194 }
195
196 func (x *DnsQR) String() string {
197 return protoimpl.X.MessageStringOf(x)
198 }
199
200 func (*DnsQR) ProtoMessage() {}
201
202 func (x *DnsQR) ProtoReflect() protoreflect.Message {
203 mi := &file_dnsqr_proto_msgTypes[0]
204 if protoimpl.UnsafeEnabled && x != nil {
205 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
206 if ms.LoadMessageInfo() == nil {
207 ms.StoreMessageInfo(mi)
208 }
209 return ms
210 }
211 return mi.MessageOf(x)
212 }
213
214 // Deprecated: Use DnsQR.ProtoReflect.Descriptor instead.
215 func (*DnsQR) Descriptor() ([]byte, []int) {
216 return file_dnsqr_proto_rawDescGZIP(), []int{0}
217 }
218
219 func (x *DnsQR) GetType() DnsQR_DnsQRType {
220 if x != nil && x.Type != nil {
221 return *x.Type
222 }
223 return DnsQR_UDP_INVALID
224 }
225
226 func (x *DnsQR) GetQueryIp() []byte {
227 if x != nil {
228 return x.QueryIp
229 }
230 return nil
231 }
232
233 func (x *DnsQR) GetResponseIp() []byte {
234 if x != nil {
235 return x.ResponseIp
236 }
237 return nil
238 }
239
240 func (x *DnsQR) GetProto() uint32 {
241 if x != nil && x.Proto != nil {
242 return *x.Proto
243 }
244 return 0
245 }
246
247 func (x *DnsQR) GetQueryPort() uint32 {
248 if x != nil && x.QueryPort != nil {
249 return *x.QueryPort
250 }
251 return 0
252 }
253
254 func (x *DnsQR) GetResponsePort() uint32 {
255 if x != nil && x.ResponsePort != nil {
256 return *x.ResponsePort
257 }
258 return 0
259 }
260
261 func (x *DnsQR) GetId() uint32 {
262 if x != nil && x.Id != nil {
263 return *x.Id
264 }
265 return 0
266 }
267
268 func (x *DnsQR) GetQname() []byte {
269 if x != nil {
270 return x.Qname
271 }
272 return nil
273 }
274
275 func (x *DnsQR) GetQtype() uint32 {
276 if x != nil && x.Qtype != nil {
277 return *x.Qtype
278 }
279 return 0
280 }
281
282 func (x *DnsQR) GetQclass() uint32 {
283 if x != nil && x.Qclass != nil {
284 return *x.Qclass
285 }
286 return 0
287 }
288
289 func (x *DnsQR) GetRcode() uint32 {
290 if x != nil && x.Rcode != nil {
291 return *x.Rcode
292 }
293 return 0
294 }
295
296 func (x *DnsQR) GetQueryPacket() [][]byte {
297 if x != nil {
298 return x.QueryPacket
299 }
300 return nil
301 }
302
303 func (x *DnsQR) GetQueryTimeSec() []int64 {
304 if x != nil {
305 return x.QueryTimeSec
306 }
307 return nil
308 }
309
310 func (x *DnsQR) GetQueryTimeNsec() []int32 {
311 if x != nil {
312 return x.QueryTimeNsec
313 }
314 return nil
315 }
316
317 func (x *DnsQR) GetResponsePacket() [][]byte {
318 if x != nil {
319 return x.ResponsePacket
320 }
321 return nil
322 }
323
324 func (x *DnsQR) GetResponseTimeSec() []int64 {
325 if x != nil {
326 return x.ResponseTimeSec
327 }
328 return nil
329 }
330
331 func (x *DnsQR) GetResponseTimeNsec() []int32 {
332 if x != nil {
333 return x.ResponseTimeNsec
334 }
335 return nil
336 }
337
338 func (x *DnsQR) GetTcp() []byte {
339 if x != nil {
340 return x.Tcp
341 }
342 return nil
343 }
344
345 func (x *DnsQR) GetIcmp() []byte {
346 if x != nil {
347 return x.Icmp
348 }
349 return nil
350 }
351
352 func (x *DnsQR) GetTimeout() float64 {
353 if x != nil && x.Timeout != nil {
354 return *x.Timeout
355 }
356 return 0
357 }
358
359 func (x *DnsQR) GetUdpChecksum() DnsQR_UdpChecksum {
360 if x != nil && x.UdpChecksum != nil {
361 return *x.UdpChecksum
362 }
363 return DnsQR_ERROR
364 }
365
366 func (x *DnsQR) GetResolverAddressZeroed() bool {
367 if x != nil && x.ResolverAddressZeroed != nil {
368 return *x.ResolverAddressZeroed
288369 }
289370 return false
290371 }
291372
292 func init() {
293 proto.RegisterType((*DnsQR)(nil), "nmsg.base.DnsQR")
294 proto.RegisterEnum("nmsg.base.DnsQRType", DnsQRType_name, DnsQRType_value)
295 proto.RegisterEnum("nmsg.base.UdpChecksum", UdpChecksum_name, UdpChecksum_value)
296 }
297
298 func init() { proto.RegisterFile("dnsqr.proto", fileDescriptor1) }
299
300 var fileDescriptor1 = []byte{
301 // 491 bytes of a gzipped FileDescriptorProto
302 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x54, 0x92, 0xdb, 0x6e, 0x9b, 0x40,
303 0x10, 0x86, 0x6b, 0xe3, 0xe3, 0x70, 0xf4, 0xc6, 0x71, 0xb6, 0x55, 0xa5, 0x5a, 0xb9, 0xaa, 0xa2,
304 0xca, 0x17, 0x79, 0x82, 0xba, 0x98, 0x0b, 0x24, 0x17, 0x1c, 0xc0, 0xad, 0x72, 0x85, 0x28, 0xac,
305 0x5a, 0x2b, 0xe1, 0xb8, 0xb8, 0x52, 0xfa, 0x48, 0x7d, 0xb1, 0xbe, 0x46, 0x87, 0x25, 0xc1, 0xce,
306 0x1d, 0xf3, 0xfd, 0x33, 0xff, 0xfc, 0xcb, 0x2e, 0xc8, 0x49, 0xc6, 0xcb, 0x6a, 0x55, 0x54, 0x79,
307 0x9d, 0x93, 0x69, 0x96, 0xf2, 0x9f, 0xab, 0x1f, 0x11, 0x67, 0xd7, 0xff, 0x24, 0x18, 0x6e, 0x32,
308 0x7e, 0xe7, 0x91, 0x6b, 0x18, 0xd4, 0x4f, 0x05, 0xa3, 0xbd, 0x65, 0xff, 0xa3, 0x76, 0x3b, 0x5f,
309 0x75, 0x3d, 0x2b, 0xa1, 0x07, 0xa8, 0x11, 0x03, 0x26, 0xe5, 0x91, 0x55, 0x4f, 0xe1, 0xa1, 0xa0,
310 0x7d, 0xec, 0x53, 0xc8, 0x05, 0xc8, 0x15, 0xe3, 0x45, 0x9e, 0x71, 0xd6, 0x40, 0x49, 0x40, 0x15,
311 0x86, 0x62, 0x11, 0x1d, 0x60, 0xa9, 0x12, 0x02, 0xd0, 0x4e, 0x15, 0x79, 0x55, 0xd3, 0xa1, 0x60,
312 0x97, 0xa0, 0x76, 0x73, 0x02, 0x8f, 0x04, 0x06, 0xe8, 0x1f, 0x12, 0x3a, 0x16, 0xdf, 0xe8, 0x52,
313 0x66, 0x51, 0xca, 0xe8, 0x64, 0xd9, 0x6b, 0x4d, 0x4b, 0x11, 0x70, 0x8a, 0xa5, 0x4a, 0x34, 0x18,
314 0x95, 0xf1, 0x63, 0xc4, 0x39, 0x05, 0x51, 0xa3, 0x5c, 0xc5, 0x79, 0xc2, 0xa8, 0x2c, 0xca, 0x39,
315 0x28, 0xcf, 0x3b, 0xa3, 0xf8, 0x81, 0xd5, 0x54, 0x59, 0x4a, 0xe8, 0xb1, 0x00, 0xad, 0xa5, 0xf5,
316 0x21, 0x65, 0x21, 0x67, 0x31, 0x55, 0x91, 0x4b, 0xe4, 0x0a, 0xf4, 0x33, 0x9e, 0x35, 0x82, 0x86,
317 0x82, 0xde, 0x08, 0xa7, 0x98, 0xad, 0x93, 0x2e, 0x9c, 0xde, 0xc2, 0xac, 0x13, 0x3a, 0x33, 0x43,
318 0x98, 0xbd, 0x03, 0xf2, 0x5a, 0x12, 0x7e, 0x33, 0xe1, 0x27, 0x83, 0x54, 0xc7, 0x05, 0x25, 0xe2,
319 0x44, 0x0a, 0x0c, 0x0e, 0x71, 0x5a, 0xd0, 0x0b, 0x51, 0xe9, 0x30, 0x6e, 0xba, 0xf3, 0x63, 0x4d,
320 0xe7, 0x08, 0x7a, 0xe4, 0x13, 0x28, 0xc7, 0xa4, 0x08, 0xe3, 0x5f, 0x2c, 0x7e, 0xe0, 0xc7, 0x94,
321 0x5e, 0x22, 0xd5, 0x6e, 0x17, 0x67, 0x17, 0xb3, 0x4f, 0x0a, 0xf3, 0x59, 0x25, 0x1f, 0xe0, 0x0a,
322 0xb7, 0xe6, 0x8f, 0xbf, 0x59, 0x15, 0x46, 0x49, 0x82, 0xdf, 0x3c, 0xfc, 0xc3, 0xaa, 0x9c, 0x25,
323 0x74, 0x81, 0x83, 0x93, 0x9b, 0xbf, 0x3d, 0x98, 0x9e, 0x6e, 0x52, 0x07, 0x79, 0xbf, 0xd9, 0x85,
324 0xb6, 0xf3, 0x6d, 0xbd, 0xb5, 0x37, 0xc6, 0x1b, 0xfc, 0x35, 0xa4, 0x01, 0x77, 0x7b, 0xcb, 0xbb,
325 0x0f, 0x3d, 0xcb, 0xdf, 0xb9, 0x8e, 0x6f, 0x19, 0x3d, 0x42, 0x61, 0xde, 0xf0, 0xbd, 0xb3, 0x76,
326 0xfc, 0xef, 0x96, 0x67, 0x6d, 0xda, 0x16, 0xa3, 0x4f, 0xde, 0x03, 0x6d, 0x15, 0xdf, 0xdd, 0xda,
327 0xa6, 0x1d, 0xa0, 0xd4, 0xcd, 0x49, 0x64, 0x0c, 0x52, 0x60, 0xee, 0x8c, 0x01, 0x99, 0xc0, 0xc0,
328 0x36, 0xbf, 0xee, 0x8c, 0x21, 0xbe, 0x03, 0xed, 0xb4, 0xc2, 0x75, 0xb6, 0xf7, 0xc6, 0x08, 0xdf,
329 0xc1, 0xac, 0x61, 0x2f, 0x83, 0x2d, 0x1e, 0xdf, 0x7c, 0xc6, 0x78, 0x67, 0x87, 0x9b, 0xc2, 0xd0,
330 0xf2, 0x3c, 0xd7, 0xc3, 0x9c, 0x00, 0xa3, 0xf5, 0x17, 0xdf, 0x72, 0x02, 0xcc, 0xa6, 0xc2, 0xd4,
331 0x76, 0x4c, 0xd7, 0xf3, 0x2c, 0x33, 0xc0, 0x40, 0x32, 0x8c, 0x5f, 0x0a, 0xe9, 0x7f, 0x00, 0x00,
332 0x00, 0xff, 0xff, 0x04, 0x82, 0x9b, 0xdb, 0xf1, 0x02, 0x00, 0x00,
333 }
373 var File_dnsqr_proto protoreflect.FileDescriptor
374
375 var file_dnsqr_proto_rawDesc = []byte{
376 0x0a, 0x0b, 0x64, 0x6e, 0x73, 0x71, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e,
377 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0xd3, 0x07, 0x0a, 0x05, 0x44, 0x6e, 0x73,
378 0x51, 0x52, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e,
379 0x32, 0x1a, 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x44, 0x6e, 0x73,
380 0x51, 0x52, 0x2e, 0x44, 0x6e, 0x73, 0x51, 0x52, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
381 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x70, 0x18, 0x02,
382 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x70, 0x12, 0x1f, 0x0a,
383 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x02,
384 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x70, 0x12, 0x14,
385 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x70,
386 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x6f,
387 0x72, 0x74, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50,
388 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f,
389 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70,
390 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07,
391 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x6e, 0x61, 0x6d,
392 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,
393 0x0a, 0x05, 0x71, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x71,
394 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x71, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x0a,
395 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x71, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05,
396 0x72, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x63, 0x6f,
397 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b,
398 0x65, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50,
399 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74,
400 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c, 0x71,
401 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0f, 0x71,
402 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x0e,
403 0x20, 0x03, 0x28, 0x0f, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x4e,
404 0x73, 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f,
405 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65,
406 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11,
407 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65,
408 0x63, 0x18, 0x10, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
409 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70,
410 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x11,
411 0x20, 0x03, 0x28, 0x0f, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69,
412 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x12, 0x20,
413 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6d, 0x70,
414 0x18, 0x13, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x63, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07,
415 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x74,
416 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x75, 0x64, 0x70, 0x5f, 0x63, 0x68,
417 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6e,
418 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x51, 0x52, 0x2e, 0x55,
419 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x0b, 0x75, 0x64, 0x70, 0x43,
420 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x6f, 0x6c,
421 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x7a, 0x65, 0x72, 0x6f,
422 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76,
423 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5a, 0x65, 0x72, 0x6f, 0x65, 0x64, 0x22,
424 0xaa, 0x01, 0x0a, 0x09, 0x44, 0x6e, 0x73, 0x51, 0x52, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a,
425 0x0b, 0x55, 0x44, 0x50, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x16,
426 0x0a, 0x12, 0x55, 0x44, 0x50, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x50,
427 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x44, 0x50, 0x5f, 0x55, 0x4e,
428 0x41, 0x4e, 0x53, 0x57, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x02,
429 0x12, 0x1c, 0x0a, 0x18, 0x55, 0x44, 0x50, 0x5f, 0x55, 0x4e, 0x53, 0x4f, 0x4c, 0x49, 0x43, 0x49,
430 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x03, 0x12, 0x07,
431 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x43, 0x4d, 0x50, 0x10,
432 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x44, 0x50, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x4f,
433 0x4e, 0x4c, 0x59, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x44, 0x50, 0x5f, 0x52, 0x45, 0x53,
434 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x07, 0x22, 0x40, 0x0a, 0x0b,
435 0x55, 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x45,
436 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x42, 0x53, 0x45, 0x4e, 0x54,
437 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x10,
438 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x42, 0x2a,
439 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72,
440 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67,
441 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
442 }
443
444 var (
445 file_dnsqr_proto_rawDescOnce sync.Once
446 file_dnsqr_proto_rawDescData = file_dnsqr_proto_rawDesc
447 )
448
449 func file_dnsqr_proto_rawDescGZIP() []byte {
450 file_dnsqr_proto_rawDescOnce.Do(func() {
451 file_dnsqr_proto_rawDescData = protoimpl.X.CompressGZIP(file_dnsqr_proto_rawDescData)
452 })
453 return file_dnsqr_proto_rawDescData
454 }
455
456 var file_dnsqr_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
457 var file_dnsqr_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
458 var file_dnsqr_proto_goTypes = []interface{}{
459 (DnsQR_DnsQRType)(0), // 0: nmsg.base.DnsQR.DnsQRType
460 (DnsQR_UdpChecksum)(0), // 1: nmsg.base.DnsQR.UdpChecksum
461 (*DnsQR)(nil), // 2: nmsg.base.DnsQR
462 }
463 var file_dnsqr_proto_depIdxs = []int32{
464 0, // 0: nmsg.base.DnsQR.type:type_name -> nmsg.base.DnsQR.DnsQRType
465 1, // 1: nmsg.base.DnsQR.udp_checksum:type_name -> nmsg.base.DnsQR.UdpChecksum
466 2, // [2:2] is the sub-list for method output_type
467 2, // [2:2] is the sub-list for method input_type
468 2, // [2:2] is the sub-list for extension type_name
469 2, // [2:2] is the sub-list for extension extendee
470 0, // [0:2] is the sub-list for field type_name
471 }
472
473 func init() { file_dnsqr_proto_init() }
474 func file_dnsqr_proto_init() {
475 if File_dnsqr_proto != nil {
476 return
477 }
478 if !protoimpl.UnsafeEnabled {
479 file_dnsqr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
480 switch v := v.(*DnsQR); i {
481 case 0:
482 return &v.state
483 case 1:
484 return &v.sizeCache
485 case 2:
486 return &v.unknownFields
487 default:
488 return nil
489 }
490 }
491 }
492 type x struct{}
493 out := protoimpl.TypeBuilder{
494 File: protoimpl.DescBuilder{
495 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
496 RawDescriptor: file_dnsqr_proto_rawDesc,
497 NumEnums: 2,
498 NumMessages: 1,
499 NumExtensions: 0,
500 NumServices: 0,
501 },
502 GoTypes: file_dnsqr_proto_goTypes,
503 DependencyIndexes: file_dnsqr_proto_depIdxs,
504 EnumInfos: file_dnsqr_proto_enumTypes,
505 MessageInfos: file_dnsqr_proto_msgTypes,
506 }.Build()
507 File_dnsqr_proto = out.File
508 file_dnsqr_proto_rawDesc = nil
509 file_dnsqr_proto_goTypes = nil
510 file_dnsqr_proto_depIdxs = nil
511 }
00 syntax = "proto2";
11 package nmsg.base;
2
3 enum DnsQRType {
4 UDP_INVALID = 0;
5 UDP_QUERY_RESPONSE = 1;
6 UDP_UNANSWERED_QUERY = 2;
7 UDP_UNSOLICITED_RESPONSE = 3;
8 TCP = 4;
9 ICMP = 5;
10 UDP_QUERY_ONLY = 6;
11 UDP_RESPONSE_ONLY = 7;
12 }
13
14 enum UdpChecksum {
15 ERROR = 0;
16 ABSENT = 1;
17 INCORRECT = 2;
18 CORRECT = 3;
19 }
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
203
214 message DnsQR {
5 enum DnsQRType {
6 UDP_INVALID = 0;
7 UDP_QUERY_RESPONSE = 1;
8 UDP_UNANSWERED_QUERY = 2;
9 UDP_UNSOLICITED_RESPONSE = 3;
10 TCP = 4;
11 ICMP = 5;
12 UDP_QUERY_ONLY = 6;
13 UDP_RESPONSE_ONLY = 7;
14 }
15
16 enum UdpChecksum {
17 ERROR = 0;
18 ABSENT = 1;
19 INCORRECT = 2;
20 CORRECT = 3;
21 }
22
2223 required DnsQRType type = 1;
2324
2425 // the 9-tuple
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: email.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
14
15 type EmailType int32
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
1614
1715 const (
18 EmailType_unknown EmailType = 0
19 EmailType_spamtrap EmailType = 1
20 EmailType_rej_network EmailType = 2
21 EmailType_rej_content EmailType = 3
22 EmailType_rej_user EmailType = 4
23 )
24
25 var EmailType_name = map[int32]string{
26 0: "unknown",
27 1: "spamtrap",
28 2: "rej_network",
29 3: "rej_content",
30 4: "rej_user",
31 }
32 var EmailType_value = map[string]int32{
33 "unknown": 0,
34 "spamtrap": 1,
35 "rej_network": 2,
36 "rej_content": 3,
37 "rej_user": 4,
38 }
39
40 func (x EmailType) Enum() *EmailType {
41 p := new(EmailType)
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 type Email_EmailType int32
23
24 const (
25 Email_unknown Email_EmailType = 0
26 Email_spamtrap Email_EmailType = 1
27 Email_rej_network Email_EmailType = 2
28 Email_rej_content Email_EmailType = 3
29 Email_rej_user Email_EmailType = 4
30 )
31
32 // Enum value maps for Email_EmailType.
33 var (
34 Email_EmailType_name = map[int32]string{
35 0: "unknown",
36 1: "spamtrap",
37 2: "rej_network",
38 3: "rej_content",
39 4: "rej_user",
40 }
41 Email_EmailType_value = map[string]int32{
42 "unknown": 0,
43 "spamtrap": 1,
44 "rej_network": 2,
45 "rej_content": 3,
46 "rej_user": 4,
47 }
48 )
49
50 func (x Email_EmailType) Enum() *Email_EmailType {
51 p := new(Email_EmailType)
4252 *p = x
4353 return p
4454 }
45 func (x EmailType) String() string {
46 return proto.EnumName(EmailType_name, int32(x))
47 }
48 func (x *EmailType) UnmarshalJSON(data []byte) error {
49 value, err := proto.UnmarshalJSONEnum(EmailType_value, data, "EmailType")
55
56 func (x Email_EmailType) String() string {
57 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
58 }
59
60 func (Email_EmailType) Descriptor() protoreflect.EnumDescriptor {
61 return file_email_proto_enumTypes[0].Descriptor()
62 }
63
64 func (Email_EmailType) Type() protoreflect.EnumType {
65 return &file_email_proto_enumTypes[0]
66 }
67
68 func (x Email_EmailType) Number() protoreflect.EnumNumber {
69 return protoreflect.EnumNumber(x)
70 }
71
72 // Deprecated: Do not use.
73 func (x *Email_EmailType) UnmarshalJSON(b []byte) error {
74 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
5075 if err != nil {
5176 return err
5277 }
53 *x = EmailType(value)
54 return nil
55 }
56 func (EmailType) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
78 *x = Email_EmailType(num)
79 return nil
80 }
81
82 // Deprecated: Use Email_EmailType.Descriptor instead.
83 func (Email_EmailType) EnumDescriptor() ([]byte, []int) {
84 return file_email_proto_rawDescGZIP(), []int{0, 0}
85 }
5786
5887 type Email struct {
59 Type *EmailType `protobuf:"varint,8,opt,name=type,enum=nmsg.base.EmailType" json:"type,omitempty"`
60 Headers []byte `protobuf:"bytes,2,opt,name=headers" json:"headers,omitempty"`
61 Srcip []byte `protobuf:"bytes,3,opt,name=srcip" json:"srcip,omitempty"`
62 Srchost []byte `protobuf:"bytes,4,opt,name=srchost" json:"srchost,omitempty"`
63 Helo []byte `protobuf:"bytes,5,opt,name=helo" json:"helo,omitempty"`
64 From []byte `protobuf:"bytes,6,opt,name=from" json:"from,omitempty"`
65 Rcpt [][]byte `protobuf:"bytes,7,rep,name=rcpt" json:"rcpt,omitempty"`
66 Bodyurl [][]byte `protobuf:"bytes,9,rep,name=bodyurl" json:"bodyurl,omitempty"`
67 Body []byte `protobuf:"bytes,10,opt,name=body" json:"body,omitempty"`
68 XXX_unrecognized []byte `json:"-"`
69 }
70
71 func (m *Email) Reset() { *m = Email{} }
72 func (m *Email) String() string { return proto.CompactTextString(m) }
73 func (*Email) ProtoMessage() {}
74 func (*Email) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
75
76 func (m *Email) GetType() EmailType {
77 if m != nil && m.Type != nil {
78 return *m.Type
79 }
80 return EmailType_unknown
81 }
82
83 func (m *Email) GetHeaders() []byte {
84 if m != nil {
85 return m.Headers
86 }
87 return nil
88 }
89
90 func (m *Email) GetSrcip() []byte {
91 if m != nil {
92 return m.Srcip
93 }
94 return nil
95 }
96
97 func (m *Email) GetSrchost() []byte {
98 if m != nil {
99 return m.Srchost
100 }
101 return nil
102 }
103
104 func (m *Email) GetHelo() []byte {
105 if m != nil {
106 return m.Helo
107 }
108 return nil
109 }
110
111 func (m *Email) GetFrom() []byte {
112 if m != nil {
113 return m.From
114 }
115 return nil
116 }
117
118 func (m *Email) GetRcpt() [][]byte {
119 if m != nil {
120 return m.Rcpt
121 }
122 return nil
123 }
124
125 func (m *Email) GetBodyurl() [][]byte {
126 if m != nil {
127 return m.Bodyurl
128 }
129 return nil
130 }
131
132 func (m *Email) GetBody() []byte {
133 if m != nil {
134 return m.Body
135 }
136 return nil
137 }
138
139 func init() {
140 proto.RegisterType((*Email)(nil), "nmsg.base.Email")
141 proto.RegisterEnum("nmsg.base.EmailType", EmailType_name, EmailType_value)
142 }
143
144 func init() { proto.RegisterFile("email.proto", fileDescriptor2) }
145
146 var fileDescriptor2 = []byte{
147 // 222 bytes of a gzipped FileDescriptorProto
148 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0x8e, 0x41, 0x4e, 0xc3, 0x30,
149 0x10, 0x45, 0x49, 0x93, 0x90, 0x66, 0x52, 0xc0, 0x8a, 0x58, 0xcc, 0xb2, 0xea, 0x0a, 0xb1, 0xc8,
150 0x82, 0x3b, 0x70, 0x03, 0xc4, 0x16, 0xb9, 0xe9, 0x40, 0x4a, 0x13, 0x8f, 0x35, 0x76, 0x54, 0xf5,
151 0x40, 0xdc, 0x13, 0xdb, 0x28, 0x74, 0xf9, 0xdf, 0x7b, 0xb6, 0x06, 0x1a, 0x9a, 0xf4, 0x71, 0xec,
152 0xac, 0xb0, 0xe7, 0xb6, 0x36, 0x93, 0xfb, 0xea, 0xf6, 0xda, 0xd1, 0xee, 0x27, 0x83, 0xf2, 0x35,
153 0xaa, 0x76, 0x07, 0x85, 0xbf, 0x58, 0xc2, 0xf5, 0x36, 0x7b, 0xba, 0x7f, 0x79, 0xec, 0xfe, 0x9b,
154 0x2e, 0xf9, 0xb7, 0xe0, 0xda, 0x07, 0xa8, 0x06, 0xd2, 0x07, 0x12, 0x87, 0xab, 0x90, 0x6d, 0xda,
155 0x3b, 0x28, 0x9d, 0xf4, 0x47, 0x8b, 0x79, 0x9a, 0xc1, 0x87, 0x39, 0xb0, 0xf3, 0x58, 0x24, 0xb0,
156 0x81, 0x62, 0xa0, 0x91, 0xb1, 0x5c, 0xd6, 0xa7, 0xf0, 0x84, 0xb7, 0xcb, 0x92, 0xde, 0x7a, 0xac,
157 0xb6, 0xf9, 0xdf, 0xd3, 0x3d, 0x1f, 0x2e, 0xb3, 0x8c, 0x58, 0x27, 0x10, 0x74, 0x04, 0x08, 0x31,
158 0x7e, 0x7e, 0x87, 0xfa, 0x7a, 0x46, 0x03, 0xd5, 0x6c, 0x4e, 0x86, 0xcf, 0x46, 0xdd, 0x84, 0x6e,
159 0xed, 0xac, 0x9e, 0xbc, 0x68, 0xab, 0xb2, 0xf0, 0x4d, 0x23, 0xf4, 0xfd, 0x61, 0xc8, 0x9f, 0x59,
160 0x4e, 0x6a, 0xb5, 0x80, 0x9e, 0x8d, 0x27, 0xe3, 0x55, 0x1e, 0xfb, 0x08, 0x66, 0x47, 0xa2, 0x8a,
161 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0xe2, 0x02, 0x36, 0x18, 0x01, 0x00, 0x00,
162 }
88 state protoimpl.MessageState
89 sizeCache protoimpl.SizeCache
90 unknownFields protoimpl.UnknownFields
91
92 Type *Email_EmailType `protobuf:"varint,8,opt,name=type,enum=nmsg.base.Email_EmailType" json:"type,omitempty"`
93 Headers []byte `protobuf:"bytes,2,opt,name=headers" json:"headers,omitempty"`
94 Srcip []byte `protobuf:"bytes,3,opt,name=srcip" json:"srcip,omitempty"`
95 Srchost []byte `protobuf:"bytes,4,opt,name=srchost" json:"srchost,omitempty"`
96 Helo []byte `protobuf:"bytes,5,opt,name=helo" json:"helo,omitempty"`
97 From []byte `protobuf:"bytes,6,opt,name=from" json:"from,omitempty"`
98 Rcpt [][]byte `protobuf:"bytes,7,rep,name=rcpt" json:"rcpt,omitempty"`
99 Bodyurl [][]byte `protobuf:"bytes,9,rep,name=bodyurl" json:"bodyurl,omitempty"`
100 Body []byte `protobuf:"bytes,10,opt,name=body" json:"body,omitempty"`
101 }
102
103 func (x *Email) Reset() {
104 *x = Email{}
105 if protoimpl.UnsafeEnabled {
106 mi := &file_email_proto_msgTypes[0]
107 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
108 ms.StoreMessageInfo(mi)
109 }
110 }
111
112 func (x *Email) String() string {
113 return protoimpl.X.MessageStringOf(x)
114 }
115
116 func (*Email) ProtoMessage() {}
117
118 func (x *Email) ProtoReflect() protoreflect.Message {
119 mi := &file_email_proto_msgTypes[0]
120 if protoimpl.UnsafeEnabled && x != nil {
121 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
122 if ms.LoadMessageInfo() == nil {
123 ms.StoreMessageInfo(mi)
124 }
125 return ms
126 }
127 return mi.MessageOf(x)
128 }
129
130 // Deprecated: Use Email.ProtoReflect.Descriptor instead.
131 func (*Email) Descriptor() ([]byte, []int) {
132 return file_email_proto_rawDescGZIP(), []int{0}
133 }
134
135 func (x *Email) GetType() Email_EmailType {
136 if x != nil && x.Type != nil {
137 return *x.Type
138 }
139 return Email_unknown
140 }
141
142 func (x *Email) GetHeaders() []byte {
143 if x != nil {
144 return x.Headers
145 }
146 return nil
147 }
148
149 func (x *Email) GetSrcip() []byte {
150 if x != nil {
151 return x.Srcip
152 }
153 return nil
154 }
155
156 func (x *Email) GetSrchost() []byte {
157 if x != nil {
158 return x.Srchost
159 }
160 return nil
161 }
162
163 func (x *Email) GetHelo() []byte {
164 if x != nil {
165 return x.Helo
166 }
167 return nil
168 }
169
170 func (x *Email) GetFrom() []byte {
171 if x != nil {
172 return x.From
173 }
174 return nil
175 }
176
177 func (x *Email) GetRcpt() [][]byte {
178 if x != nil {
179 return x.Rcpt
180 }
181 return nil
182 }
183
184 func (x *Email) GetBodyurl() [][]byte {
185 if x != nil {
186 return x.Bodyurl
187 }
188 return nil
189 }
190
191 func (x *Email) GetBody() []byte {
192 if x != nil {
193 return x.Body
194 }
195 return nil
196 }
197
198 var File_email_proto protoreflect.FileDescriptor
199
200 var file_email_proto_rawDesc = []byte{
201 0x0a, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e,
202 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0xc3, 0x02, 0x0a, 0x05, 0x45, 0x6d, 0x61,
203 0x69, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e,
204 0x32, 0x1a, 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x45, 0x6d, 0x61,
205 0x69, 0x6c, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
206 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20,
207 0x01, 0x28, 0x0c, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05,
208 0x73, 0x72, 0x63, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x72, 0x63,
209 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20,
210 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x72, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
211 0x68, 0x65, 0x6c, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x6f,
212 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04,
213 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x63, 0x70, 0x74, 0x18, 0x07, 0x20, 0x03,
214 0x28, 0x0c, 0x52, 0x04, 0x72, 0x63, 0x70, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6f, 0x64, 0x79,
215 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6f, 0x64, 0x79, 0x75,
216 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c,
217 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x56, 0x0a, 0x09, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x54,
218 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00,
219 0x12, 0x0c, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x6d, 0x74, 0x72, 0x61, 0x70, 0x10, 0x01, 0x12, 0x0f,
220 0x0a, 0x0b, 0x72, 0x65, 0x6a, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x10, 0x02, 0x12,
221 0x0f, 0x0a, 0x0b, 0x72, 0x65, 0x6a, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0x03,
222 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x6a, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x10, 0x04, 0x42, 0x2a,
223 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72,
224 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67,
225 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
226 }
227
228 var (
229 file_email_proto_rawDescOnce sync.Once
230 file_email_proto_rawDescData = file_email_proto_rawDesc
231 )
232
233 func file_email_proto_rawDescGZIP() []byte {
234 file_email_proto_rawDescOnce.Do(func() {
235 file_email_proto_rawDescData = protoimpl.X.CompressGZIP(file_email_proto_rawDescData)
236 })
237 return file_email_proto_rawDescData
238 }
239
240 var file_email_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
241 var file_email_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
242 var file_email_proto_goTypes = []interface{}{
243 (Email_EmailType)(0), // 0: nmsg.base.Email.EmailType
244 (*Email)(nil), // 1: nmsg.base.Email
245 }
246 var file_email_proto_depIdxs = []int32{
247 0, // 0: nmsg.base.Email.type:type_name -> nmsg.base.Email.EmailType
248 1, // [1:1] is the sub-list for method output_type
249 1, // [1:1] is the sub-list for method input_type
250 1, // [1:1] is the sub-list for extension type_name
251 1, // [1:1] is the sub-list for extension extendee
252 0, // [0:1] is the sub-list for field type_name
253 }
254
255 func init() { file_email_proto_init() }
256 func file_email_proto_init() {
257 if File_email_proto != nil {
258 return
259 }
260 if !protoimpl.UnsafeEnabled {
261 file_email_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
262 switch v := v.(*Email); i {
263 case 0:
264 return &v.state
265 case 1:
266 return &v.sizeCache
267 case 2:
268 return &v.unknownFields
269 default:
270 return nil
271 }
272 }
273 }
274 type x struct{}
275 out := protoimpl.TypeBuilder{
276 File: protoimpl.DescBuilder{
277 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
278 RawDescriptor: file_email_proto_rawDesc,
279 NumEnums: 1,
280 NumMessages: 1,
281 NumExtensions: 0,
282 NumServices: 0,
283 },
284 GoTypes: file_email_proto_goTypes,
285 DependencyIndexes: file_email_proto_depIdxs,
286 EnumInfos: file_email_proto_enumTypes,
287 MessageInfos: file_email_proto_msgTypes,
288 }.Build()
289 File_email_proto = out.File
290 file_email_proto_rawDesc = nil
291 file_email_proto_goTypes = nil
292 file_email_proto_depIdxs = nil
293 }
00 syntax = "proto2";
11 package nmsg.base;
2
3 enum EmailType {
4 unknown = 0;
5 spamtrap = 1;
6 rej_network = 2;
7 rej_content = 3;
8 rej_user = 4;
9 }
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
103
114 message Email {
5 enum EmailType {
6 unknown = 0;
7 spamtrap = 1;
8 rej_network = 2;
9 rej_content = 3;
10 rej_user = 4;
11 }
12
1213 optional EmailType type = 8;
1314 optional bytes headers = 2;
1415 optional bytes srcip = 3;
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: encode.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
14
15 type EncodeType int32
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
1614
1715 const (
18 EncodeType_TEXT EncodeType = 0
19 EncodeType_JSON EncodeType = 1
20 EncodeType_YAML EncodeType = 2
21 EncodeType_MSGPACK EncodeType = 3
22 EncodeType_XML EncodeType = 4
23 )
24
25 var EncodeType_name = map[int32]string{
26 0: "TEXT",
27 1: "JSON",
28 2: "YAML",
29 3: "MSGPACK",
30 4: "XML",
31 }
32 var EncodeType_value = map[string]int32{
33 "TEXT": 0,
34 "JSON": 1,
35 "YAML": 2,
36 "MSGPACK": 3,
37 "XML": 4,
38 }
39
40 func (x EncodeType) Enum() *EncodeType {
41 p := new(EncodeType)
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 type Encode_EncodeType int32
23
24 const (
25 Encode_TEXT Encode_EncodeType = 0
26 Encode_JSON Encode_EncodeType = 1
27 Encode_YAML Encode_EncodeType = 2
28 Encode_MSGPACK Encode_EncodeType = 3
29 Encode_XML Encode_EncodeType = 4
30 )
31
32 // Enum value maps for Encode_EncodeType.
33 var (
34 Encode_EncodeType_name = map[int32]string{
35 0: "TEXT",
36 1: "JSON",
37 2: "YAML",
38 3: "MSGPACK",
39 4: "XML",
40 }
41 Encode_EncodeType_value = map[string]int32{
42 "TEXT": 0,
43 "JSON": 1,
44 "YAML": 2,
45 "MSGPACK": 3,
46 "XML": 4,
47 }
48 )
49
50 func (x Encode_EncodeType) Enum() *Encode_EncodeType {
51 p := new(Encode_EncodeType)
4252 *p = x
4353 return p
4454 }
45 func (x EncodeType) String() string {
46 return proto.EnumName(EncodeType_name, int32(x))
47 }
48 func (x *EncodeType) UnmarshalJSON(data []byte) error {
49 value, err := proto.UnmarshalJSONEnum(EncodeType_value, data, "EncodeType")
55
56 func (x Encode_EncodeType) String() string {
57 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
58 }
59
60 func (Encode_EncodeType) Descriptor() protoreflect.EnumDescriptor {
61 return file_encode_proto_enumTypes[0].Descriptor()
62 }
63
64 func (Encode_EncodeType) Type() protoreflect.EnumType {
65 return &file_encode_proto_enumTypes[0]
66 }
67
68 func (x Encode_EncodeType) Number() protoreflect.EnumNumber {
69 return protoreflect.EnumNumber(x)
70 }
71
72 // Deprecated: Do not use.
73 func (x *Encode_EncodeType) UnmarshalJSON(b []byte) error {
74 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
5075 if err != nil {
5176 return err
5277 }
53 *x = EncodeType(value)
78 *x = Encode_EncodeType(num)
5479 return nil
5580 }
56 func (EncodeType) EnumDescriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
81
82 // Deprecated: Use Encode_EncodeType.Descriptor instead.
83 func (Encode_EncodeType) EnumDescriptor() ([]byte, []int) {
84 return file_encode_proto_rawDescGZIP(), []int{0, 0}
85 }
5786
5887 type Encode struct {
59 Type *EncodeType `protobuf:"varint,1,req,name=type,enum=nmsg.base.EncodeType" json:"type,omitempty"`
60 Payload []byte `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
61 XXX_unrecognized []byte `json:"-"`
62 }
63
64 func (m *Encode) Reset() { *m = Encode{} }
65 func (m *Encode) String() string { return proto.CompactTextString(m) }
66 func (*Encode) ProtoMessage() {}
67 func (*Encode) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
68
69 func (m *Encode) GetType() EncodeType {
70 if m != nil && m.Type != nil {
71 return *m.Type
72 }
73 return EncodeType_TEXT
74 }
75
76 func (m *Encode) GetPayload() []byte {
77 if m != nil {
78 return m.Payload
88 state protoimpl.MessageState
89 sizeCache protoimpl.SizeCache
90 unknownFields protoimpl.UnknownFields
91
92 Type *Encode_EncodeType `protobuf:"varint,1,req,name=type,enum=nmsg.base.Encode_EncodeType" json:"type,omitempty"`
93 Payload []byte `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
94 }
95
96 func (x *Encode) Reset() {
97 *x = Encode{}
98 if protoimpl.UnsafeEnabled {
99 mi := &file_encode_proto_msgTypes[0]
100 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
101 ms.StoreMessageInfo(mi)
102 }
103 }
104
105 func (x *Encode) String() string {
106 return protoimpl.X.MessageStringOf(x)
107 }
108
109 func (*Encode) ProtoMessage() {}
110
111 func (x *Encode) ProtoReflect() protoreflect.Message {
112 mi := &file_encode_proto_msgTypes[0]
113 if protoimpl.UnsafeEnabled && x != nil {
114 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
115 if ms.LoadMessageInfo() == nil {
116 ms.StoreMessageInfo(mi)
117 }
118 return ms
119 }
120 return mi.MessageOf(x)
121 }
122
123 // Deprecated: Use Encode.ProtoReflect.Descriptor instead.
124 func (*Encode) Descriptor() ([]byte, []int) {
125 return file_encode_proto_rawDescGZIP(), []int{0}
126 }
127
128 func (x *Encode) GetType() Encode_EncodeType {
129 if x != nil && x.Type != nil {
130 return *x.Type
131 }
132 return Encode_TEXT
133 }
134
135 func (x *Encode) GetPayload() []byte {
136 if x != nil {
137 return x.Payload
79138 }
80139 return nil
81140 }
82141
83 func init() {
84 proto.RegisterType((*Encode)(nil), "nmsg.base.Encode")
85 proto.RegisterEnum("nmsg.base.EncodeType", EncodeType_name, EncodeType_value)
86 }
87
88 func init() { proto.RegisterFile("encode.proto", fileDescriptor3) }
89
90 var fileDescriptor3 = []byte{
91 // 148 bytes of a gzipped FileDescriptorProto
92 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0xcd, 0x4b, 0xce,
93 0x4f, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b,
94 0x4a, 0x2c, 0x4e, 0x55, 0xb2, 0xe3, 0x62, 0x73, 0x05, 0x4b, 0x09, 0x29, 0x73, 0xb1, 0x94, 0x54,
95 0x16, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0xf0, 0x19, 0x89, 0xea, 0xc1, 0xd5, 0xe8, 0x41, 0x14,
96 0x84, 0x00, 0x25, 0x85, 0xf8, 0xb9, 0xd8, 0x0b, 0x12, 0x2b, 0x73, 0xf2, 0x13, 0x53, 0x24, 0x98,
97 0x80, 0xea, 0x78, 0xb4, 0x1c, 0xb8, 0xb8, 0x90, 0xa4, 0x39, 0xb8, 0x58, 0x42, 0x5c, 0x23, 0x42,
98 0x04, 0x18, 0x40, 0x2c, 0xaf, 0x60, 0x7f, 0x3f, 0x01, 0x46, 0x10, 0x2b, 0xd2, 0xd1, 0xd7, 0x47,
99 0x80, 0x49, 0x88, 0x9b, 0x8b, 0xdd, 0x37, 0xd8, 0x3d, 0xc0, 0xd1, 0xd9, 0x5b, 0x80, 0x59, 0x88,
100 0x9d, 0x8b, 0x39, 0x02, 0x28, 0xca, 0x02, 0x08, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x9e, 0xfe, 0xff,
101 0x9b, 0x00, 0x00, 0x00,
102 }
142 var File_encode_proto protoreflect.FileDescriptor
143
144 var file_encode_proto_rawDesc = []byte{
145 0x0a, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09,
146 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x45, 0x6e,
147 0x63, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02,
148 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x45,
149 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65,
150 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61,
151 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
152 0x22, 0x40, 0x0a, 0x0a, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08,
153 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e,
154 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x59, 0x41, 0x4d, 0x4c, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07,
155 0x4d, 0x53, 0x47, 0x50, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x58, 0x4d, 0x4c,
156 0x10, 0x04, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
157 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d,
158 0x6e, 0x6d, 0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
159 }
160
161 var (
162 file_encode_proto_rawDescOnce sync.Once
163 file_encode_proto_rawDescData = file_encode_proto_rawDesc
164 )
165
166 func file_encode_proto_rawDescGZIP() []byte {
167 file_encode_proto_rawDescOnce.Do(func() {
168 file_encode_proto_rawDescData = protoimpl.X.CompressGZIP(file_encode_proto_rawDescData)
169 })
170 return file_encode_proto_rawDescData
171 }
172
173 var file_encode_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
174 var file_encode_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
175 var file_encode_proto_goTypes = []interface{}{
176 (Encode_EncodeType)(0), // 0: nmsg.base.Encode.EncodeType
177 (*Encode)(nil), // 1: nmsg.base.Encode
178 }
179 var file_encode_proto_depIdxs = []int32{
180 0, // 0: nmsg.base.Encode.type:type_name -> nmsg.base.Encode.EncodeType
181 1, // [1:1] is the sub-list for method output_type
182 1, // [1:1] is the sub-list for method input_type
183 1, // [1:1] is the sub-list for extension type_name
184 1, // [1:1] is the sub-list for extension extendee
185 0, // [0:1] is the sub-list for field type_name
186 }
187
188 func init() { file_encode_proto_init() }
189 func file_encode_proto_init() {
190 if File_encode_proto != nil {
191 return
192 }
193 if !protoimpl.UnsafeEnabled {
194 file_encode_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
195 switch v := v.(*Encode); i {
196 case 0:
197 return &v.state
198 case 1:
199 return &v.sizeCache
200 case 2:
201 return &v.unknownFields
202 default:
203 return nil
204 }
205 }
206 }
207 type x struct{}
208 out := protoimpl.TypeBuilder{
209 File: protoimpl.DescBuilder{
210 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
211 RawDescriptor: file_encode_proto_rawDesc,
212 NumEnums: 1,
213 NumMessages: 1,
214 NumExtensions: 0,
215 NumServices: 0,
216 },
217 GoTypes: file_encode_proto_goTypes,
218 DependencyIndexes: file_encode_proto_depIdxs,
219 EnumInfos: file_encode_proto_enumTypes,
220 MessageInfos: file_encode_proto_msgTypes,
221 }.Build()
222 File_encode_proto = out.File
223 file_encode_proto_rawDesc = nil
224 file_encode_proto_goTypes = nil
225 file_encode_proto_depIdxs = nil
226 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
3 enum EncodeType {
4 TEXT = 0;
5 JSON = 1;
6 YAML = 2;
7 MSGPACK = 3;
8 XML = 4;
9 }
104
115 message Encode {
6 enum EncodeType {
7 TEXT = 0;
8 JSON = 1;
9 YAML = 2;
10 MSGPACK = 3;
11 XML = 4;
12 }
1213 required EncodeType type = 1;
1314 required bytes payload = 2;
1415 }
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: http.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
14
15 type HttpType int32
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
1614
1715 const (
18 // unknown = 0;
19 HttpType_sinkhole HttpType = 1
20 )
21
22 var HttpType_name = map[int32]string{
23 1: "sinkhole",
24 }
25 var HttpType_value = map[string]int32{
26 "sinkhole": 1,
27 }
28
29 func (x HttpType) Enum() *HttpType {
30 p := new(HttpType)
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 type Http_HttpType int32
23
24 const (
25 Http_unknown Http_HttpType = 0
26 Http_sinkhole Http_HttpType = 1
27 )
28
29 // Enum value maps for Http_HttpType.
30 var (
31 Http_HttpType_name = map[int32]string{
32 0: "unknown",
33 1: "sinkhole",
34 }
35 Http_HttpType_value = map[string]int32{
36 "unknown": 0,
37 "sinkhole": 1,
38 }
39 )
40
41 func (x Http_HttpType) Enum() *Http_HttpType {
42 p := new(Http_HttpType)
3143 *p = x
3244 return p
3345 }
34 func (x HttpType) String() string {
35 return proto.EnumName(HttpType_name, int32(x))
36 }
37 func (x *HttpType) UnmarshalJSON(data []byte) error {
38 value, err := proto.UnmarshalJSONEnum(HttpType_value, data, "HttpType")
46
47 func (x Http_HttpType) String() string {
48 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
49 }
50
51 func (Http_HttpType) Descriptor() protoreflect.EnumDescriptor {
52 return file_http_proto_enumTypes[0].Descriptor()
53 }
54
55 func (Http_HttpType) Type() protoreflect.EnumType {
56 return &file_http_proto_enumTypes[0]
57 }
58
59 func (x Http_HttpType) Number() protoreflect.EnumNumber {
60 return protoreflect.EnumNumber(x)
61 }
62
63 // Deprecated: Do not use.
64 func (x *Http_HttpType) UnmarshalJSON(b []byte) error {
65 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
3966 if err != nil {
4067 return err
4168 }
42 *x = HttpType(value)
43 return nil
44 }
45 func (HttpType) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
69 *x = Http_HttpType(num)
70 return nil
71 }
72
73 // Deprecated: Use Http_HttpType.Descriptor instead.
74 func (Http_HttpType) EnumDescriptor() ([]byte, []int) {
75 return file_http_proto_rawDescGZIP(), []int{0, 0}
76 }
4677
4778 type Http struct {
48 Type *HttpType `protobuf:"varint,1,req,name=type,enum=nmsg.base.HttpType" json:"type,omitempty"`
49 Srcip []byte `protobuf:"bytes,2,opt,name=srcip" json:"srcip,omitempty"`
50 Srchost []byte `protobuf:"bytes,3,opt,name=srchost" json:"srchost,omitempty"`
51 Srcport *uint32 `protobuf:"varint,4,opt,name=srcport" json:"srcport,omitempty"`
52 Dstip []byte `protobuf:"bytes,5,opt,name=dstip" json:"dstip,omitempty"`
53 Dstport *uint32 `protobuf:"varint,6,opt,name=dstport" json:"dstport,omitempty"`
54 Request []byte `protobuf:"bytes,7,opt,name=request" json:"request,omitempty"`
55 P0FGenre []byte `protobuf:"bytes,65,opt,name=p0f_genre" json:"p0f_genre,omitempty"`
56 P0FDetail []byte `protobuf:"bytes,66,opt,name=p0f_detail" json:"p0f_detail,omitempty"`
57 P0FDist *int32 `protobuf:"varint,67,opt,name=p0f_dist" json:"p0f_dist,omitempty"`
58 P0FLink []byte `protobuf:"bytes,68,opt,name=p0f_link" json:"p0f_link,omitempty"`
59 P0FTos []byte `protobuf:"bytes,69,opt,name=p0f_tos" json:"p0f_tos,omitempty"`
60 P0FFw *uint32 `protobuf:"varint,70,opt,name=p0f_fw" json:"p0f_fw,omitempty"`
61 P0FNat *uint32 `protobuf:"varint,71,opt,name=p0f_nat" json:"p0f_nat,omitempty"`
62 P0FReal *uint32 `protobuf:"varint,72,opt,name=p0f_real" json:"p0f_real,omitempty"`
63 P0FScore *int32 `protobuf:"varint,73,opt,name=p0f_score" json:"p0f_score,omitempty"`
64 P0FMflags *uint32 `protobuf:"varint,74,opt,name=p0f_mflags" json:"p0f_mflags,omitempty"`
65 P0FUptime *int32 `protobuf:"varint,75,opt,name=p0f_uptime" json:"p0f_uptime,omitempty"`
66 XXX_unrecognized []byte `json:"-"`
67 }
68
69 func (m *Http) Reset() { *m = Http{} }
70 func (m *Http) String() string { return proto.CompactTextString(m) }
71 func (*Http) ProtoMessage() {}
72 func (*Http) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
73
74 func (m *Http) GetType() HttpType {
75 if m != nil && m.Type != nil {
76 return *m.Type
77 }
78 return HttpType_sinkhole
79 }
80
81 func (m *Http) GetSrcip() []byte {
82 if m != nil {
83 return m.Srcip
84 }
85 return nil
86 }
87
88 func (m *Http) GetSrchost() []byte {
89 if m != nil {
90 return m.Srchost
91 }
92 return nil
93 }
94
95 func (m *Http) GetSrcport() uint32 {
96 if m != nil && m.Srcport != nil {
97 return *m.Srcport
98 }
99 return 0
100 }
101
102 func (m *Http) GetDstip() []byte {
103 if m != nil {
104 return m.Dstip
105 }
106 return nil
107 }
108
109 func (m *Http) GetDstport() uint32 {
110 if m != nil && m.Dstport != nil {
111 return *m.Dstport
112 }
113 return 0
114 }
115
116 func (m *Http) GetRequest() []byte {
117 if m != nil {
118 return m.Request
119 }
120 return nil
121 }
122
123 func (m *Http) GetP0FGenre() []byte {
124 if m != nil {
125 return m.P0FGenre
126 }
127 return nil
128 }
129
130 func (m *Http) GetP0FDetail() []byte {
131 if m != nil {
132 return m.P0FDetail
133 }
134 return nil
135 }
136
137 func (m *Http) GetP0FDist() int32 {
138 if m != nil && m.P0FDist != nil {
139 return *m.P0FDist
140 }
141 return 0
142 }
143
144 func (m *Http) GetP0FLink() []byte {
145 if m != nil {
146 return m.P0FLink
147 }
148 return nil
149 }
150
151 func (m *Http) GetP0FTos() []byte {
152 if m != nil {
153 return m.P0FTos
154 }
155 return nil
156 }
157
158 func (m *Http) GetP0FFw() uint32 {
159 if m != nil && m.P0FFw != nil {
160 return *m.P0FFw
161 }
162 return 0
163 }
164
165 func (m *Http) GetP0FNat() uint32 {
166 if m != nil && m.P0FNat != nil {
167 return *m.P0FNat
168 }
169 return 0
170 }
171
172 func (m *Http) GetP0FReal() uint32 {
173 if m != nil && m.P0FReal != nil {
174 return *m.P0FReal
175 }
176 return 0
177 }
178
179 func (m *Http) GetP0FScore() int32 {
180 if m != nil && m.P0FScore != nil {
181 return *m.P0FScore
182 }
183 return 0
184 }
185
186 func (m *Http) GetP0FMflags() uint32 {
187 if m != nil && m.P0FMflags != nil {
188 return *m.P0FMflags
189 }
190 return 0
191 }
192
193 func (m *Http) GetP0FUptime() int32 {
194 if m != nil && m.P0FUptime != nil {
195 return *m.P0FUptime
196 }
197 return 0
198 }
199
200 func init() {
201 proto.RegisterType((*Http)(nil), "nmsg.base.Http")
202 proto.RegisterEnum("nmsg.base.HttpType", HttpType_name, HttpType_value)
203 }
204
205 func init() { proto.RegisterFile("http.proto", fileDescriptor4) }
206
207 var fileDescriptor4 = []byte{
208 // 268 bytes of a gzipped FileDescriptorProto
209 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0xd0, 0x4d, 0x4f, 0xf3, 0x30,
210 0x0c, 0x07, 0x70, 0xb5, 0x4f, 0xbb, 0x75, 0xd6, 0xb6, 0x67, 0x94, 0x8b, 0x8f, 0x83, 0xd3, 0xc4,
211 0xa1, 0x42, 0x7c, 0x03, 0xde, 0x07, 0x5c, 0xb9, 0xa3, 0xb2, 0xa5, 0x2f, 0x22, 0x6d, 0x42, 0xe2,
212 0x09, 0xf1, 0x41, 0xf9, 0x3e, 0x38, 0x56, 0x3b, 0x71, 0xf4, 0xef, 0x6f, 0xc7, 0x56, 0x00, 0x1a,
213 0x22, 0x5b, 0x58, 0x67, 0xc8, 0xe4, 0xb3, 0xbe, 0xf3, 0x75, 0xf1, 0x5e, 0x7a, 0x75, 0xfe, 0x13,
214 0x43, 0xb2, 0xe5, 0x24, 0x3f, 0x83, 0x84, 0xbe, 0xad, 0xc2, 0x68, 0x1d, 0x6f, 0x96, 0x57, 0xa7,
215 0xc5, 0xb1, 0xa5, 0x08, 0xf1, 0x2b, 0x47, 0xf9, 0x02, 0x52, 0xef, 0x76, 0xad, 0xc5, 0x78, 0x1d,
216 0x6d, 0xe6, 0xf9, 0x7f, 0x98, 0x72, 0xd9, 0x18, 0x4f, 0xf8, 0xef, 0x0f, 0x58, 0xe3, 0x08, 0x13,
217 0x86, 0x45, 0x18, 0xd8, 0x7b, 0xe2, 0x81, 0x74, 0xcc, 0xb9, 0x94, 0x7c, 0x22, 0x39, 0x83, 0x53,
218 0x9f, 0x07, 0xc5, 0x2f, 0x4c, 0xa5, 0xe3, 0x04, 0x66, 0xf6, 0xb2, 0x7a, 0xab, 0x55, 0xef, 0x14,
219 0x5e, 0x0b, 0xe5, 0x00, 0x81, 0xf6, 0x8a, 0xca, 0x56, 0xe3, 0x8d, 0xd8, 0x0a, 0x32, 0xb1, 0x96,
220 0x07, 0x6f, 0x59, 0xd2, 0x51, 0x74, 0xdb, 0x7f, 0xe0, 0xdd, 0xb8, 0x2c, 0x08, 0x19, 0x8f, 0xf7,
221 0x02, 0x4b, 0x98, 0x04, 0xa8, 0xbe, 0xf0, 0x61, 0x5c, 0x1e, 0xea, 0xbe, 0x24, 0x7c, 0x14, 0x18,
222 0xde, 0x70, 0xaa, 0xd4, 0xb8, 0x15, 0x19, 0xce, 0xf1, 0x3b, 0xc3, 0xe7, 0x3c, 0xc9, 0xa2, 0xe1,
223 0x9c, 0xae, 0xd2, 0x65, 0xed, 0xf1, 0x59, 0xda, 0x06, 0x3b, 0x58, 0x6a, 0x3b, 0x85, 0x2f, 0xa1,
224 0xef, 0x02, 0x21, 0x3b, 0xfe, 0xdb, 0x1c, 0x32, 0xcf, 0x87, 0x35, 0x46, 0xab, 0x55, 0xf4, 0x1b,
225 0x00, 0x00, 0xff, 0xff, 0xa3, 0x64, 0x11, 0x56, 0x89, 0x01, 0x00, 0x00,
226 }
79 state protoimpl.MessageState
80 sizeCache protoimpl.SizeCache
81 unknownFields protoimpl.UnknownFields
82
83 Type *Http_HttpType `protobuf:"varint,1,req,name=type,enum=nmsg.base.Http_HttpType" json:"type,omitempty"`
84 Srcip []byte `protobuf:"bytes,2,opt,name=srcip" json:"srcip,omitempty"`
85 Srchost []byte `protobuf:"bytes,3,opt,name=srchost" json:"srchost,omitempty"`
86 Srcport *uint32 `protobuf:"varint,4,opt,name=srcport" json:"srcport,omitempty"`
87 Dstip []byte `protobuf:"bytes,5,opt,name=dstip" json:"dstip,omitempty"`
88 Dstport *uint32 `protobuf:"varint,6,opt,name=dstport" json:"dstport,omitempty"`
89 Request []byte `protobuf:"bytes,7,opt,name=request" json:"request,omitempty"`
90 P0FGenre []byte `protobuf:"bytes,65,opt,name=p0f_genre,json=p0fGenre" json:"p0f_genre,omitempty"`
91 P0FDetail []byte `protobuf:"bytes,66,opt,name=p0f_detail,json=p0fDetail" json:"p0f_detail,omitempty"`
92 P0FDist *int32 `protobuf:"varint,67,opt,name=p0f_dist,json=p0fDist" json:"p0f_dist,omitempty"`
93 P0FLink []byte `protobuf:"bytes,68,opt,name=p0f_link,json=p0fLink" json:"p0f_link,omitempty"`
94 P0FTos []byte `protobuf:"bytes,69,opt,name=p0f_tos,json=p0fTos" json:"p0f_tos,omitempty"`
95 P0FFw *uint32 `protobuf:"varint,70,opt,name=p0f_fw,json=p0fFw" json:"p0f_fw,omitempty"`
96 P0FNat *uint32 `protobuf:"varint,71,opt,name=p0f_nat,json=p0fNat" json:"p0f_nat,omitempty"`
97 P0FReal *uint32 `protobuf:"varint,72,opt,name=p0f_real,json=p0fReal" json:"p0f_real,omitempty"`
98 P0FScore *int32 `protobuf:"varint,73,opt,name=p0f_score,json=p0fScore" json:"p0f_score,omitempty"`
99 P0FMflags *uint32 `protobuf:"varint,74,opt,name=p0f_mflags,json=p0fMflags" json:"p0f_mflags,omitempty"`
100 P0FUptime *int32 `protobuf:"varint,75,opt,name=p0f_uptime,json=p0fUptime" json:"p0f_uptime,omitempty"`
101 }
102
103 func (x *Http) Reset() {
104 *x = Http{}
105 if protoimpl.UnsafeEnabled {
106 mi := &file_http_proto_msgTypes[0]
107 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
108 ms.StoreMessageInfo(mi)
109 }
110 }
111
112 func (x *Http) String() string {
113 return protoimpl.X.MessageStringOf(x)
114 }
115
116 func (*Http) ProtoMessage() {}
117
118 func (x *Http) ProtoReflect() protoreflect.Message {
119 mi := &file_http_proto_msgTypes[0]
120 if protoimpl.UnsafeEnabled && x != nil {
121 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
122 if ms.LoadMessageInfo() == nil {
123 ms.StoreMessageInfo(mi)
124 }
125 return ms
126 }
127 return mi.MessageOf(x)
128 }
129
130 // Deprecated: Use Http.ProtoReflect.Descriptor instead.
131 func (*Http) Descriptor() ([]byte, []int) {
132 return file_http_proto_rawDescGZIP(), []int{0}
133 }
134
135 func (x *Http) GetType() Http_HttpType {
136 if x != nil && x.Type != nil {
137 return *x.Type
138 }
139 return Http_unknown
140 }
141
142 func (x *Http) GetSrcip() []byte {
143 if x != nil {
144 return x.Srcip
145 }
146 return nil
147 }
148
149 func (x *Http) GetSrchost() []byte {
150 if x != nil {
151 return x.Srchost
152 }
153 return nil
154 }
155
156 func (x *Http) GetSrcport() uint32 {
157 if x != nil && x.Srcport != nil {
158 return *x.Srcport
159 }
160 return 0
161 }
162
163 func (x *Http) GetDstip() []byte {
164 if x != nil {
165 return x.Dstip
166 }
167 return nil
168 }
169
170 func (x *Http) GetDstport() uint32 {
171 if x != nil && x.Dstport != nil {
172 return *x.Dstport
173 }
174 return 0
175 }
176
177 func (x *Http) GetRequest() []byte {
178 if x != nil {
179 return x.Request
180 }
181 return nil
182 }
183
184 func (x *Http) GetP0FGenre() []byte {
185 if x != nil {
186 return x.P0FGenre
187 }
188 return nil
189 }
190
191 func (x *Http) GetP0FDetail() []byte {
192 if x != nil {
193 return x.P0FDetail
194 }
195 return nil
196 }
197
198 func (x *Http) GetP0FDist() int32 {
199 if x != nil && x.P0FDist != nil {
200 return *x.P0FDist
201 }
202 return 0
203 }
204
205 func (x *Http) GetP0FLink() []byte {
206 if x != nil {
207 return x.P0FLink
208 }
209 return nil
210 }
211
212 func (x *Http) GetP0FTos() []byte {
213 if x != nil {
214 return x.P0FTos
215 }
216 return nil
217 }
218
219 func (x *Http) GetP0FFw() uint32 {
220 if x != nil && x.P0FFw != nil {
221 return *x.P0FFw
222 }
223 return 0
224 }
225
226 func (x *Http) GetP0FNat() uint32 {
227 if x != nil && x.P0FNat != nil {
228 return *x.P0FNat
229 }
230 return 0
231 }
232
233 func (x *Http) GetP0FReal() uint32 {
234 if x != nil && x.P0FReal != nil {
235 return *x.P0FReal
236 }
237 return 0
238 }
239
240 func (x *Http) GetP0FScore() int32 {
241 if x != nil && x.P0FScore != nil {
242 return *x.P0FScore
243 }
244 return 0
245 }
246
247 func (x *Http) GetP0FMflags() uint32 {
248 if x != nil && x.P0FMflags != nil {
249 return *x.P0FMflags
250 }
251 return 0
252 }
253
254 func (x *Http) GetP0FUptime() int32 {
255 if x != nil && x.P0FUptime != nil {
256 return *x.P0FUptime
257 }
258 return 0
259 }
260
261 var File_http_proto protoreflect.FileDescriptor
262
263 var file_http_proto_rawDesc = []byte{
264 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6d,
265 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0xa0, 0x04, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70,
266 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x18,
267 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x2e,
268 0x48, 0x74, 0x74, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14,
269 0x0a, 0x05, 0x73, 0x72, 0x63, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73,
270 0x72, 0x63, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x18,
271 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x72, 0x63, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x18,
272 0x0a, 0x07, 0x73, 0x72, 0x63, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
273 0x07, 0x73, 0x72, 0x63, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x73, 0x74, 0x69,
274 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x64, 0x73, 0x74, 0x69, 0x70, 0x12, 0x18,
275 0x0a, 0x07, 0x64, 0x73, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52,
276 0x07, 0x64, 0x73, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75,
277 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65,
278 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x30, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x72, 0x65, 0x18,
279 0x41, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x30, 0x66, 0x47, 0x65, 0x6e, 0x72, 0x65, 0x12,
280 0x1d, 0x0a, 0x0a, 0x70, 0x30, 0x66, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x42, 0x20,
281 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x30, 0x66, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x19,
282 0x0a, 0x08, 0x70, 0x30, 0x66, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x18, 0x43, 0x20, 0x01, 0x28, 0x05,
283 0x52, 0x07, 0x70, 0x30, 0x66, 0x44, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x30, 0x66,
284 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x44, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x30, 0x66,
285 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x30, 0x66, 0x5f, 0x74, 0x6f, 0x73, 0x18,
286 0x45, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x30, 0x66, 0x54, 0x6f, 0x73, 0x12, 0x15, 0x0a,
287 0x06, 0x70, 0x30, 0x66, 0x5f, 0x66, 0x77, 0x18, 0x46, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70,
288 0x30, 0x66, 0x46, 0x77, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x30, 0x66, 0x5f, 0x6e, 0x61, 0x74, 0x18,
289 0x47, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x30, 0x66, 0x4e, 0x61, 0x74, 0x12, 0x19, 0x0a,
290 0x08, 0x70, 0x30, 0x66, 0x5f, 0x72, 0x65, 0x61, 0x6c, 0x18, 0x48, 0x20, 0x01, 0x28, 0x0d, 0x52,
291 0x07, 0x70, 0x30, 0x66, 0x52, 0x65, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x30, 0x66, 0x5f,
292 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x49, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x30, 0x66,
293 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x30, 0x66, 0x5f, 0x6d, 0x66, 0x6c,
294 0x61, 0x67, 0x73, 0x18, 0x4a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x30, 0x66, 0x4d, 0x66,
295 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x30, 0x66, 0x5f, 0x75, 0x70, 0x74, 0x69,
296 0x6d, 0x65, 0x18, 0x4b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x30, 0x66, 0x55, 0x70, 0x74,
297 0x69, 0x6d, 0x65, 0x22, 0x25, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
298 0x0b, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
299 0x73, 0x69, 0x6e, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x10, 0x01, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69,
300 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67, 0x68,
301 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73,
302 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
303 }
304
305 var (
306 file_http_proto_rawDescOnce sync.Once
307 file_http_proto_rawDescData = file_http_proto_rawDesc
308 )
309
310 func file_http_proto_rawDescGZIP() []byte {
311 file_http_proto_rawDescOnce.Do(func() {
312 file_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_http_proto_rawDescData)
313 })
314 return file_http_proto_rawDescData
315 }
316
317 var file_http_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
318 var file_http_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
319 var file_http_proto_goTypes = []interface{}{
320 (Http_HttpType)(0), // 0: nmsg.base.Http.HttpType
321 (*Http)(nil), // 1: nmsg.base.Http
322 }
323 var file_http_proto_depIdxs = []int32{
324 0, // 0: nmsg.base.Http.type:type_name -> nmsg.base.Http.HttpType
325 1, // [1:1] is the sub-list for method output_type
326 1, // [1:1] is the sub-list for method input_type
327 1, // [1:1] is the sub-list for extension type_name
328 1, // [1:1] is the sub-list for extension extendee
329 0, // [0:1] is the sub-list for field type_name
330 }
331
332 func init() { file_http_proto_init() }
333 func file_http_proto_init() {
334 if File_http_proto != nil {
335 return
336 }
337 if !protoimpl.UnsafeEnabled {
338 file_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
339 switch v := v.(*Http); i {
340 case 0:
341 return &v.state
342 case 1:
343 return &v.sizeCache
344 case 2:
345 return &v.unknownFields
346 default:
347 return nil
348 }
349 }
350 }
351 type x struct{}
352 out := protoimpl.TypeBuilder{
353 File: protoimpl.DescBuilder{
354 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
355 RawDescriptor: file_http_proto_rawDesc,
356 NumEnums: 1,
357 NumMessages: 1,
358 NumExtensions: 0,
359 NumServices: 0,
360 },
361 GoTypes: file_http_proto_goTypes,
362 DependencyIndexes: file_http_proto_depIdxs,
363 EnumInfos: file_http_proto_enumTypes,
364 MessageInfos: file_http_proto_msgTypes,
365 }.Build()
366 File_http_proto = out.File
367 file_http_proto_rawDesc = nil
368 file_http_proto_goTypes = nil
369 file_http_proto_depIdxs = nil
370 }
00 syntax = "proto2";
11 package nmsg.base;
2
3 enum HttpType {
4 // unknown = 0;
5 sinkhole = 1;
6 }
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
73
84 message Http {
5 enum HttpType {
6 unknown = 0;
7 sinkhole = 1;
8 }
9
910 required HttpType type = 1;
1011 optional bytes srcip = 2;
1112 optional bytes srchost = 3;
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: ipconn.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
914
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
1421
1522 type IPConn struct {
16 Proto *uint32 `protobuf:"varint,1,opt,name=proto" json:"proto,omitempty"`
17 Srcip []byte `protobuf:"bytes,2,opt,name=srcip" json:"srcip,omitempty"`
18 Srcport *uint32 `protobuf:"varint,3,opt,name=srcport" json:"srcport,omitempty"`
19 Dstip []byte `protobuf:"bytes,4,opt,name=dstip" json:"dstip,omitempty"`
20 Dstport *uint32 `protobuf:"varint,5,opt,name=dstport" json:"dstport,omitempty"`
21 XXX_unrecognized []byte `json:"-"`
23 state protoimpl.MessageState
24 sizeCache protoimpl.SizeCache
25 unknownFields protoimpl.UnknownFields
26
27 Proto *uint32 `protobuf:"varint,1,opt,name=proto" json:"proto,omitempty"`
28 Srcip []byte `protobuf:"bytes,2,opt,name=srcip" json:"srcip,omitempty"`
29 Srcport *uint32 `protobuf:"varint,3,opt,name=srcport" json:"srcport,omitempty"`
30 Dstip []byte `protobuf:"bytes,4,opt,name=dstip" json:"dstip,omitempty"`
31 Dstport *uint32 `protobuf:"varint,5,opt,name=dstport" json:"dstport,omitempty"`
2232 }
2333
24 func (m *IPConn) Reset() { *m = IPConn{} }
25 func (m *IPConn) String() string { return proto.CompactTextString(m) }
26 func (*IPConn) ProtoMessage() {}
27 func (*IPConn) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} }
34 func (x *IPConn) Reset() {
35 *x = IPConn{}
36 if protoimpl.UnsafeEnabled {
37 mi := &file_ipconn_proto_msgTypes[0]
38 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
39 ms.StoreMessageInfo(mi)
40 }
41 }
2842
29 func (m *IPConn) GetProto() uint32 {
30 if m != nil && m.Proto != nil {
31 return *m.Proto
43 func (x *IPConn) String() string {
44 return protoimpl.X.MessageStringOf(x)
45 }
46
47 func (*IPConn) ProtoMessage() {}
48
49 func (x *IPConn) ProtoReflect() protoreflect.Message {
50 mi := &file_ipconn_proto_msgTypes[0]
51 if protoimpl.UnsafeEnabled && x != nil {
52 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
53 if ms.LoadMessageInfo() == nil {
54 ms.StoreMessageInfo(mi)
55 }
56 return ms
57 }
58 return mi.MessageOf(x)
59 }
60
61 // Deprecated: Use IPConn.ProtoReflect.Descriptor instead.
62 func (*IPConn) Descriptor() ([]byte, []int) {
63 return file_ipconn_proto_rawDescGZIP(), []int{0}
64 }
65
66 func (x *IPConn) GetProto() uint32 {
67 if x != nil && x.Proto != nil {
68 return *x.Proto
3269 }
3370 return 0
3471 }
3572
36 func (m *IPConn) GetSrcip() []byte {
37 if m != nil {
38 return m.Srcip
73 func (x *IPConn) GetSrcip() []byte {
74 if x != nil {
75 return x.Srcip
3976 }
4077 return nil
4178 }
4279
43 func (m *IPConn) GetSrcport() uint32 {
44 if m != nil && m.Srcport != nil {
45 return *m.Srcport
80 func (x *IPConn) GetSrcport() uint32 {
81 if x != nil && x.Srcport != nil {
82 return *x.Srcport
4683 }
4784 return 0
4885 }
4986
50 func (m *IPConn) GetDstip() []byte {
51 if m != nil {
52 return m.Dstip
87 func (x *IPConn) GetDstip() []byte {
88 if x != nil {
89 return x.Dstip
5390 }
5491 return nil
5592 }
5693
57 func (m *IPConn) GetDstport() uint32 {
58 if m != nil && m.Dstport != nil {
59 return *m.Dstport
94 func (x *IPConn) GetDstport() uint32 {
95 if x != nil && x.Dstport != nil {
96 return *x.Dstport
6097 }
6198 return 0
6299 }
63100
64 func init() {
65 proto.RegisterType((*IPConn)(nil), "nmsg.base.IPConn")
101 var File_ipconn_proto protoreflect.FileDescriptor
102
103 var file_ipconn_proto_rawDesc = []byte{
104 0x0a, 0x0c, 0x69, 0x70, 0x63, 0x6f, 0x6e, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09,
105 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0x7e, 0x0a, 0x06, 0x49, 0x50, 0x43,
106 0x6f, 0x6e, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01,
107 0x28, 0x0d, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x72, 0x63,
108 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x72, 0x63, 0x69, 0x70, 0x12,
109 0x18, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
110 0x52, 0x07, 0x73, 0x72, 0x63, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x73, 0x74,
111 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x64, 0x73, 0x74, 0x69, 0x70, 0x12,
112 0x18, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d,
113 0x52, 0x07, 0x64, 0x73, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74,
114 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74,
115 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73, 0x67,
116 0x5f, 0x62, 0x61, 0x73, 0x65,
66117 }
67118
68 func init() { proto.RegisterFile("ipconn.proto", fileDescriptor5) }
119 var (
120 file_ipconn_proto_rawDescOnce sync.Once
121 file_ipconn_proto_rawDescData = file_ipconn_proto_rawDesc
122 )
69123
70 var fileDescriptor5 = []byte{
71 // 109 bytes of a gzipped FileDescriptorProto
72 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x2c, 0x48, 0xce,
73 0xcf, 0xcb, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b,
74 0x4a, 0x2c, 0x4e, 0x55, 0x0a, 0xe7, 0x62, 0xf3, 0x0c, 0x70, 0x06, 0x4a, 0x09, 0xf1, 0x72, 0xb1,
75 0x82, 0x65, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, 0x41, 0xdc, 0xe2, 0xa2, 0xe4, 0xcc, 0x02, 0x09,
76 0x26, 0x20, 0x97, 0x47, 0x88, 0x9f, 0x8b, 0x1d, 0xc8, 0x2d, 0xc8, 0x2f, 0x2a, 0x91, 0x60, 0x86,
77 0xc9, 0xa7, 0x14, 0x97, 0x00, 0xe5, 0x59, 0x60, 0xf2, 0x40, 0x2e, 0x58, 0x9e, 0x15, 0x24, 0x0f,
78 0x08, 0x00, 0x00, 0xff, 0xff, 0x83, 0x37, 0xd2, 0x7d, 0x72, 0x00, 0x00, 0x00,
124 func file_ipconn_proto_rawDescGZIP() []byte {
125 file_ipconn_proto_rawDescOnce.Do(func() {
126 file_ipconn_proto_rawDescData = protoimpl.X.CompressGZIP(file_ipconn_proto_rawDescData)
127 })
128 return file_ipconn_proto_rawDescData
79129 }
130
131 var file_ipconn_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
132 var file_ipconn_proto_goTypes = []interface{}{
133 (*IPConn)(nil), // 0: nmsg.base.IPConn
134 }
135 var file_ipconn_proto_depIdxs = []int32{
136 0, // [0:0] is the sub-list for method output_type
137 0, // [0:0] is the sub-list for method input_type
138 0, // [0:0] is the sub-list for extension type_name
139 0, // [0:0] is the sub-list for extension extendee
140 0, // [0:0] is the sub-list for field type_name
141 }
142
143 func init() { file_ipconn_proto_init() }
144 func file_ipconn_proto_init() {
145 if File_ipconn_proto != nil {
146 return
147 }
148 if !protoimpl.UnsafeEnabled {
149 file_ipconn_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
150 switch v := v.(*IPConn); i {
151 case 0:
152 return &v.state
153 case 1:
154 return &v.sizeCache
155 case 2:
156 return &v.unknownFields
157 default:
158 return nil
159 }
160 }
161 }
162 type x struct{}
163 out := protoimpl.TypeBuilder{
164 File: protoimpl.DescBuilder{
165 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
166 RawDescriptor: file_ipconn_proto_rawDesc,
167 NumEnums: 0,
168 NumMessages: 1,
169 NumExtensions: 0,
170 NumServices: 0,
171 },
172 GoTypes: file_ipconn_proto_goTypes,
173 DependencyIndexes: file_ipconn_proto_depIdxs,
174 MessageInfos: file_ipconn_proto_msgTypes,
175 }.Build()
176 File_ipconn_proto = out.File
177 file_ipconn_proto_rawDesc = nil
178 file_ipconn_proto_goTypes = nil
179 file_ipconn_proto_depIdxs = nil
180 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
34 message IPConn {
45 optional uint32 proto = 1;
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: linkpair.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
14
15 type Linktype int32
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
1614
1715 const (
18 Linktype_anchor Linktype = 0
19 Linktype_redirect Linktype = 1
20 )
21
22 var Linktype_name = map[int32]string{
23 0: "anchor",
24 1: "redirect",
25 }
26 var Linktype_value = map[string]int32{
27 "anchor": 0,
28 "redirect": 1,
29 }
30
31 func (x Linktype) Enum() *Linktype {
32 p := new(Linktype)
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 type Linkpair_Linktype int32
23
24 const (
25 Linkpair_anchor Linkpair_Linktype = 0
26 Linkpair_redirect Linkpair_Linktype = 1
27 )
28
29 // Enum value maps for Linkpair_Linktype.
30 var (
31 Linkpair_Linktype_name = map[int32]string{
32 0: "anchor",
33 1: "redirect",
34 }
35 Linkpair_Linktype_value = map[string]int32{
36 "anchor": 0,
37 "redirect": 1,
38 }
39 )
40
41 func (x Linkpair_Linktype) Enum() *Linkpair_Linktype {
42 p := new(Linkpair_Linktype)
3343 *p = x
3444 return p
3545 }
36 func (x Linktype) String() string {
37 return proto.EnumName(Linktype_name, int32(x))
38 }
39 func (x *Linktype) UnmarshalJSON(data []byte) error {
40 value, err := proto.UnmarshalJSONEnum(Linktype_value, data, "Linktype")
46
47 func (x Linkpair_Linktype) String() string {
48 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
49 }
50
51 func (Linkpair_Linktype) Descriptor() protoreflect.EnumDescriptor {
52 return file_linkpair_proto_enumTypes[0].Descriptor()
53 }
54
55 func (Linkpair_Linktype) Type() protoreflect.EnumType {
56 return &file_linkpair_proto_enumTypes[0]
57 }
58
59 func (x Linkpair_Linktype) Number() protoreflect.EnumNumber {
60 return protoreflect.EnumNumber(x)
61 }
62
63 // Deprecated: Do not use.
64 func (x *Linkpair_Linktype) UnmarshalJSON(b []byte) error {
65 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
4166 if err != nil {
4267 return err
4368 }
44 *x = Linktype(value)
45 return nil
46 }
47 func (Linktype) EnumDescriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
69 *x = Linkpair_Linktype(num)
70 return nil
71 }
72
73 // Deprecated: Use Linkpair_Linktype.Descriptor instead.
74 func (Linkpair_Linktype) EnumDescriptor() ([]byte, []int) {
75 return file_linkpair_proto_rawDescGZIP(), []int{0, 0}
76 }
4877
4978 type Linkpair struct {
50 Type *Linktype `protobuf:"varint,1,req,name=type,enum=nmsg.base.Linktype" json:"type,omitempty"`
51 Src []byte `protobuf:"bytes,2,req,name=src" json:"src,omitempty"`
52 Dst []byte `protobuf:"bytes,3,req,name=dst" json:"dst,omitempty"`
53 Headers []byte `protobuf:"bytes,5,opt,name=headers" json:"headers,omitempty"`
54 XXX_unrecognized []byte `json:"-"`
55 }
56
57 func (m *Linkpair) Reset() { *m = Linkpair{} }
58 func (m *Linkpair) String() string { return proto.CompactTextString(m) }
59 func (*Linkpair) ProtoMessage() {}
60 func (*Linkpair) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
61
62 func (m *Linkpair) GetType() Linktype {
63 if m != nil && m.Type != nil {
64 return *m.Type
65 }
66 return Linktype_anchor
67 }
68
69 func (m *Linkpair) GetSrc() []byte {
70 if m != nil {
71 return m.Src
72 }
73 return nil
74 }
75
76 func (m *Linkpair) GetDst() []byte {
77 if m != nil {
78 return m.Dst
79 }
80 return nil
81 }
82
83 func (m *Linkpair) GetHeaders() []byte {
84 if m != nil {
85 return m.Headers
86 }
87 return nil
88 }
89
90 func init() {
91 proto.RegisterType((*Linkpair)(nil), "nmsg.base.Linkpair")
92 proto.RegisterEnum("nmsg.base.Linktype", Linktype_name, Linktype_value)
93 }
94
95 func init() { proto.RegisterFile("linkpair.proto", fileDescriptor6) }
96
97 var fileDescriptor6 = []byte{
98 // 149 bytes of a gzipped FileDescriptorProto
99 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0xc9, 0xcc, 0xcb,
100 0x2e, 0x48, 0xcc, 0x2c, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e,
101 0xd7, 0x4b, 0x4a, 0x2c, 0x4e, 0x55, 0x8a, 0xe0, 0xe2, 0xf0, 0x81, 0x4a, 0x0a, 0x29, 0x72, 0xb1,
102 0x94, 0x54, 0x16, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0xf0, 0x19, 0x09, 0xeb, 0xc1, 0x55, 0xe9,
103 0x81, 0x94, 0x80, 0xa4, 0x84, 0xb8, 0xb9, 0x98, 0x8b, 0x8b, 0x92, 0x25, 0x98, 0x80, 0x2a, 0x78,
104 0x40, 0x9c, 0x94, 0xe2, 0x12, 0x09, 0x66, 0x30, 0x87, 0x9f, 0x8b, 0x3d, 0x23, 0x35, 0x31, 0x25,
105 0xb5, 0xa8, 0x58, 0x82, 0x55, 0x81, 0x51, 0x83, 0x47, 0x4b, 0x05, 0x62, 0x32, 0x58, 0x1b, 0x17,
106 0x17, 0x5b, 0x62, 0x5e, 0x72, 0x46, 0x7e, 0x91, 0x00, 0x83, 0x10, 0x0f, 0x17, 0x47, 0x51, 0x6a,
107 0x4a, 0x66, 0x51, 0x6a, 0x72, 0x89, 0x00, 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0x64, 0x13, 0x33,
108 0xdf, 0x9b, 0x00, 0x00, 0x00,
109 }
79 state protoimpl.MessageState
80 sizeCache protoimpl.SizeCache
81 unknownFields protoimpl.UnknownFields
82
83 Type *Linkpair_Linktype `protobuf:"varint,1,req,name=type,enum=nmsg.base.Linkpair_Linktype" json:"type,omitempty"`
84 Src []byte `protobuf:"bytes,2,req,name=src" json:"src,omitempty"`
85 Dst []byte `protobuf:"bytes,3,req,name=dst" json:"dst,omitempty"`
86 Headers []byte `protobuf:"bytes,5,opt,name=headers" json:"headers,omitempty"`
87 }
88
89 func (x *Linkpair) Reset() {
90 *x = Linkpair{}
91 if protoimpl.UnsafeEnabled {
92 mi := &file_linkpair_proto_msgTypes[0]
93 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
94 ms.StoreMessageInfo(mi)
95 }
96 }
97
98 func (x *Linkpair) String() string {
99 return protoimpl.X.MessageStringOf(x)
100 }
101
102 func (*Linkpair) ProtoMessage() {}
103
104 func (x *Linkpair) ProtoReflect() protoreflect.Message {
105 mi := &file_linkpair_proto_msgTypes[0]
106 if protoimpl.UnsafeEnabled && x != nil {
107 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
108 if ms.LoadMessageInfo() == nil {
109 ms.StoreMessageInfo(mi)
110 }
111 return ms
112 }
113 return mi.MessageOf(x)
114 }
115
116 // Deprecated: Use Linkpair.ProtoReflect.Descriptor instead.
117 func (*Linkpair) Descriptor() ([]byte, []int) {
118 return file_linkpair_proto_rawDescGZIP(), []int{0}
119 }
120
121 func (x *Linkpair) GetType() Linkpair_Linktype {
122 if x != nil && x.Type != nil {
123 return *x.Type
124 }
125 return Linkpair_anchor
126 }
127
128 func (x *Linkpair) GetSrc() []byte {
129 if x != nil {
130 return x.Src
131 }
132 return nil
133 }
134
135 func (x *Linkpair) GetDst() []byte {
136 if x != nil {
137 return x.Dst
138 }
139 return nil
140 }
141
142 func (x *Linkpair) GetHeaders() []byte {
143 if x != nil {
144 return x.Headers
145 }
146 return nil
147 }
148
149 var File_linkpair_proto protoreflect.FileDescriptor
150
151 var file_linkpair_proto_rawDesc = []byte{
152 0x0a, 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x70, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
153 0x12, 0x09, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x08,
154 0x4c, 0x69, 0x6e, 0x6b, 0x70, 0x61, 0x69, 0x72, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
155 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61,
156 0x73, 0x65, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x70, 0x61, 0x69, 0x72, 0x2e, 0x4c, 0x69, 0x6e, 0x6b,
157 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72,
158 0x63, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x10, 0x0a, 0x03,
159 0x64, 0x73, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x18,
160 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52,
161 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x24, 0x0a, 0x08, 0x4c, 0x69, 0x6e, 0x6b,
162 0x74, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x10, 0x00,
163 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0x01, 0x42, 0x2a,
164 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72,
165 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67,
166 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
167 }
168
169 var (
170 file_linkpair_proto_rawDescOnce sync.Once
171 file_linkpair_proto_rawDescData = file_linkpair_proto_rawDesc
172 )
173
174 func file_linkpair_proto_rawDescGZIP() []byte {
175 file_linkpair_proto_rawDescOnce.Do(func() {
176 file_linkpair_proto_rawDescData = protoimpl.X.CompressGZIP(file_linkpair_proto_rawDescData)
177 })
178 return file_linkpair_proto_rawDescData
179 }
180
181 var file_linkpair_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
182 var file_linkpair_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
183 var file_linkpair_proto_goTypes = []interface{}{
184 (Linkpair_Linktype)(0), // 0: nmsg.base.Linkpair.Linktype
185 (*Linkpair)(nil), // 1: nmsg.base.Linkpair
186 }
187 var file_linkpair_proto_depIdxs = []int32{
188 0, // 0: nmsg.base.Linkpair.type:type_name -> nmsg.base.Linkpair.Linktype
189 1, // [1:1] is the sub-list for method output_type
190 1, // [1:1] is the sub-list for method input_type
191 1, // [1:1] is the sub-list for extension type_name
192 1, // [1:1] is the sub-list for extension extendee
193 0, // [0:1] is the sub-list for field type_name
194 }
195
196 func init() { file_linkpair_proto_init() }
197 func file_linkpair_proto_init() {
198 if File_linkpair_proto != nil {
199 return
200 }
201 if !protoimpl.UnsafeEnabled {
202 file_linkpair_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
203 switch v := v.(*Linkpair); i {
204 case 0:
205 return &v.state
206 case 1:
207 return &v.sizeCache
208 case 2:
209 return &v.unknownFields
210 default:
211 return nil
212 }
213 }
214 }
215 type x struct{}
216 out := protoimpl.TypeBuilder{
217 File: protoimpl.DescBuilder{
218 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
219 RawDescriptor: file_linkpair_proto_rawDesc,
220 NumEnums: 1,
221 NumMessages: 1,
222 NumExtensions: 0,
223 NumServices: 0,
224 },
225 GoTypes: file_linkpair_proto_goTypes,
226 DependencyIndexes: file_linkpair_proto_depIdxs,
227 EnumInfos: file_linkpair_proto_enumTypes,
228 MessageInfos: file_linkpair_proto_msgTypes,
229 }.Build()
230 File_linkpair_proto = out.File
231 file_linkpair_proto_rawDesc = nil
232 file_linkpair_proto_goTypes = nil
233 file_linkpair_proto_depIdxs = nil
234 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
3 enum Linktype {
4 anchor = 0;
5 redirect = 1;
6 }
74
85 message Linkpair {
6 enum Linktype {
7 anchor = 0;
8 redirect = 1;
9 }
910 required Linktype type = 1;
1011 required bytes src = 2;
1112 required bytes dst = 3;
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: logline.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
914
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
1421
1522 type LogLine struct {
16 Category []byte `protobuf:"bytes,1,opt,name=category" json:"category,omitempty"`
17 Message []byte `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
18 XXX_unrecognized []byte `json:"-"`
23 state protoimpl.MessageState
24 sizeCache protoimpl.SizeCache
25 unknownFields protoimpl.UnknownFields
26
27 Category []byte `protobuf:"bytes,1,opt,name=category" json:"category,omitempty"`
28 Message []byte `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
1929 }
2030
21 func (m *LogLine) Reset() { *m = LogLine{} }
22 func (m *LogLine) String() string { return proto.CompactTextString(m) }
23 func (*LogLine) ProtoMessage() {}
24 func (*LogLine) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} }
31 func (x *LogLine) Reset() {
32 *x = LogLine{}
33 if protoimpl.UnsafeEnabled {
34 mi := &file_logline_proto_msgTypes[0]
35 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
36 ms.StoreMessageInfo(mi)
37 }
38 }
2539
26 func (m *LogLine) GetCategory() []byte {
27 if m != nil {
28 return m.Category
40 func (x *LogLine) String() string {
41 return protoimpl.X.MessageStringOf(x)
42 }
43
44 func (*LogLine) ProtoMessage() {}
45
46 func (x *LogLine) ProtoReflect() protoreflect.Message {
47 mi := &file_logline_proto_msgTypes[0]
48 if protoimpl.UnsafeEnabled && x != nil {
49 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
50 if ms.LoadMessageInfo() == nil {
51 ms.StoreMessageInfo(mi)
52 }
53 return ms
54 }
55 return mi.MessageOf(x)
56 }
57
58 // Deprecated: Use LogLine.ProtoReflect.Descriptor instead.
59 func (*LogLine) Descriptor() ([]byte, []int) {
60 return file_logline_proto_rawDescGZIP(), []int{0}
61 }
62
63 func (x *LogLine) GetCategory() []byte {
64 if x != nil {
65 return x.Category
2966 }
3067 return nil
3168 }
3269
33 func (m *LogLine) GetMessage() []byte {
34 if m != nil {
35 return m.Message
70 func (x *LogLine) GetMessage() []byte {
71 if x != nil {
72 return x.Message
3673 }
3774 return nil
3875 }
3976
40 func init() {
41 proto.RegisterType((*LogLine)(nil), "nmsg.base.LogLine")
77 var File_logline_proto protoreflect.FileDescriptor
78
79 var file_logline_proto_rawDesc = []byte{
80 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
81 0x09, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x07, 0x4c, 0x6f,
82 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
83 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
84 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
85 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x67,
86 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67,
87 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67, 0x2f, 0x6e, 0x6d,
88 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
4289 }
4390
44 func init() { proto.RegisterFile("logline.proto", fileDescriptor7) }
91 var (
92 file_logline_proto_rawDescOnce sync.Once
93 file_logline_proto_rawDescData = file_logline_proto_rawDesc
94 )
4595
46 var fileDescriptor7 = []byte{
47 // 93 bytes of a gzipped FileDescriptorProto
48 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0xc9, 0x4f, 0xcf,
49 0xc9, 0xcc, 0x4b, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7,
50 0x4b, 0x4a, 0x2c, 0x4e, 0x55, 0xd2, 0xe1, 0x62, 0xf7, 0xc9, 0x4f, 0xf7, 0x01, 0xca, 0x09, 0x09,
51 0x70, 0x71, 0x24, 0x27, 0x96, 0xa4, 0xa6, 0xe7, 0x17, 0x55, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0,
52 0x08, 0xf1, 0x73, 0xb1, 0xe7, 0xa6, 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x4a, 0x30, 0x81, 0x04, 0x00,
53 0x01, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x4e, 0xe7, 0x48, 0x48, 0x00, 0x00, 0x00,
96 func file_logline_proto_rawDescGZIP() []byte {
97 file_logline_proto_rawDescOnce.Do(func() {
98 file_logline_proto_rawDescData = protoimpl.X.CompressGZIP(file_logline_proto_rawDescData)
99 })
100 return file_logline_proto_rawDescData
54101 }
102
103 var file_logline_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
104 var file_logline_proto_goTypes = []interface{}{
105 (*LogLine)(nil), // 0: nmsg.base.LogLine
106 }
107 var file_logline_proto_depIdxs = []int32{
108 0, // [0:0] is the sub-list for method output_type
109 0, // [0:0] is the sub-list for method input_type
110 0, // [0:0] is the sub-list for extension type_name
111 0, // [0:0] is the sub-list for extension extendee
112 0, // [0:0] is the sub-list for field type_name
113 }
114
115 func init() { file_logline_proto_init() }
116 func file_logline_proto_init() {
117 if File_logline_proto != nil {
118 return
119 }
120 if !protoimpl.UnsafeEnabled {
121 file_logline_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
122 switch v := v.(*LogLine); i {
123 case 0:
124 return &v.state
125 case 1:
126 return &v.sizeCache
127 case 2:
128 return &v.unknownFields
129 default:
130 return nil
131 }
132 }
133 }
134 type x struct{}
135 out := protoimpl.TypeBuilder{
136 File: protoimpl.DescBuilder{
137 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
138 RawDescriptor: file_logline_proto_rawDesc,
139 NumEnums: 0,
140 NumMessages: 1,
141 NumExtensions: 0,
142 NumServices: 0,
143 },
144 GoTypes: file_logline_proto_goTypes,
145 DependencyIndexes: file_logline_proto_depIdxs,
146 MessageInfos: file_logline_proto_msgTypes,
147 }.Build()
148 File_logline_proto = out.File
149 file_logline_proto_rawDesc = nil
150 file_logline_proto_goTypes = nil
151 file_logline_proto_depIdxs = nil
152 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
34 message LogLine {
45 optional bytes category = 1;
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: ncap.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
14
15 type NcapType int32
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
1614
1715 const (
18 NcapType_IPV4 NcapType = 0
19 NcapType_IPV6 NcapType = 1
20 NcapType_Legacy NcapType = 2
21 )
22
23 var NcapType_name = map[int32]string{
24 0: "IPV4",
25 1: "IPV6",
26 2: "Legacy",
27 }
28 var NcapType_value = map[string]int32{
29 "IPV4": 0,
30 "IPV6": 1,
31 "Legacy": 2,
32 }
33
34 func (x NcapType) Enum() *NcapType {
35 p := new(NcapType)
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 type Ncap_NcapType int32
23
24 const (
25 Ncap_IPV4 Ncap_NcapType = 0
26 Ncap_IPV6 Ncap_NcapType = 1
27 Ncap_Legacy Ncap_NcapType = 2
28 )
29
30 // Enum value maps for Ncap_NcapType.
31 var (
32 Ncap_NcapType_name = map[int32]string{
33 0: "IPV4",
34 1: "IPV6",
35 2: "Legacy",
36 }
37 Ncap_NcapType_value = map[string]int32{
38 "IPV4": 0,
39 "IPV6": 1,
40 "Legacy": 2,
41 }
42 )
43
44 func (x Ncap_NcapType) Enum() *Ncap_NcapType {
45 p := new(Ncap_NcapType)
3646 *p = x
3747 return p
3848 }
39 func (x NcapType) String() string {
40 return proto.EnumName(NcapType_name, int32(x))
41 }
42 func (x *NcapType) UnmarshalJSON(data []byte) error {
43 value, err := proto.UnmarshalJSONEnum(NcapType_value, data, "NcapType")
49
50 func (x Ncap_NcapType) String() string {
51 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
52 }
53
54 func (Ncap_NcapType) Descriptor() protoreflect.EnumDescriptor {
55 return file_ncap_proto_enumTypes[0].Descriptor()
56 }
57
58 func (Ncap_NcapType) Type() protoreflect.EnumType {
59 return &file_ncap_proto_enumTypes[0]
60 }
61
62 func (x Ncap_NcapType) Number() protoreflect.EnumNumber {
63 return protoreflect.EnumNumber(x)
64 }
65
66 // Deprecated: Do not use.
67 func (x *Ncap_NcapType) UnmarshalJSON(b []byte) error {
68 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
4469 if err != nil {
4570 return err
4671 }
47 *x = NcapType(value)
48 return nil
49 }
50 func (NcapType) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{0} }
51
52 type NcapLegacyType int32
72 *x = Ncap_NcapType(num)
73 return nil
74 }
75
76 // Deprecated: Use Ncap_NcapType.Descriptor instead.
77 func (Ncap_NcapType) EnumDescriptor() ([]byte, []int) {
78 return file_ncap_proto_rawDescGZIP(), []int{0, 0}
79 }
80
81 type Ncap_NcapLegacyType int32
5382
5483 const (
55 NcapLegacyType_Ncap_UDP NcapLegacyType = 0
56 NcapLegacyType_Ncap_TCP NcapLegacyType = 1
57 NcapLegacyType_Ncap_ICMP NcapLegacyType = 2
58 )
59
60 var NcapLegacyType_name = map[int32]string{
61 0: "Ncap_UDP",
62 1: "Ncap_TCP",
63 2: "Ncap_ICMP",
64 }
65 var NcapLegacyType_value = map[string]int32{
66 "Ncap_UDP": 0,
67 "Ncap_TCP": 1,
68 "Ncap_ICMP": 2,
69 }
70
71 func (x NcapLegacyType) Enum() *NcapLegacyType {
72 p := new(NcapLegacyType)
84 Ncap_UDP Ncap_NcapLegacyType = 0
85 Ncap_TCP Ncap_NcapLegacyType = 1
86 Ncap_ICMP Ncap_NcapLegacyType = 2
87 )
88
89 // Enum value maps for Ncap_NcapLegacyType.
90 var (
91 Ncap_NcapLegacyType_name = map[int32]string{
92 0: "UDP",
93 1: "TCP",
94 2: "ICMP",
95 }
96 Ncap_NcapLegacyType_value = map[string]int32{
97 "UDP": 0,
98 "TCP": 1,
99 "ICMP": 2,
100 }
101 )
102
103 func (x Ncap_NcapLegacyType) Enum() *Ncap_NcapLegacyType {
104 p := new(Ncap_NcapLegacyType)
73105 *p = x
74106 return p
75107 }
76 func (x NcapLegacyType) String() string {
77 return proto.EnumName(NcapLegacyType_name, int32(x))
78 }
79 func (x *NcapLegacyType) UnmarshalJSON(data []byte) error {
80 value, err := proto.UnmarshalJSONEnum(NcapLegacyType_value, data, "NcapLegacyType")
108
109 func (x Ncap_NcapLegacyType) String() string {
110 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
111 }
112
113 func (Ncap_NcapLegacyType) Descriptor() protoreflect.EnumDescriptor {
114 return file_ncap_proto_enumTypes[1].Descriptor()
115 }
116
117 func (Ncap_NcapLegacyType) Type() protoreflect.EnumType {
118 return &file_ncap_proto_enumTypes[1]
119 }
120
121 func (x Ncap_NcapLegacyType) Number() protoreflect.EnumNumber {
122 return protoreflect.EnumNumber(x)
123 }
124
125 // Deprecated: Do not use.
126 func (x *Ncap_NcapLegacyType) UnmarshalJSON(b []byte) error {
127 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
81128 if err != nil {
82129 return err
83130 }
84 *x = NcapLegacyType(value)
85 return nil
86 }
87 func (NcapLegacyType) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{1} }
131 *x = Ncap_NcapLegacyType(num)
132 return nil
133 }
134
135 // Deprecated: Use Ncap_NcapLegacyType.Descriptor instead.
136 func (Ncap_NcapLegacyType) EnumDescriptor() ([]byte, []int) {
137 return file_ncap_proto_rawDescGZIP(), []int{0, 1}
138 }
88139
89140 type Ncap struct {
90 Type *NcapType `protobuf:"varint,1,req,name=type,enum=nmsg.base.NcapType" json:"type,omitempty"`
91 Payload []byte `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
141 state protoimpl.MessageState
142 sizeCache protoimpl.SizeCache
143 unknownFields protoimpl.UnknownFields
144
145 Type *Ncap_NcapType `protobuf:"varint,1,req,name=type,enum=nmsg.base.Ncap_NcapType" json:"type,omitempty"`
146 Payload []byte `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
92147 // legacy NCAP fields
93 Ltype *NcapLegacyType `protobuf:"varint,3,opt,name=ltype,enum=nmsg.base.NcapLegacyType" json:"ltype,omitempty"`
94 Srcip []byte `protobuf:"bytes,4,opt,name=srcip" json:"srcip,omitempty"`
95 Dstip []byte `protobuf:"bytes,5,opt,name=dstip" json:"dstip,omitempty"`
96 Lint0 *uint32 `protobuf:"varint,6,opt,name=lint0" json:"lint0,omitempty"`
97 Lint1 *uint32 `protobuf:"varint,7,opt,name=lint1" json:"lint1,omitempty"`
98 XXX_unrecognized []byte `json:"-"`
99 }
100
101 func (m *Ncap) Reset() { *m = Ncap{} }
102 func (m *Ncap) String() string { return proto.CompactTextString(m) }
103 func (*Ncap) ProtoMessage() {}
104 func (*Ncap) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} }
105
106 func (m *Ncap) GetType() NcapType {
107 if m != nil && m.Type != nil {
108 return *m.Type
109 }
110 return NcapType_IPV4
111 }
112
113 func (m *Ncap) GetPayload() []byte {
114 if m != nil {
115 return m.Payload
116 }
117 return nil
118 }
119
120 func (m *Ncap) GetLtype() NcapLegacyType {
121 if m != nil && m.Ltype != nil {
122 return *m.Ltype
123 }
124 return NcapLegacyType_Ncap_UDP
125 }
126
127 func (m *Ncap) GetSrcip() []byte {
128 if m != nil {
129 return m.Srcip
130 }
131 return nil
132 }
133
134 func (m *Ncap) GetDstip() []byte {
135 if m != nil {
136 return m.Dstip
137 }
138 return nil
139 }
140
141 func (m *Ncap) GetLint0() uint32 {
142 if m != nil && m.Lint0 != nil {
143 return *m.Lint0
148 Ltype *Ncap_NcapLegacyType `protobuf:"varint,3,opt,name=ltype,enum=nmsg.base.Ncap_NcapLegacyType" json:"ltype,omitempty"`
149 Srcip []byte `protobuf:"bytes,4,opt,name=srcip" json:"srcip,omitempty"`
150 Dstip []byte `protobuf:"bytes,5,opt,name=dstip" json:"dstip,omitempty"`
151 Lint0 *uint32 `protobuf:"varint,6,opt,name=lint0" json:"lint0,omitempty"`
152 Lint1 *uint32 `protobuf:"varint,7,opt,name=lint1" json:"lint1,omitempty"`
153 }
154
155 func (x *Ncap) Reset() {
156 *x = Ncap{}
157 if protoimpl.UnsafeEnabled {
158 mi := &file_ncap_proto_msgTypes[0]
159 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
160 ms.StoreMessageInfo(mi)
161 }
162 }
163
164 func (x *Ncap) String() string {
165 return protoimpl.X.MessageStringOf(x)
166 }
167
168 func (*Ncap) ProtoMessage() {}
169
170 func (x *Ncap) ProtoReflect() protoreflect.Message {
171 mi := &file_ncap_proto_msgTypes[0]
172 if protoimpl.UnsafeEnabled && x != nil {
173 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
174 if ms.LoadMessageInfo() == nil {
175 ms.StoreMessageInfo(mi)
176 }
177 return ms
178 }
179 return mi.MessageOf(x)
180 }
181
182 // Deprecated: Use Ncap.ProtoReflect.Descriptor instead.
183 func (*Ncap) Descriptor() ([]byte, []int) {
184 return file_ncap_proto_rawDescGZIP(), []int{0}
185 }
186
187 func (x *Ncap) GetType() Ncap_NcapType {
188 if x != nil && x.Type != nil {
189 return *x.Type
190 }
191 return Ncap_IPV4
192 }
193
194 func (x *Ncap) GetPayload() []byte {
195 if x != nil {
196 return x.Payload
197 }
198 return nil
199 }
200
201 func (x *Ncap) GetLtype() Ncap_NcapLegacyType {
202 if x != nil && x.Ltype != nil {
203 return *x.Ltype
204 }
205 return Ncap_UDP
206 }
207
208 func (x *Ncap) GetSrcip() []byte {
209 if x != nil {
210 return x.Srcip
211 }
212 return nil
213 }
214
215 func (x *Ncap) GetDstip() []byte {
216 if x != nil {
217 return x.Dstip
218 }
219 return nil
220 }
221
222 func (x *Ncap) GetLint0() uint32 {
223 if x != nil && x.Lint0 != nil {
224 return *x.Lint0
144225 }
145226 return 0
146227 }
147228
148 func (m *Ncap) GetLint1() uint32 {
149 if m != nil && m.Lint1 != nil {
150 return *m.Lint1
229 func (x *Ncap) GetLint1() uint32 {
230 if x != nil && x.Lint1 != nil {
231 return *x.Lint1
151232 }
152233 return 0
153234 }
154235
155 func init() {
156 proto.RegisterType((*Ncap)(nil), "nmsg.base.Ncap")
157 proto.RegisterEnum("nmsg.base.NcapType", NcapType_name, NcapType_value)
158 proto.RegisterEnum("nmsg.base.NcapLegacyType", NcapLegacyType_name, NcapLegacyType_value)
159 }
160
161 func init() { proto.RegisterFile("ncap.proto", fileDescriptor8) }
162
163 var fileDescriptor8 = []byte{
164 // 218 bytes of a gzipped FileDescriptorProto
165 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0x4b, 0x4e, 0x2c,
166 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b, 0x4a, 0x2c,
167 0x4e, 0x55, 0x5a, 0xc0, 0xc8, 0xc5, 0xe2, 0x07, 0x94, 0x11, 0x52, 0xe4, 0x62, 0x29, 0xa9, 0x2c,
168 0x48, 0x95, 0x60, 0x54, 0x60, 0xd2, 0xe0, 0x33, 0x12, 0xd6, 0x83, 0x2b, 0xd1, 0x03, 0x49, 0x87,
169 0x00, 0xa5, 0x84, 0xf8, 0xb9, 0xd8, 0x0b, 0x12, 0x2b, 0x73, 0xf2, 0x13, 0x53, 0x24, 0x98, 0x80,
170 0xaa, 0x78, 0x84, 0x34, 0xb8, 0x58, 0x73, 0xc0, 0x9a, 0x98, 0x15, 0x18, 0x81, 0x9a, 0x24, 0xd1,
171 0x34, 0xf9, 0xa4, 0xa6, 0x27, 0x26, 0x57, 0x82, 0xb5, 0xf2, 0x72, 0xb1, 0x16, 0x17, 0x25, 0x67,
172 0x16, 0x48, 0xb0, 0x00, 0x55, 0xf2, 0x80, 0xb8, 0x29, 0xc5, 0x25, 0x40, 0x2e, 0x2b, 0x8c, 0x9b,
173 0x93, 0x99, 0x57, 0x62, 0x20, 0xc1, 0x06, 0xe4, 0xf2, 0xc2, 0xb8, 0x86, 0x12, 0xec, 0x20, 0xae,
174 0x96, 0x16, 0x17, 0x07, 0xdc, 0x09, 0x1c, 0x5c, 0x2c, 0x9e, 0x01, 0x61, 0x26, 0x02, 0x0c, 0x50,
175 0x96, 0x99, 0x00, 0xa3, 0x10, 0x17, 0x17, 0x1b, 0xc4, 0x26, 0x01, 0x26, 0x2d, 0x6b, 0x2e, 0x3e,
176 0x34, 0x9b, 0x79, 0x20, 0xba, 0xe3, 0x43, 0x5d, 0x02, 0x80, 0xba, 0x60, 0xbc, 0x10, 0xe7, 0x00,
177 0xa0, 0x4e, 0x5e, 0x2e, 0x4e, 0x30, 0xcf, 0xd3, 0xd9, 0x37, 0x40, 0x80, 0x09, 0x10, 0x00, 0x00,
178 0xff, 0xff, 0x36, 0x82, 0xd0, 0xf3, 0x23, 0x01, 0x00, 0x00,
179 }
236 var File_ncap_proto protoreflect.FileDescriptor
237
238 var file_ncap_proto_rawDesc = []byte{
239 0x0a, 0x0a, 0x6e, 0x63, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6d,
240 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x4e, 0x63, 0x61, 0x70,
241 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x18,
242 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x4e, 0x63, 0x61, 0x70, 0x2e,
243 0x4e, 0x63, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18,
244 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52,
245 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x6c, 0x74, 0x79, 0x70,
246 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62,
247 0x61, 0x73, 0x65, 0x2e, 0x4e, 0x63, 0x61, 0x70, 0x2e, 0x4e, 0x63, 0x61, 0x70, 0x4c, 0x65, 0x67,
248 0x61, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x6c, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14,
249 0x0a, 0x05, 0x73, 0x72, 0x63, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73,
250 0x72, 0x63, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x73, 0x74, 0x69, 0x70, 0x18, 0x05, 0x20,
251 0x01, 0x28, 0x0c, 0x52, 0x05, 0x64, 0x73, 0x74, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69,
252 0x6e, 0x74, 0x30, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x74, 0x30,
253 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x74, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52,
254 0x05, 0x6c, 0x69, 0x6e, 0x74, 0x31, 0x22, 0x2a, 0x0a, 0x08, 0x4e, 0x63, 0x61, 0x70, 0x54, 0x79,
255 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x34, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04,
256 0x49, 0x50, 0x56, 0x36, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,
257 0x10, 0x02, 0x22, 0x2c, 0x0a, 0x0e, 0x4e, 0x63, 0x61, 0x70, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,
258 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a,
259 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x43, 0x4d, 0x50, 0x10, 0x02,
260 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66,
261 0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d,
262 0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
263 }
264
265 var (
266 file_ncap_proto_rawDescOnce sync.Once
267 file_ncap_proto_rawDescData = file_ncap_proto_rawDesc
268 )
269
270 func file_ncap_proto_rawDescGZIP() []byte {
271 file_ncap_proto_rawDescOnce.Do(func() {
272 file_ncap_proto_rawDescData = protoimpl.X.CompressGZIP(file_ncap_proto_rawDescData)
273 })
274 return file_ncap_proto_rawDescData
275 }
276
277 var file_ncap_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
278 var file_ncap_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
279 var file_ncap_proto_goTypes = []interface{}{
280 (Ncap_NcapType)(0), // 0: nmsg.base.Ncap.NcapType
281 (Ncap_NcapLegacyType)(0), // 1: nmsg.base.Ncap.NcapLegacyType
282 (*Ncap)(nil), // 2: nmsg.base.Ncap
283 }
284 var file_ncap_proto_depIdxs = []int32{
285 0, // 0: nmsg.base.Ncap.type:type_name -> nmsg.base.Ncap.NcapType
286 1, // 1: nmsg.base.Ncap.ltype:type_name -> nmsg.base.Ncap.NcapLegacyType
287 2, // [2:2] is the sub-list for method output_type
288 2, // [2:2] is the sub-list for method input_type
289 2, // [2:2] is the sub-list for extension type_name
290 2, // [2:2] is the sub-list for extension extendee
291 0, // [0:2] is the sub-list for field type_name
292 }
293
294 func init() { file_ncap_proto_init() }
295 func file_ncap_proto_init() {
296 if File_ncap_proto != nil {
297 return
298 }
299 if !protoimpl.UnsafeEnabled {
300 file_ncap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
301 switch v := v.(*Ncap); i {
302 case 0:
303 return &v.state
304 case 1:
305 return &v.sizeCache
306 case 2:
307 return &v.unknownFields
308 default:
309 return nil
310 }
311 }
312 }
313 type x struct{}
314 out := protoimpl.TypeBuilder{
315 File: protoimpl.DescBuilder{
316 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
317 RawDescriptor: file_ncap_proto_rawDesc,
318 NumEnums: 2,
319 NumMessages: 1,
320 NumExtensions: 0,
321 NumServices: 0,
322 },
323 GoTypes: file_ncap_proto_goTypes,
324 DependencyIndexes: file_ncap_proto_depIdxs,
325 EnumInfos: file_ncap_proto_enumTypes,
326 MessageInfos: file_ncap_proto_msgTypes,
327 }.Build()
328 File_ncap_proto = out.File
329 file_ncap_proto_rawDesc = nil
330 file_ncap_proto_goTypes = nil
331 file_ncap_proto_depIdxs = nil
332 }
00 syntax = "proto2";
11 package nmsg.base;
2
3 enum NcapType {
4 IPV4 = 0;
5 IPV6 = 1;
6 Legacy = 2;
7 }
8
9 enum NcapLegacyType {
10 Ncap_UDP = 0;
11 Ncap_TCP = 1;
12 Ncap_ICMP = 2;
13 }
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
143
154 message Ncap {
5 enum NcapType {
6 IPV4 = 0;
7 IPV6 = 1;
8 Legacy = 2;
9 }
10
11 enum NcapLegacyType {
12 UDP = 0;
13 TCP = 1;
14 ICMP = 2;
15 }
16
1617 required NcapType type = 1;
1718 required bytes payload = 2;
1819
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: packet.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
14
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
1421
1522 type PacketType int32
1623
2229 PacketType_IP PacketType = 1
2330 )
2431
25 var PacketType_name = map[int32]string{
26 1: "IP",
27 }
28 var PacketType_value = map[string]int32{
29 "IP": 1,
30 }
32 // Enum value maps for PacketType.
33 var (
34 PacketType_name = map[int32]string{
35 1: "IP",
36 }
37 PacketType_value = map[string]int32{
38 "IP": 1,
39 }
40 )
3141
3242 func (x PacketType) Enum() *PacketType {
3343 p := new(PacketType)
3444 *p = x
3545 return p
3646 }
47
3748 func (x PacketType) String() string {
38 return proto.EnumName(PacketType_name, int32(x))
39 }
40 func (x *PacketType) UnmarshalJSON(data []byte) error {
41 value, err := proto.UnmarshalJSONEnum(PacketType_value, data, "PacketType")
49 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
50 }
51
52 func (PacketType) Descriptor() protoreflect.EnumDescriptor {
53 return file_packet_proto_enumTypes[0].Descriptor()
54 }
55
56 func (PacketType) Type() protoreflect.EnumType {
57 return &file_packet_proto_enumTypes[0]
58 }
59
60 func (x PacketType) Number() protoreflect.EnumNumber {
61 return protoreflect.EnumNumber(x)
62 }
63
64 // Deprecated: Do not use.
65 func (x *PacketType) UnmarshalJSON(b []byte) error {
66 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
4267 if err != nil {
4368 return err
4469 }
45 *x = PacketType(value)
70 *x = PacketType(num)
4671 return nil
4772 }
48 func (PacketType) EnumDescriptor() ([]byte, []int) { return fileDescriptor9, []int{0} }
73
74 // Deprecated: Use PacketType.Descriptor instead.
75 func (PacketType) EnumDescriptor() ([]byte, []int) {
76 return file_packet_proto_rawDescGZIP(), []int{0}
77 }
4978
5079 type Packet struct {
51 PayloadType *PacketType `protobuf:"varint,1,req,name=payload_type,enum=nmsg.base.PacketType" json:"payload_type,omitempty"`
52 Payload []byte `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
53 XXX_unrecognized []byte `json:"-"`
54 }
55
56 func (m *Packet) Reset() { *m = Packet{} }
57 func (m *Packet) String() string { return proto.CompactTextString(m) }
58 func (*Packet) ProtoMessage() {}
59 func (*Packet) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{0} }
60
61 func (m *Packet) GetPayloadType() PacketType {
62 if m != nil && m.PayloadType != nil {
63 return *m.PayloadType
80 state protoimpl.MessageState
81 sizeCache protoimpl.SizeCache
82 unknownFields protoimpl.UnknownFields
83
84 PayloadType *PacketType `protobuf:"varint,1,req,name=payload_type,json=payloadType,enum=nmsg.base.PacketType" json:"payload_type,omitempty"`
85 Payload []byte `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
86 }
87
88 func (x *Packet) Reset() {
89 *x = Packet{}
90 if protoimpl.UnsafeEnabled {
91 mi := &file_packet_proto_msgTypes[0]
92 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
93 ms.StoreMessageInfo(mi)
94 }
95 }
96
97 func (x *Packet) String() string {
98 return protoimpl.X.MessageStringOf(x)
99 }
100
101 func (*Packet) ProtoMessage() {}
102
103 func (x *Packet) ProtoReflect() protoreflect.Message {
104 mi := &file_packet_proto_msgTypes[0]
105 if protoimpl.UnsafeEnabled && x != nil {
106 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
107 if ms.LoadMessageInfo() == nil {
108 ms.StoreMessageInfo(mi)
109 }
110 return ms
111 }
112 return mi.MessageOf(x)
113 }
114
115 // Deprecated: Use Packet.ProtoReflect.Descriptor instead.
116 func (*Packet) Descriptor() ([]byte, []int) {
117 return file_packet_proto_rawDescGZIP(), []int{0}
118 }
119
120 func (x *Packet) GetPayloadType() PacketType {
121 if x != nil && x.PayloadType != nil {
122 return *x.PayloadType
64123 }
65124 return PacketType_IP
66125 }
67126
68 func (m *Packet) GetPayload() []byte {
69 if m != nil {
70 return m.Payload
127 func (x *Packet) GetPayload() []byte {
128 if x != nil {
129 return x.Payload
71130 }
72131 return nil
73132 }
74133
75 func init() {
76 proto.RegisterType((*Packet)(nil), "nmsg.base.Packet")
77 proto.RegisterEnum("nmsg.base.PacketType", PacketType_name, PacketType_value)
78 }
79
80 func init() { proto.RegisterFile("packet.proto", fileDescriptor9) }
81
82 var fileDescriptor9 = []byte{
83 // 111 bytes of a gzipped FileDescriptorProto
84 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x48, 0x4c, 0xce,
85 0x4e, 0x2d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b,
86 0x4a, 0x2c, 0x4e, 0x55, 0x72, 0xe3, 0x62, 0x0b, 0x00, 0x4b, 0x09, 0x69, 0x83, 0x14, 0x55, 0xe6,
87 0xe4, 0x27, 0xa6, 0xc4, 0x97, 0x54, 0x16, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0xf0, 0x19, 0x89,
88 0xea, 0xc1, 0xd5, 0xea, 0x41, 0x14, 0x86, 0x00, 0x25, 0x85, 0xf8, 0xb9, 0xd8, 0xa1, 0x8a, 0x25,
89 0x98, 0x80, 0xea, 0x78, 0xb4, 0x44, 0xb8, 0xb8, 0x90, 0xa4, 0xd9, 0xb8, 0x98, 0x3c, 0x03, 0x04,
90 0x18, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x3e, 0xce, 0x93, 0x77, 0x00, 0x00, 0x00,
91 }
134 var File_packet_proto protoreflect.FileDescriptor
135
136 var file_packet_proto_rawDesc = []byte{
137 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09,
138 0x6e, 0x6d, 0x73, 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x63,
139 0x6b, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74,
140 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6e, 0x6d, 0x73, 0x67,
141 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65,
142 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a,
143 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07,
144 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x14, 0x0a, 0x0a, 0x50, 0x61, 0x63, 0x6b, 0x65,
145 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x50, 0x10, 0x01, 0x42, 0x2a, 0x5a,
146 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72, 0x73,
147 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67, 0x2f,
148 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
149 }
150
151 var (
152 file_packet_proto_rawDescOnce sync.Once
153 file_packet_proto_rawDescData = file_packet_proto_rawDesc
154 )
155
156 func file_packet_proto_rawDescGZIP() []byte {
157 file_packet_proto_rawDescOnce.Do(func() {
158 file_packet_proto_rawDescData = protoimpl.X.CompressGZIP(file_packet_proto_rawDescData)
159 })
160 return file_packet_proto_rawDescData
161 }
162
163 var file_packet_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
164 var file_packet_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
165 var file_packet_proto_goTypes = []interface{}{
166 (PacketType)(0), // 0: nmsg.base.PacketType
167 (*Packet)(nil), // 1: nmsg.base.Packet
168 }
169 var file_packet_proto_depIdxs = []int32{
170 0, // 0: nmsg.base.Packet.payload_type:type_name -> nmsg.base.PacketType
171 1, // [1:1] is the sub-list for method output_type
172 1, // [1:1] is the sub-list for method input_type
173 1, // [1:1] is the sub-list for extension type_name
174 1, // [1:1] is the sub-list for extension extendee
175 0, // [0:1] is the sub-list for field type_name
176 }
177
178 func init() { file_packet_proto_init() }
179 func file_packet_proto_init() {
180 if File_packet_proto != nil {
181 return
182 }
183 if !protoimpl.UnsafeEnabled {
184 file_packet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
185 switch v := v.(*Packet); i {
186 case 0:
187 return &v.state
188 case 1:
189 return &v.sizeCache
190 case 2:
191 return &v.unknownFields
192 default:
193 return nil
194 }
195 }
196 }
197 type x struct{}
198 out := protoimpl.TypeBuilder{
199 File: protoimpl.DescBuilder{
200 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
201 RawDescriptor: file_packet_proto_rawDesc,
202 NumEnums: 1,
203 NumMessages: 1,
204 NumExtensions: 0,
205 NumServices: 0,
206 },
207 GoTypes: file_packet_proto_goTypes,
208 DependencyIndexes: file_packet_proto_depIdxs,
209 EnumInfos: file_packet_proto_enumTypes,
210 MessageInfos: file_packet_proto_msgTypes,
211 }.Build()
212 File_packet_proto = out.File
213 file_packet_proto_rawDesc = nil
214 file_packet_proto_goTypes = nil
215 file_packet_proto_depIdxs = nil
216 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
34 enum PacketType {
45 // An IPv4 or IPv6 packet. The packet begins immediately with the IP
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: pkt.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
914
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
1421
1522 type Pkt struct {
16 Payload []byte `protobuf:"bytes,1,req,name=payload" json:"payload,omitempty"`
17 LenFrame *uint32 `protobuf:"varint,2,opt,name=len_frame" json:"len_frame,omitempty"`
18 XXX_unrecognized []byte `json:"-"`
23 state protoimpl.MessageState
24 sizeCache protoimpl.SizeCache
25 unknownFields protoimpl.UnknownFields
26
27 Payload []byte `protobuf:"bytes,1,req,name=payload" json:"payload,omitempty"`
28 LenFrame *uint32 `protobuf:"varint,2,opt,name=len_frame,json=lenFrame" json:"len_frame,omitempty"`
1929 }
2030
21 func (m *Pkt) Reset() { *m = Pkt{} }
22 func (m *Pkt) String() string { return proto.CompactTextString(m) }
23 func (*Pkt) ProtoMessage() {}
24 func (*Pkt) Descriptor() ([]byte, []int) { return fileDescriptor10, []int{0} }
31 func (x *Pkt) Reset() {
32 *x = Pkt{}
33 if protoimpl.UnsafeEnabled {
34 mi := &file_pkt_proto_msgTypes[0]
35 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
36 ms.StoreMessageInfo(mi)
37 }
38 }
2539
26 func (m *Pkt) GetPayload() []byte {
27 if m != nil {
28 return m.Payload
40 func (x *Pkt) String() string {
41 return protoimpl.X.MessageStringOf(x)
42 }
43
44 func (*Pkt) ProtoMessage() {}
45
46 func (x *Pkt) ProtoReflect() protoreflect.Message {
47 mi := &file_pkt_proto_msgTypes[0]
48 if protoimpl.UnsafeEnabled && x != nil {
49 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
50 if ms.LoadMessageInfo() == nil {
51 ms.StoreMessageInfo(mi)
52 }
53 return ms
54 }
55 return mi.MessageOf(x)
56 }
57
58 // Deprecated: Use Pkt.ProtoReflect.Descriptor instead.
59 func (*Pkt) Descriptor() ([]byte, []int) {
60 return file_pkt_proto_rawDescGZIP(), []int{0}
61 }
62
63 func (x *Pkt) GetPayload() []byte {
64 if x != nil {
65 return x.Payload
2966 }
3067 return nil
3168 }
3269
33 func (m *Pkt) GetLenFrame() uint32 {
34 if m != nil && m.LenFrame != nil {
35 return *m.LenFrame
70 func (x *Pkt) GetLenFrame() uint32 {
71 if x != nil && x.LenFrame != nil {
72 return *x.LenFrame
3673 }
3774 return 0
3875 }
3976
40 func init() {
41 proto.RegisterType((*Pkt)(nil), "nmsg.base.Pkt")
77 var File_pkt_proto protoreflect.FileDescriptor
78
79 var file_pkt_proto_rawDesc = []byte{
80 0x0a, 0x09, 0x70, 0x6b, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6d, 0x73,
81 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0x3c, 0x0a, 0x03, 0x50, 0x6b, 0x74, 0x12, 0x18, 0x0a,
82 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07,
83 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x6e, 0x5f, 0x66,
84 0x72, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x65, 0x6e, 0x46,
85 0x72, 0x61, 0x6d, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
86 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67,
87 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62, 0x61, 0x73, 0x65,
4288 }
4389
44 func init() { proto.RegisterFile("pkt.proto", fileDescriptor10) }
90 var (
91 file_pkt_proto_rawDescOnce sync.Once
92 file_pkt_proto_rawDescData = file_pkt_proto_rawDesc
93 )
4594
46 var fileDescriptor10 = []byte{
47 // 89 bytes of a gzipped FileDescriptorProto
48 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2c, 0xc8, 0x2e, 0xd1,
49 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b, 0x4a, 0x2c, 0x4e,
50 0x55, 0xd2, 0xe4, 0x62, 0x0e, 0xc8, 0x2e, 0x11, 0xe2, 0xe7, 0x62, 0x2f, 0x48, 0xac, 0xcc, 0xc9,
51 0x4f, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd2, 0xe0, 0x11, 0x12, 0xe4, 0xe2, 0xcc, 0x49, 0xcd, 0x8b,
52 0x4f, 0x2b, 0x4a, 0xcc, 0x4d, 0x95, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x05, 0x04, 0x00, 0x00, 0xff,
53 0xff, 0x9d, 0xda, 0xa2, 0xb6, 0x41, 0x00, 0x00, 0x00,
95 func file_pkt_proto_rawDescGZIP() []byte {
96 file_pkt_proto_rawDescOnce.Do(func() {
97 file_pkt_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkt_proto_rawDescData)
98 })
99 return file_pkt_proto_rawDescData
54100 }
101
102 var file_pkt_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
103 var file_pkt_proto_goTypes = []interface{}{
104 (*Pkt)(nil), // 0: nmsg.base.Pkt
105 }
106 var file_pkt_proto_depIdxs = []int32{
107 0, // [0:0] is the sub-list for method output_type
108 0, // [0:0] is the sub-list for method input_type
109 0, // [0:0] is the sub-list for extension type_name
110 0, // [0:0] is the sub-list for extension extendee
111 0, // [0:0] is the sub-list for field type_name
112 }
113
114 func init() { file_pkt_proto_init() }
115 func file_pkt_proto_init() {
116 if File_pkt_proto != nil {
117 return
118 }
119 if !protoimpl.UnsafeEnabled {
120 file_pkt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
121 switch v := v.(*Pkt); i {
122 case 0:
123 return &v.state
124 case 1:
125 return &v.sizeCache
126 case 2:
127 return &v.unknownFields
128 default:
129 return nil
130 }
131 }
132 }
133 type x struct{}
134 out := protoimpl.TypeBuilder{
135 File: protoimpl.DescBuilder{
136 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
137 RawDescriptor: file_pkt_proto_rawDesc,
138 NumEnums: 0,
139 NumMessages: 1,
140 NumExtensions: 0,
141 NumServices: 0,
142 },
143 GoTypes: file_pkt_proto_goTypes,
144 DependencyIndexes: file_pkt_proto_depIdxs,
145 MessageInfos: file_pkt_proto_msgTypes,
146 }.Build()
147 File_pkt_proto = out.File
148 file_pkt_proto_rawDesc = nil
149 file_pkt_proto_goTypes = nil
150 file_pkt_proto_depIdxs = nil
151 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
34 message Pkt {
45 required bytes payload = 1;
0 // Code generated by protoc-gen-go.
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
14 // source: xml.proto
2 // DO NOT EDIT!
35
46 package nmsg_base
57
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
914
10 // Reference imports to suppress errors if they are not otherwise used.
11 var _ = proto.Marshal
12 var _ = fmt.Errorf
13 var _ = math.Inf
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
1421
1522 type Xml struct {
16 Xmltype []byte `protobuf:"bytes,1,req,name=xmltype" json:"xmltype,omitempty"`
17 Xmlpayload []byte `protobuf:"bytes,2,req,name=xmlpayload" json:"xmlpayload,omitempty"`
18 XXX_unrecognized []byte `json:"-"`
23 state protoimpl.MessageState
24 sizeCache protoimpl.SizeCache
25 unknownFields protoimpl.UnknownFields
26
27 Xmltype []byte `protobuf:"bytes,1,req,name=xmltype" json:"xmltype,omitempty"`
28 Xmlpayload []byte `protobuf:"bytes,2,req,name=xmlpayload" json:"xmlpayload,omitempty"`
1929 }
2030
21 func (m *Xml) Reset() { *m = Xml{} }
22 func (m *Xml) String() string { return proto.CompactTextString(m) }
23 func (*Xml) ProtoMessage() {}
24 func (*Xml) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} }
31 func (x *Xml) Reset() {
32 *x = Xml{}
33 if protoimpl.UnsafeEnabled {
34 mi := &file_xml_proto_msgTypes[0]
35 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
36 ms.StoreMessageInfo(mi)
37 }
38 }
2539
26 func (m *Xml) GetXmltype() []byte {
27 if m != nil {
28 return m.Xmltype
40 func (x *Xml) String() string {
41 return protoimpl.X.MessageStringOf(x)
42 }
43
44 func (*Xml) ProtoMessage() {}
45
46 func (x *Xml) ProtoReflect() protoreflect.Message {
47 mi := &file_xml_proto_msgTypes[0]
48 if protoimpl.UnsafeEnabled && x != nil {
49 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
50 if ms.LoadMessageInfo() == nil {
51 ms.StoreMessageInfo(mi)
52 }
53 return ms
54 }
55 return mi.MessageOf(x)
56 }
57
58 // Deprecated: Use Xml.ProtoReflect.Descriptor instead.
59 func (*Xml) Descriptor() ([]byte, []int) {
60 return file_xml_proto_rawDescGZIP(), []int{0}
61 }
62
63 func (x *Xml) GetXmltype() []byte {
64 if x != nil {
65 return x.Xmltype
2966 }
3067 return nil
3168 }
3269
33 func (m *Xml) GetXmlpayload() []byte {
34 if m != nil {
35 return m.Xmlpayload
70 func (x *Xml) GetXmlpayload() []byte {
71 if x != nil {
72 return x.Xmlpayload
3673 }
3774 return nil
3875 }
3976
40 func init() {
41 proto.RegisterType((*Xml)(nil), "nmsg.base.Xml")
77 var File_xml_proto protoreflect.FileDescriptor
78
79 var file_xml_proto_rawDesc = []byte{
80 0x0a, 0x09, 0x78, 0x6d, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6d, 0x73,
81 0x67, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x03, 0x58, 0x6d, 0x6c, 0x12, 0x18, 0x0a,
82 0x07, 0x78, 0x6d, 0x6c, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x07,
83 0x78, 0x6d, 0x6c, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x78, 0x6d, 0x6c, 0x70, 0x61,
84 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x0a, 0x78, 0x6d, 0x6c,
85 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75,
86 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65,
87 0x63, 0x2f, 0x67, 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67, 0x2f, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x62,
88 0x61, 0x73, 0x65,
4289 }
4390
44 func init() { proto.RegisterFile("xml.proto", fileDescriptor11) }
91 var (
92 file_xml_proto_rawDescOnce sync.Once
93 file_xml_proto_rawDescData = file_xml_proto_rawDesc
94 )
4595
46 var fileDescriptor11 = []byte{
47 // 86 bytes of a gzipped FileDescriptorProto
48 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xac, 0xc8, 0xcd, 0xd1,
49 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcb, 0x2d, 0x4e, 0xd7, 0x4b, 0x4a, 0x2c, 0x4e,
50 0x55, 0xd2, 0xe2, 0x62, 0x8e, 0xc8, 0xcd, 0x11, 0xe2, 0xe7, 0x62, 0x07, 0x4a, 0x97, 0x54, 0x16,
51 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x69, 0xf0, 0x08, 0x09, 0x71, 0x71, 0x01, 0x05, 0x0a, 0x12, 0x2b,
52 0x73, 0xf2, 0x13, 0x53, 0x24, 0x98, 0x40, 0x62, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x92,
53 0x10, 0x81, 0x42, 0x00, 0x00, 0x00,
96 func file_xml_proto_rawDescGZIP() []byte {
97 file_xml_proto_rawDescOnce.Do(func() {
98 file_xml_proto_rawDescData = protoimpl.X.CompressGZIP(file_xml_proto_rawDescData)
99 })
100 return file_xml_proto_rawDescData
54101 }
102
103 var file_xml_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
104 var file_xml_proto_goTypes = []interface{}{
105 (*Xml)(nil), // 0: nmsg.base.Xml
106 }
107 var file_xml_proto_depIdxs = []int32{
108 0, // [0:0] is the sub-list for method output_type
109 0, // [0:0] is the sub-list for method input_type
110 0, // [0:0] is the sub-list for extension type_name
111 0, // [0:0] is the sub-list for extension extendee
112 0, // [0:0] is the sub-list for field type_name
113 }
114
115 func init() { file_xml_proto_init() }
116 func file_xml_proto_init() {
117 if File_xml_proto != nil {
118 return
119 }
120 if !protoimpl.UnsafeEnabled {
121 file_xml_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
122 switch v := v.(*Xml); i {
123 case 0:
124 return &v.state
125 case 1:
126 return &v.sizeCache
127 case 2:
128 return &v.unknownFields
129 default:
130 return nil
131 }
132 }
133 }
134 type x struct{}
135 out := protoimpl.TypeBuilder{
136 File: protoimpl.DescBuilder{
137 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
138 RawDescriptor: file_xml_proto_rawDesc,
139 NumEnums: 0,
140 NumMessages: 1,
141 NumExtensions: 0,
142 NumServices: 0,
143 },
144 GoTypes: file_xml_proto_goTypes,
145 DependencyIndexes: file_xml_proto_depIdxs,
146 MessageInfos: file_xml_proto_msgTypes,
147 }.Build()
148 File_xml_proto = out.File
149 file_xml_proto_rawDesc = nil
150 file_xml_proto_goTypes = nil
151 file_xml_proto_depIdxs = nil
152 }
00 syntax = "proto2";
11 package nmsg.base;
2 option go_package = "github.com/farsightsec/go-nmsg/nmsg_base";
23
34 message Xml {
45 required bytes xmltype = 1;
1111 "encoding/binary"
1212 "time"
1313
14 "github.com/golang/protobuf/proto"
14 "google.golang.org/protobuf/proto"
1515 )
1616
1717 // Payload encapsulates an nmsg message in a NmsgPayload, suitable for sending to
1111 "testing"
1212
1313 "github.com/farsightsec/go-nmsg"
14 "github.com/golang/protobuf/proto"
1514 )
1615
1716 func testMessage(length int) nmsg.Message {
18 return &testMsg{Bytes: make([]byte, length)}
17 return &TestMessage{Bytes: make([]byte, length)}
1918 }
2019
2120 func testPayload(length int) *nmsg.NmsgPayload {
2625 return p
2726 }
2827
29 type testMsg struct {
30 Bytes []byte `protobuf:"bytes,2,opt,name=bytes"`
31 }
32
33 func (t *testMsg) GetVid() uint32 { return 10 }
34 func (t *testMsg) GetMsgtype() uint32 { return 20 }
35
36 func (t *testMsg) Reset() { *t = testMsg{} }
37 func (t *testMsg) String() string { return proto.CompactTextString(t) }
38 func (t *testMsg) ProtoMessage() {}
28 func (t *TestMessage) GetVid() uint32 { return 10 }
29 func (t *TestMessage) GetMsgtype() uint32 { return 20 }
3930
4031 func init() {
41 nmsg.Register(&testMsg{})
32 nmsg.Register(&TestMessage{})
4233 }
4334
4435 func TestRegister(t *testing.T) {
4637 if err != nil {
4738 t.Error(err)
4839 }
49 if _, ok := msg.(*testMsg); !ok {
40 if _, ok := msg.(*TestMessage); !ok {
5041 t.Errorf("NewMessage returned wrong type")
5142 }
5243 }
6253 t.Error(err)
6354 }
6455
65 if tp, ok := m.(*testMsg); !ok {
56 if tp, ok := m.(*TestMessage); !ok {
6657 t.Errorf("Wrong type from payload")
6758 } else if len(tp.Bytes) != 1000 {
6859 t.Error("decode failed")
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // versions:
2 // protoc-gen-go v1.25.0-devel
3 // protoc (unknown)
4 // source: payload_test.proto
5
6 package nmsg_test
7
8 import (
9 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
10 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
11 reflect "reflect"
12 sync "sync"
13 )
14
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 type TestMessage struct {
23 state protoimpl.MessageState
24 sizeCache protoimpl.SizeCache
25 unknownFields protoimpl.UnknownFields
26
27 Bytes []byte `protobuf:"bytes,2,opt,name=bytes" json:"bytes,omitempty"`
28 }
29
30 func (x *TestMessage) Reset() {
31 *x = TestMessage{}
32 if protoimpl.UnsafeEnabled {
33 mi := &file_payload_test_proto_msgTypes[0]
34 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
35 ms.StoreMessageInfo(mi)
36 }
37 }
38
39 func (x *TestMessage) String() string {
40 return protoimpl.X.MessageStringOf(x)
41 }
42
43 func (*TestMessage) ProtoMessage() {}
44
45 func (x *TestMessage) ProtoReflect() protoreflect.Message {
46 mi := &file_payload_test_proto_msgTypes[0]
47 if protoimpl.UnsafeEnabled && x != nil {
48 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
49 if ms.LoadMessageInfo() == nil {
50 ms.StoreMessageInfo(mi)
51 }
52 return ms
53 }
54 return mi.MessageOf(x)
55 }
56
57 // Deprecated: Use TestMessage.ProtoReflect.Descriptor instead.
58 func (*TestMessage) Descriptor() ([]byte, []int) {
59 return file_payload_test_proto_rawDescGZIP(), []int{0}
60 }
61
62 func (x *TestMessage) GetBytes() []byte {
63 if x != nil {
64 return x.Bytes
65 }
66 return nil
67 }
68
69 var File_payload_test_proto protoreflect.FileDescriptor
70
71 var file_payload_test_proto_rawDesc = []byte{
72 0x0a, 0x12, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70,
73 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x22,
74 0x23, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14,
75 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62,
76 0x79, 0x74, 0x65, 0x73, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
77 0x6f, 0x6d, 0x2f, 0x66, 0x61, 0x72, 0x73, 0x69, 0x67, 0x68, 0x74, 0x73, 0x65, 0x63, 0x2f, 0x67,
78 0x6f, 0x2d, 0x6e, 0x6d, 0x73, 0x67, 0x3b, 0x6e, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x65, 0x73, 0x74,
79 }
80
81 var (
82 file_payload_test_proto_rawDescOnce sync.Once
83 file_payload_test_proto_rawDescData = file_payload_test_proto_rawDesc
84 )
85
86 func file_payload_test_proto_rawDescGZIP() []byte {
87 file_payload_test_proto_rawDescOnce.Do(func() {
88 file_payload_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_payload_test_proto_rawDescData)
89 })
90 return file_payload_test_proto_rawDescData
91 }
92
93 var file_payload_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
94 var file_payload_test_proto_goTypes = []interface{}{
95 (*TestMessage)(nil), // 0: nmsg_test.TestMessage
96 }
97 var file_payload_test_proto_depIdxs = []int32{
98 0, // [0:0] is the sub-list for method output_type
99 0, // [0:0] is the sub-list for method input_type
100 0, // [0:0] is the sub-list for extension type_name
101 0, // [0:0] is the sub-list for extension extendee
102 0, // [0:0] is the sub-list for field type_name
103 }
104
105 func init() { file_payload_test_proto_init() }
106 func file_payload_test_proto_init() {
107 if File_payload_test_proto != nil {
108 return
109 }
110 if !protoimpl.UnsafeEnabled {
111 file_payload_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
112 switch v := v.(*TestMessage); i {
113 case 0:
114 return &v.state
115 case 1:
116 return &v.sizeCache
117 case 2:
118 return &v.unknownFields
119 default:
120 return nil
121 }
122 }
123 }
124 type x struct{}
125 out := protoimpl.TypeBuilder{
126 File: protoimpl.DescBuilder{
127 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
128 RawDescriptor: file_payload_test_proto_rawDesc,
129 NumEnums: 0,
130 NumMessages: 1,
131 NumExtensions: 0,
132 NumServices: 0,
133 },
134 GoTypes: file_payload_test_proto_goTypes,
135 DependencyIndexes: file_payload_test_proto_depIdxs,
136 MessageInfos: file_payload_test_proto_msgTypes,
137 }.Build()
138 File_payload_test_proto = out.File
139 file_payload_test_proto_rawDesc = nil
140 file_payload_test_proto_goTypes = nil
141 file_payload_test_proto_depIdxs = nil
142 }
0 syntax = "proto2";
1 package nmsg_test;
2 option go_package = "github.com/farsightsec/go-nmsg;nmsg_test";
3
4 message TestMessage {
5 optional bytes bytes = 2;
6 }
3737 if err != nil {
3838 t.Fatal(err)
3939 }
40 mi, ok := mm.(*testMsg)
40 mi, ok := mm.(*TestMessage)
4141 if !ok {
4242 t.Error("received message of wrong type")
4343 }
44 if len(mi.Bytes) != len(m.(*testMsg).Bytes) {
44 if len(mi.Bytes) != len(m.(*TestMessage).Bytes) {
4545 t.Error("received message of wrong length")
4646 }
4747 for i := range mi.Bytes {