Package list golang-github-farsightsec-go-nmsg / upstream/0.2.0
New upstream version 0.2.0 Sascha Steinbiss 7 months 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