diff options
80 files changed, 4199 insertions, 483 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 124bc93..e8dab62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml | |||
@@ -1,16 +1,24 @@ | |||
1 | --- | 1 | --- |
2 | version: 2.1 | 2 | version: 2.1 |
3 | 3 | ||
4 | jobs: | 4 | executors: |
5 | test: | 5 | # Whenever the Go version is updated here, .promu.yml should |
6 | # also be updated. | ||
7 | golang: | ||
6 | docker: | 8 | docker: |
7 | - image: circleci/golang:1.11 | 9 | - image: circleci/golang:1.11 |
8 | working_directory: /go/src/github.com/prometheus/node_exporter | 10 | |
11 | jobs: | ||
12 | test: | ||
13 | executor: golang | ||
9 | 14 | ||
10 | steps: | 15 | steps: |
11 | - checkout | 16 | - checkout |
12 | - run: make promu | 17 | - run: make promu |
13 | - run: make | 18 | - run: make |
19 | - store_artifacts: | ||
20 | path: node_exporter | ||
21 | destination: /build/node_exporter | ||
14 | - run: rm -v node_exporter | 22 | - run: rm -v node_exporter |
15 | 23 | ||
16 | codespell: | 24 | codespell: |
@@ -24,7 +32,6 @@ jobs: | |||
24 | 32 | ||
25 | build: | 33 | build: |
26 | machine: true | 34 | machine: true |
27 | working_directory: /home/circleci/.go_workspace/src/github.com/prometheus/node_exporter | ||
28 | 35 | ||
29 | environment: | 36 | environment: |
30 | DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.11-base | 37 | DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.11-base |
@@ -33,12 +40,15 @@ jobs: | |||
33 | steps: | 40 | steps: |
34 | - checkout | 41 | - checkout |
35 | - run: make promu | 42 | - run: make promu |
36 | - run: promu crossbuild -v --go 1.11 | 43 | - run: promu crossbuild |
37 | - run: promu --config .promu-cgo.yml crossbuild -v --go 1.11 | 44 | - run: promu --config .promu-cgo.yml crossbuild |
38 | - persist_to_workspace: | 45 | - persist_to_workspace: |
39 | root: . | 46 | root: . |
40 | paths: | 47 | paths: |
41 | - .build | 48 | - .build |
49 | - store_artifacts: | ||
50 | path: .build | ||
51 | destination: /build | ||
42 | - run: ln -s .build/linux-amd64/node_exporter node_exporter | 52 | - run: ln -s .build/linux-amd64/node_exporter node_exporter |
43 | - run: | 53 | - run: |
44 | command: | | 54 | command: | |
@@ -58,9 +68,7 @@ jobs: | |||
58 | fi | 68 | fi |
59 | 69 | ||
60 | docker_hub_master: | 70 | docker_hub_master: |
61 | docker: | 71 | executor: golang |
62 | - image: circleci/golang:1.11 | ||
63 | working_directory: /go/src/github.com/prometheus/node_exporter | ||
64 | 72 | ||
65 | steps: | 73 | steps: |
66 | - checkout | 74 | - checkout |
@@ -77,9 +85,7 @@ jobs: | |||
77 | - run: make docker-publish DOCKER_REPO=quay.io/prometheus | 85 | - run: make docker-publish DOCKER_REPO=quay.io/prometheus |
78 | 86 | ||
79 | docker_hub_release_tags: | 87 | docker_hub_release_tags: |
80 | docker: | 88 | executor: golang |
81 | - image: circleci/golang:1.11 | ||
82 | working_directory: /go/src/github.com/prometheus/node_exporter | ||
83 | 89 | ||
84 | steps: | 90 | steps: |
85 | - checkout | 91 | - checkout |
diff --git a/.promu-cgo.yml b/.promu-cgo.yml index adb6d19..a4e0a3c 100644 --- a/.promu-cgo.yml +++ b/.promu-cgo.yml | |||
@@ -5,13 +5,13 @@ repository: | |||
5 | build: | 5 | build: |
6 | binaries: | 6 | binaries: |
7 | - name: node_exporter | 7 | - name: node_exporter |
8 | flags: -a -tags 'netgo static_build' | 8 | flags: -mod=vendor -a -tags 'netgo static_build' |
9 | ldflags: | | 9 | ldflags: | |
10 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}} | 10 | -X github.com/prometheus/common/version.Version={{.Version}} |
11 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}} | 11 | -X github.com/prometheus/common/version.Revision={{.Revision}} |
12 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}} | 12 | -X github.com/prometheus/common/version.Branch={{.Branch}} |
13 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildUser={{user}}@{{host}} | 13 | -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}} |
14 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} | 14 | -X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} |
15 | tarball: | 15 | tarball: |
16 | files: | 16 | files: |
17 | - LICENSE | 17 | - LICENSE |
@@ -3,13 +3,13 @@ repository: | |||
3 | build: | 3 | build: |
4 | binaries: | 4 | binaries: |
5 | - name: node_exporter | 5 | - name: node_exporter |
6 | flags: -a -tags 'netgo static_build' | 6 | flags: -mod=vendor -a -tags 'netgo static_build' |
7 | ldflags: | | 7 | ldflags: | |
8 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}} | 8 | -X github.com/prometheus/common/version.Version={{.Version}} |
9 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}} | 9 | -X github.com/prometheus/common/version.Revision={{.Revision}} |
10 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}} | 10 | -X github.com/prometheus/common/version.Branch={{.Branch}} |
11 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildUser={{user}}@{{host}} | 11 | -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}} |
12 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} | 12 | -X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} |
13 | tarball: | 13 | tarball: |
14 | files: | 14 | files: |
15 | - LICENSE | 15 | - LICENSE |
@@ -17,7 +17,9 @@ GO ?= GO15VENDOREXPERIMENT=1 go | |||
17 | GOARCH := $(shell $(GO) env GOARCH) | 17 | GOARCH := $(shell $(GO) env GOARCH) |
18 | GOHOSTARCH := $(shell $(GO) env GOHOSTARCH) | 18 | GOHOSTARCH := $(shell $(GO) env GOHOSTARCH) |
19 | 19 | ||
20 | PROMTOOL ?= $(FIRST_GOPATH)/bin/promtool | 20 | PROMTOOL_VERSION ?= 2.5.0 |
21 | PROMTOOL_URL ?= https://github.com/prometheus/prometheus/releases/download/v$(PROMTOOL_VERSION)/prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM).tar.gz | ||
22 | PROMTOOL ?= $(FIRST_GOPATH)/bin/promtool | ||
21 | 23 | ||
22 | DOCKER_IMAGE_NAME ?= node-exporter | 24 | DOCKER_IMAGE_NAME ?= node-exporter |
23 | MACH ?= $(shell uname -m) | 25 | MACH ?= $(shell uname -m) |
@@ -139,6 +141,14 @@ test-docker: | |||
139 | @echo ">> testing docker image" | 141 | @echo ">> testing docker image" |
140 | ./test_image.sh "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" 9100 | 142 | ./test_image.sh "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" 9100 |
141 | 143 | ||
142 | .PHONY: promtool $(FIRST_GOPATH)/bin/promtool | 144 | .PHONY: promtool |
143 | $(FIRST_GOPATH)/bin/promtool promtool: | 145 | promtool: $(PROMTOOL) |
144 | @GOOS= GOARCH= $(GO) get -u github.com/prometheus/prometheus/cmd/promtool | 146 | |
147 | .PHONY: $(PROMTOOL) | ||
148 | $(PROMTOOL): | ||
149 | $(eval PROMTOOL_TMP := $(shell mktemp -d)) | ||
150 | curl -s -L $(PROMTOOL_URL) | tar -xvzf - -C $(PROMTOOL_TMP) | ||
151 | mkdir -p $(FIRST_GOPATH)/bin | ||
152 | cp $(PROMTOOL_TMP)/prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM)/promtool $(FIRST_GOPATH)/bin/promtool | ||
153 | rm -r $(PROMTOOL_TMP) | ||
154 | |||
diff --git a/Makefile.common b/Makefile.common index 61ef11d..8e135c5 100644 --- a/Makefile.common +++ b/Makefile.common | |||
@@ -16,7 +16,7 @@ | |||
16 | # !!! Open PRs only against the prometheus/prometheus/Makefile.common repository! | 16 | # !!! Open PRs only against the prometheus/prometheus/Makefile.common repository! |
17 | 17 | ||
18 | # Example usage : | 18 | # Example usage : |
19 | # Create the main Makefile in the root project directory. | 19 | # Create the main Makefile in the root project directory. |
20 | # include Makefile.common | 20 | # include Makefile.common |
21 | # customTarget: | 21 | # customTarget: |
22 | # @echo ">> Running customTarget" | 22 | # @echo ">> Running customTarget" |
@@ -28,18 +28,53 @@ unexport GOBIN | |||
28 | GO ?= go | 28 | GO ?= go |
29 | GOFMT ?= $(GO)fmt | 29 | GOFMT ?= $(GO)fmt |
30 | FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH))) | 30 | FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH))) |
31 | GOOPTS ?= | ||
32 | |||
33 | GO_VERSION ?= $(shell $(GO) version) | ||
34 | GO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION)) | ||
35 | PRE_GO_111 ?= $(shell echo $(GO_VERSION_NUMBER) | grep -E 'go1\.(10|[0-9])\.') | ||
36 | |||
37 | unexport GOVENDOR | ||
38 | ifeq (, $(PRE_GO_111)) | ||
39 | ifneq (,$(wildcard go.mod)) | ||
40 | # Enforce Go modules support just in case the directory is inside GOPATH (and for Travis CI). | ||
41 | GO111MODULE := on | ||
42 | |||
43 | ifneq (,$(wildcard vendor)) | ||
44 | # Always use the local vendor/ directory to satisfy the dependencies. | ||
45 | GOOPTS := $(GOOPTS) -mod=vendor | ||
46 | endif | ||
47 | endif | ||
48 | else | ||
49 | ifneq (,$(wildcard go.mod)) | ||
50 | ifneq (,$(wildcard vendor)) | ||
51 | $(warning This repository requires Go >= 1.11 because of Go modules) | ||
52 | $(warning Some recipes may not work as expected as the current Go runtime is '$(GO_VERSION_NUMBER)') | ||
53 | endif | ||
54 | else | ||
55 | # This repository isn't using Go modules (yet). | ||
56 | GOVENDOR := $(FIRST_GOPATH)/bin/govendor | ||
57 | endif | ||
58 | |||
59 | unexport GO111MODULE | ||
60 | endif | ||
31 | PROMU := $(FIRST_GOPATH)/bin/promu | 61 | PROMU := $(FIRST_GOPATH)/bin/promu |
32 | STATICCHECK := $(FIRST_GOPATH)/bin/staticcheck | 62 | STATICCHECK := $(FIRST_GOPATH)/bin/staticcheck |
33 | GOVENDOR := $(FIRST_GOPATH)/bin/govendor | ||
34 | pkgs = ./... | 63 | pkgs = ./... |
35 | 64 | ||
65 | GO_VERSION ?= $(shell $(GO) version) | ||
66 | GO_BUILD_PLATFORM ?= $(subst /,-,$(lastword $(GO_VERSION))) | ||
67 | |||
68 | PROMU_VERSION ?= 0.2.0 | ||
69 | PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz | ||
70 | |||
36 | PREFIX ?= $(shell pwd) | 71 | PREFIX ?= $(shell pwd) |
37 | BIN_DIR ?= $(shell pwd) | 72 | BIN_DIR ?= $(shell pwd) |
38 | DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) | 73 | DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) |
39 | DOCKER_REPO ?= prom | 74 | DOCKER_REPO ?= prom |
40 | 75 | ||
41 | .PHONY: all | 76 | .PHONY: all |
42 | all: style staticcheck unused build test | 77 | all: precheck style staticcheck unused build test |
43 | 78 | ||
44 | # This rule is used to forward a target like "build" to "common-build". This | 79 | # This rule is used to forward a target like "build" to "common-build". This |
45 | # allows a new "build" target to be defined in a Makefile which includes this | 80 | # allows a new "build" target to be defined in a Makefile which includes this |
@@ -49,7 +84,12 @@ all: style staticcheck unused build test | |||
49 | .PHONY: common-style | 84 | .PHONY: common-style |
50 | common-style: | 85 | common-style: |
51 | @echo ">> checking code style" | 86 | @echo ">> checking code style" |
52 | ! $(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print) | grep '^' | 87 | @fmtRes=$$($(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \ |
88 | if [ -n "$${fmtRes}" ]; then \ | ||
89 | echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \ | ||
90 | echo "Please ensure you are using $$($(GO) version) for formatting code."; \ | ||
91 | exit 1; \ | ||
92 | fi | ||
53 | 93 | ||
54 | .PHONY: common-check_license | 94 | .PHONY: common-check_license |
55 | common-check_license: | 95 | common-check_license: |
@@ -65,37 +105,54 @@ common-check_license: | |||
65 | .PHONY: common-test-short | 105 | .PHONY: common-test-short |
66 | common-test-short: | 106 | common-test-short: |
67 | @echo ">> running short tests" | 107 | @echo ">> running short tests" |
68 | $(GO) test -short $(pkgs) | 108 | GO111MODULE=$(GO111MODULE) $(GO) test -short $(GOOPTS) $(pkgs) |
69 | 109 | ||
70 | .PHONY: common-test | 110 | .PHONY: common-test |
71 | common-test: | 111 | common-test: |
72 | @echo ">> running all tests" | 112 | @echo ">> running all tests" |
73 | $(GO) test -race $(pkgs) | 113 | GO111MODULE=$(GO111MODULE) $(GO) test -race $(GOOPTS) $(pkgs) |
74 | 114 | ||
75 | .PHONY: common-format | 115 | .PHONY: common-format |
76 | common-format: | 116 | common-format: |
77 | @echo ">> formatting code" | 117 | @echo ">> formatting code" |
78 | $(GO) fmt $(pkgs) | 118 | GO111MODULE=$(GO111MODULE) $(GO) fmt $(GOOPTS) $(pkgs) |
79 | 119 | ||
80 | .PHONY: common-vet | 120 | .PHONY: common-vet |
81 | common-vet: | 121 | common-vet: |
82 | @echo ">> vetting code" | 122 | @echo ">> vetting code" |
83 | $(GO) vet $(pkgs) | 123 | GO111MODULE=$(GO111MODULE) $(GO) vet $(GOOPTS) $(pkgs) |
84 | 124 | ||
85 | .PHONY: common-staticcheck | 125 | .PHONY: common-staticcheck |
86 | common-staticcheck: $(STATICCHECK) | 126 | common-staticcheck: $(STATICCHECK) |
87 | @echo ">> running staticcheck" | 127 | @echo ">> running staticcheck" |
128 | ifdef GO111MODULE | ||
129 | GO111MODULE=$(GO111MODULE) $(STATICCHECK) -ignore "$(STATICCHECK_IGNORE)" -checks "SA*" $(pkgs) | ||
130 | else | ||
88 | $(STATICCHECK) -ignore "$(STATICCHECK_IGNORE)" $(pkgs) | 131 | $(STATICCHECK) -ignore "$(STATICCHECK_IGNORE)" $(pkgs) |
132 | endif | ||
89 | 133 | ||
90 | .PHONY: common-unused | 134 | .PHONY: common-unused |
91 | common-unused: $(GOVENDOR) | 135 | common-unused: $(GOVENDOR) |
136 | ifdef GOVENDOR | ||
92 | @echo ">> running check for unused packages" | 137 | @echo ">> running check for unused packages" |
93 | @$(GOVENDOR) list +unused | grep . && exit 1 || echo 'No unused packages' | 138 | @$(GOVENDOR) list +unused | grep . && exit 1 || echo 'No unused packages' |
139 | else | ||
140 | ifdef GO111MODULE | ||
141 | @echo ">> running check for unused/missing packages in go.mod" | ||
142 | GO111MODULE=$(GO111MODULE) $(GO) mod tidy | ||
143 | @git diff --exit-code -- go.sum go.mod | ||
144 | ifneq (,$(wildcard vendor)) | ||
145 | @echo ">> running check for unused packages in vendor/" | ||
146 | GO111MODULE=$(GO111MODULE) $(GO) mod vendor | ||
147 | @git diff --exit-code -- go.sum go.mod vendor/ | ||
148 | endif | ||
149 | endif | ||
150 | endif | ||
94 | 151 | ||
95 | .PHONY: common-build | 152 | .PHONY: common-build |
96 | common-build: promu | 153 | common-build: promu |
97 | @echo ">> building binaries" | 154 | @echo ">> building binaries" |
98 | $(PROMU) build --prefix $(PREFIX) | 155 | GO111MODULE=$(GO111MODULE) $(PROMU) build --prefix $(PREFIX) |
99 | 156 | ||
100 | .PHONY: common-tarball | 157 | .PHONY: common-tarball |
101 | common-tarball: promu | 158 | common-tarball: promu |
@@ -115,13 +172,54 @@ common-docker-tag-latest: | |||
115 | docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):latest" | 172 | docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):latest" |
116 | 173 | ||
117 | .PHONY: promu | 174 | .PHONY: promu |
118 | promu: | 175 | promu: $(PROMU) |
119 | GOOS= GOARCH= $(GO) get -u github.com/prometheus/promu | 176 | |
177 | $(PROMU): | ||
178 | $(eval PROMU_TMP := $(shell mktemp -d)) | ||
179 | curl -s -L $(PROMU_URL) | tar -xvzf - -C $(PROMU_TMP) | ||
180 | mkdir -p $(FIRST_GOPATH)/bin | ||
181 | cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu | ||
182 | rm -r $(PROMU_TMP) | ||
183 | |||
184 | .PHONY: proto | ||
185 | proto: | ||
186 | @echo ">> generating code from proto files" | ||
187 | @./scripts/genproto.sh | ||
120 | 188 | ||
121 | .PHONY: $(STATICCHECK) | 189 | .PHONY: $(STATICCHECK) |
122 | $(STATICCHECK): | 190 | $(STATICCHECK): |
123 | GOOS= GOARCH= $(GO) get -u honnef.co/go/tools/cmd/staticcheck | 191 | ifdef GO111MODULE |
124 | 192 | # Get staticcheck from a temporary directory to avoid modifying the local go.{mod,sum}. | |
193 | # See https://github.com/golang/go/issues/27643. | ||
194 | # For now, we are using the next branch of staticcheck because master isn't compatible yet with Go modules. | ||
195 | tmpModule=$$(mktemp -d 2>&1) && \ | ||
196 | mkdir -p $${tmpModule}/staticcheck && \ | ||
197 | cd "$${tmpModule}"/staticcheck && \ | ||
198 | GO111MODULE=on $(GO) mod init example.com/staticcheck && \ | ||
199 | GO111MODULE=on GOOS= GOARCH= $(GO) get -u honnef.co/go/tools/cmd/staticcheck@next && \ | ||
200 | rm -rf $${tmpModule}; | ||
201 | else | ||
202 | GOOS= GOARCH= GO111MODULE=off $(GO) get -u honnef.co/go/tools/cmd/staticcheck | ||
203 | endif | ||
204 | |||
205 | ifdef GOVENDOR | ||
125 | .PHONY: $(GOVENDOR) | 206 | .PHONY: $(GOVENDOR) |
126 | $(GOVENDOR): | 207 | $(GOVENDOR): |
127 | GOOS= GOARCH= $(GO) get -u github.com/kardianos/govendor | 208 | GOOS= GOARCH= $(GO) get -u github.com/kardianos/govendor |
209 | endif | ||
210 | |||
211 | .PHONY: precheck | ||
212 | precheck:: | ||
213 | |||
214 | define PRECHECK_COMMAND_template = | ||
215 | precheck:: $(1)_precheck | ||
216 | |||
217 | |||
218 | PRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1))) | ||
219 | .PHONY: $(1)_precheck | ||
220 | $(1)_precheck: | ||
221 | @if ! $$(PRECHECK_COMMAND_$(1)) 1>/dev/null 2>&1; then \ | ||
222 | echo "Execution of '$$(PRECHECK_COMMAND_$(1))' command failed. Is $(1) installed?"; \ | ||
223 | exit 1; \ | ||
224 | fi | ||
225 | endef | ||
@@ -0,0 +1,32 @@ | |||
1 | module github.com/prometheus/node_exporter | ||
2 | |||
3 | require ( | ||
4 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect | ||
5 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect | ||
6 | github.com/beevik/ntp v0.2.0 | ||
7 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect | ||
8 | github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 | ||
9 | github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7 | ||
10 | github.com/godbus/dbus v4.1.0+incompatible | ||
11 | github.com/gogo/protobuf v1.1.1 // indirect | ||
12 | github.com/golang/protobuf v1.2.0 // indirect | ||
13 | github.com/google/go-cmp v0.2.0 // indirect | ||
14 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect | ||
15 | github.com/lufia/iostat v0.0.0-20170605150913-9f7362b77ad3 | ||
16 | github.com/mattn/go-xmlrpc v0.0.0-20180913190254-6e944673e4c0 | ||
17 | github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect | ||
18 | github.com/mdlayher/genetlink v0.0.0-20180917171408-7615bc153978 // indirect | ||
19 | github.com/mdlayher/netlink v0.0.0-20180920202405-794849f2d5bf // indirect | ||
20 | github.com/mdlayher/wifi v0.0.0-20180727163819-efdf3f4195d9 | ||
21 | github.com/prometheus/client_golang v0.9.1 | ||
22 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 | ||
23 | github.com/prometheus/common v0.0.0-20181015124227-bcb74de08d37 | ||
24 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d | ||
25 | github.com/sirupsen/logrus v1.1.1 // indirect | ||
26 | github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a | ||
27 | golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941 // indirect | ||
28 | golang.org/x/net v0.0.0-20181005035420-146acd28ed58 // indirect | ||
29 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect | ||
30 | golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e | ||
31 | gopkg.in/alecthomas/kingpin.v2 v2.2.6 | ||
32 | ) | ||
@@ -0,0 +1,65 @@ | |||
1 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= | ||
2 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | ||
3 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= | ||
4 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | ||
5 | github.com/beevik/ntp v0.2.0 h1:sGsd+kAXzT0bfVfzJfce04g+dSRfrs+tbQW8lweuYgw= | ||
6 | github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= | ||
7 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= | ||
8 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= | ||
9 | github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM= | ||
10 | github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | ||
11 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
12 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
13 | github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7 h1:jzWRD7cjz7ditpwbTbQdnHzFFW3KIFAVw9Ia5C0n/zs= | ||
14 | github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7/go.mod h1:kXuKAameaga9ciOgiYWAM85FQP+wt5aN4uX+9OHVJe4= | ||
15 | github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4= | ||
16 | github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= | ||
17 | github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= | ||
18 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= | ||
19 | github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= | ||
20 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
21 | github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= | ||
22 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | ||
23 | github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= | ||
24 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= | ||
25 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= | ||
26 | github.com/lufia/iostat v0.0.0-20170605150913-9f7362b77ad3 h1:XGhvld9vIpj929Gri5ybjukYZeyZwKkFkqgATqBQiOs= | ||
27 | github.com/lufia/iostat v0.0.0-20170605150913-9f7362b77ad3/go.mod h1:lRgtFVamD7L7GaXOSwBiuXMwU3Aicfn5h66LVs4u2SA= | ||
28 | github.com/mattn/go-xmlrpc v0.0.0-20180913190254-6e944673e4c0 h1:Yd5lxbX77o10QFKctZpOQqT4D2x6kzfmnjwtz0NUTIU= | ||
29 | github.com/mattn/go-xmlrpc v0.0.0-20180913190254-6e944673e4c0/go.mod h1:jPxKbOGukjFCw9jFB7RRh3ZRQUehV22ryHP8IpREEx4= | ||
30 | github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= | ||
31 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= | ||
32 | github.com/mdlayher/genetlink v0.0.0-20180917171408-7615bc153978 h1:tC5iKGVD0TDZhKsBarp21Qox0Czip4m4i8kxfiqmqgY= | ||
33 | github.com/mdlayher/genetlink v0.0.0-20180917171408-7615bc153978/go.mod h1:EOrmeik1bDMaRduo2B+uAYe1HmTq6yF2IMDmJi1GoWk= | ||
34 | github.com/mdlayher/netlink v0.0.0-20180920202405-794849f2d5bf h1:lYA2LopQshi99ahuhhIyfvWRC9IzHRtC9Bk1OSP436w= | ||
35 | github.com/mdlayher/netlink v0.0.0-20180920202405-794849f2d5bf/go.mod h1:a3TlQHkJH2m32RF224Z7LhD5N4mpyR8eUbCoYHywrwg= | ||
36 | github.com/mdlayher/wifi v0.0.0-20180727163819-efdf3f4195d9 h1:ag57ienknXLMhoSbkYvaZLF9Taxu9GtBHUJ4jP5ER8s= | ||
37 | github.com/mdlayher/wifi v0.0.0-20180727163819-efdf3f4195d9/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= | ||
38 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||
39 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
40 | github.com/prometheus/client_golang v0.9.1 h1:K47Rk0v/fkEfwfQet2KWhscE0cJzjgCCDBG2KHZoVno= | ||
41 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= | ||
42 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= | ||
43 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= | ||
44 | github.com/prometheus/common v0.0.0-20181015124227-bcb74de08d37 h1:Y7YdJ9Xb3MoQOzAWXnDunAJYpvhVwZdTirNfGUgPKaA= | ||
45 | github.com/prometheus/common v0.0.0-20181015124227-bcb74de08d37/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= | ||
46 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d h1:GoAlyOgbOEIFdaDqxJVlbOQ1DtGmZWs/Qau0hIlk+WQ= | ||
47 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= | ||
48 | github.com/sirupsen/logrus v1.1.1 h1:VzGj7lhU7KEB9e9gMpAV/v5XT2NVSvLJhJLCWbnkgXg= | ||
49 | github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= | ||
50 | github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a h1:TGsOnmXp0mo82KbjaDcsTibGxWIdZNXbKJB18gFn1RM= | ||
51 | github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= | ||
52 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= | ||
53 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= | ||
54 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | ||
55 | golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941 h1:qBTHLajHecfu+xzRI9PqVDcqx7SdHj9d4B+EzSn3tAc= | ||
56 | golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | ||
57 | golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE= | ||
58 | golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
59 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= | ||
60 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
61 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
62 | golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e h1:EfdBzeKbFSvOjoIqSZcfS8wp0FBLokGBEs9lz1OtSg0= | ||
63 | golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
64 | gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= | ||
65 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= | ||
diff --git a/vendor/github.com/beevik/ntp/.travis.yml b/vendor/github.com/beevik/ntp/.travis.yml new file mode 100644 index 0000000..ad71df2 --- /dev/null +++ b/vendor/github.com/beevik/ntp/.travis.yml | |||
@@ -0,0 +1,15 @@ | |||
1 | language: go | ||
2 | sudo: false | ||
3 | |||
4 | go: | ||
5 | - 1.7.x | ||
6 | - 1.8.x | ||
7 | - 1.9.x | ||
8 | - tip | ||
9 | |||
10 | matrix: | ||
11 | allow_failures: | ||
12 | - go: tip | ||
13 | |||
14 | script: | ||
15 | - go test -v ./... | ||
diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go index f4cabd6..d7d14f8 100644 --- a/vendor/github.com/beorn7/perks/quantile/stream.go +++ b/vendor/github.com/beorn7/perks/quantile/stream.go | |||
@@ -77,15 +77,20 @@ func NewHighBiased(epsilon float64) *Stream { | |||
77 | // is guaranteed to be within (Quantile±Epsilon). | 77 | // is guaranteed to be within (Quantile±Epsilon). |
78 | // | 78 | // |
79 | // See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties. | 79 | // See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties. |
80 | func NewTargeted(targets map[float64]float64) *Stream { | 80 | func NewTargeted(targetMap map[float64]float64) *Stream { |
81 | // Convert map to slice to avoid slow iterations on a map. | ||
82 | // Æ’ is called on the hot path, so converting the map to a slice | ||
83 | // beforehand results in significant CPU savings. | ||
84 | targets := targetMapToSlice(targetMap) | ||
85 | |||
81 | Æ’ := func(s *stream, r float64) float64 { | 86 | Æ’ := func(s *stream, r float64) float64 { |
82 | var m = math.MaxFloat64 | 87 | var m = math.MaxFloat64 |
83 | var f float64 | 88 | var f float64 |
84 | for quantile, epsilon := range targets { | 89 | for _, t := range targets { |
85 | if quantile*s.n <= r { | 90 | if t.quantile*s.n <= r { |
86 | f = (2 * epsilon * r) / quantile | 91 | f = (2 * t.epsilon * r) / t.quantile |
87 | } else { | 92 | } else { |
88 | f = (2 * epsilon * (s.n - r)) / (1 - quantile) | 93 | f = (2 * t.epsilon * (s.n - r)) / (1 - t.quantile) |
89 | } | 94 | } |
90 | if f < m { | 95 | if f < m { |
91 | m = f | 96 | m = f |
@@ -96,6 +101,25 @@ func NewTargeted(targets map[float64]float64) *Stream { | |||
96 | return newStream(Æ’) | 101 | return newStream(Æ’) |
97 | } | 102 | } |
98 | 103 | ||
104 | type target struct { | ||
105 | quantile float64 | ||
106 | epsilon float64 | ||
107 | } | ||
108 | |||
109 | func targetMapToSlice(targetMap map[float64]float64) []target { | ||
110 | targets := make([]target, 0, len(targetMap)) | ||
111 | |||
112 | for quantile, epsilon := range targetMap { | ||
113 | t := target{ | ||
114 | quantile: quantile, | ||
115 | epsilon: epsilon, | ||
116 | } | ||
117 | targets = append(targets, t) | ||
118 | } | ||
119 | |||
120 | return targets | ||
121 | } | ||
122 | |||
99 | // Stream computes quantiles for a stream of float64s. It is not thread-safe by | 123 | // Stream computes quantiles for a stream of float64s. It is not thread-safe by |
100 | // design. Take care when using across multiple goroutines. | 124 | // design. Take care when using across multiple goroutines. |
101 | type Stream struct { | 125 | type Stream struct { |
diff --git a/vendor/github.com/ema/qdisc/.travis.yml b/vendor/github.com/ema/qdisc/.travis.yml new file mode 100644 index 0000000..7c9b451 --- /dev/null +++ b/vendor/github.com/ema/qdisc/.travis.yml | |||
@@ -0,0 +1,16 @@ | |||
1 | language: go | ||
2 | go: | ||
3 | - 1.x | ||
4 | os: | ||
5 | - linux | ||
6 | sudo: required | ||
7 | before_install: | ||
8 | - go get github.com/golang/lint/golint | ||
9 | - go get honnef.co/go/tools/cmd/staticcheck | ||
10 | - go get -d ./... | ||
11 | script: | ||
12 | - go build -tags=gofuzz ./... | ||
13 | - go vet ./... | ||
14 | - staticcheck ./... | ||
15 | #- golint -set_exit_status ./... | ||
16 | - go test -v -race -tags=integration ./... | ||
diff --git a/vendor/github.com/godbus/dbus/.travis.yml b/vendor/github.com/godbus/dbus/.travis.yml new file mode 100644 index 0000000..2e1bbb7 --- /dev/null +++ b/vendor/github.com/godbus/dbus/.travis.yml | |||
@@ -0,0 +1,40 @@ | |||
1 | dist: precise | ||
2 | language: go | ||
3 | go_import_path: github.com/godbus/dbus | ||
4 | sudo: true | ||
5 | |||
6 | go: | ||
7 | - 1.6.3 | ||
8 | - 1.7.3 | ||
9 | - tip | ||
10 | |||
11 | env: | ||
12 | global: | ||
13 | matrix: | ||
14 | - TARGET=amd64 | ||
15 | - TARGET=arm64 | ||
16 | - TARGET=arm | ||
17 | - TARGET=386 | ||
18 | - TARGET=ppc64le | ||
19 | |||
20 | matrix: | ||
21 | fast_finish: true | ||
22 | allow_failures: | ||
23 | - go: tip | ||
24 | exclude: | ||
25 | - go: tip | ||
26 | env: TARGET=arm | ||
27 | - go: tip | ||
28 | env: TARGET=arm64 | ||
29 | - go: tip | ||
30 | env: TARGET=386 | ||
31 | - go: tip | ||
32 | env: TARGET=ppc64le | ||
33 | |||
34 | addons: | ||
35 | apt: | ||
36 | packages: | ||
37 | - dbus | ||
38 | - dbus-x11 | ||
39 | |||
40 | before_install: | ||
diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS new file mode 100644 index 0000000..15167cd --- /dev/null +++ b/vendor/github.com/golang/protobuf/AUTHORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code refers to The Go Authors for copyright purposes. | ||
2 | # The master list of authors is in the main Go distribution, | ||
3 | # visible at http://tip.golang.org/AUTHORS. | ||
diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS new file mode 100644 index 0000000..1c4577e --- /dev/null +++ b/vendor/github.com/golang/protobuf/CONTRIBUTORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code was written by the Go contributors. | ||
2 | # The master list of contributors is in the main Go distribution, | ||
3 | # visible at http://tip.golang.org/CONTRIBUTORS. | ||
diff --git a/vendor/github.com/lufia/iostat/.gitignore b/vendor/github.com/lufia/iostat/.gitignore new file mode 100644 index 0000000..a1338d6 --- /dev/null +++ b/vendor/github.com/lufia/iostat/.gitignore | |||
@@ -0,0 +1,14 @@ | |||
1 | # Binaries for programs and plugins | ||
2 | *.exe | ||
3 | *.dll | ||
4 | *.so | ||
5 | *.dylib | ||
6 | |||
7 | # Test binary, build with `go test -c` | ||
8 | *.test | ||
9 | |||
10 | # Output of the go coverage tool, specifically when used with LiteIDE | ||
11 | *.out | ||
12 | |||
13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 | ||
14 | .glide/ | ||
diff --git a/vendor/github.com/mattn/go-xmlrpc/.travis.yml b/vendor/github.com/mattn/go-xmlrpc/.travis.yml new file mode 100644 index 0000000..693c072 --- /dev/null +++ b/vendor/github.com/mattn/go-xmlrpc/.travis.yml | |||
@@ -0,0 +1,5 @@ | |||
1 | language: go | ||
2 | go: | ||
3 | - tip | ||
4 | before_install: | ||
5 | - go test | ||
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore new file mode 100644 index 0000000..e16fb94 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore | |||
@@ -0,0 +1 @@ | |||
cover.dat | |||
diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile new file mode 100644 index 0000000..81be214 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile | |||
@@ -0,0 +1,7 @@ | |||
1 | all: | ||
2 | |||
3 | cover: | ||
4 | go test -cover -v -coverprofile=cover.dat ./... | ||
5 | go tool cover -func cover.dat | ||
6 | |||
7 | .PHONY: cover | ||
diff --git a/vendor/github.com/mdlayher/genetlink/.travis.yml b/vendor/github.com/mdlayher/genetlink/.travis.yml new file mode 100644 index 0000000..c53d5a8 --- /dev/null +++ b/vendor/github.com/mdlayher/genetlink/.travis.yml | |||
@@ -0,0 +1,16 @@ | |||
1 | language: go | ||
2 | go: | ||
3 | - 1.x | ||
4 | os: | ||
5 | - linux | ||
6 | sudo: required | ||
7 | before_install: | ||
8 | - go get github.com/golang/lint/golint | ||
9 | - go get honnef.co/go/tools/cmd/staticcheck | ||
10 | - go get -d ./... | ||
11 | script: | ||
12 | - go build -tags=gofuzz ./... | ||
13 | - go vet ./... | ||
14 | - staticcheck ./... | ||
15 | - golint -set_exit_status ./... | ||
16 | - go test -v -race -tags=integration ./... | ||
diff --git a/vendor/github.com/mdlayher/netlink/.gitignore b/vendor/github.com/mdlayher/netlink/.gitignore new file mode 100644 index 0000000..30111b6 --- /dev/null +++ b/vendor/github.com/mdlayher/netlink/.gitignore | |||
@@ -0,0 +1 @@ | |||
cmd/nlstress/nlstress | |||
diff --git a/vendor/github.com/mdlayher/netlink/.travis.yml b/vendor/github.com/mdlayher/netlink/.travis.yml new file mode 100644 index 0000000..55427a5 --- /dev/null +++ b/vendor/github.com/mdlayher/netlink/.travis.yml | |||
@@ -0,0 +1,17 @@ | |||
1 | language: go | ||
2 | go: | ||
3 | - "1.x" | ||
4 | os: | ||
5 | - linux | ||
6 | - osx | ||
7 | sudo: required | ||
8 | before_install: | ||
9 | - go get github.com/golang/lint/golint | ||
10 | - go get honnef.co/go/tools/cmd/staticcheck | ||
11 | - go get -d ./... | ||
12 | script: | ||
13 | - go build -tags=gofuzz ./... | ||
14 | - go vet ./... | ||
15 | - staticcheck ./... | ||
16 | - golint -set_exit_status ./... | ||
17 | - go test -v -race -tags=integration ./... | ||
diff --git a/vendor/github.com/mdlayher/wifi/.travis.yml b/vendor/github.com/mdlayher/wifi/.travis.yml new file mode 100644 index 0000000..b8a82fe --- /dev/null +++ b/vendor/github.com/mdlayher/wifi/.travis.yml | |||
@@ -0,0 +1,16 @@ | |||
1 | language: go | ||
2 | go: | ||
3 | - 1.x | ||
4 | os: | ||
5 | - linux | ||
6 | sudo: required | ||
7 | before_install: | ||
8 | - go get github.com/golang/lint/golint | ||
9 | - go get honnef.co/go/tools/cmd/staticcheck | ||
10 | - go get -d -t ./... | ||
11 | script: | ||
12 | - go build ./... | ||
13 | - go vet ./... | ||
14 | - staticcheck ./... | ||
15 | - ./scripts/golint.sh | ||
16 | - go test -race -v ./... | ||
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/.gitignore b/vendor/github.com/prometheus/client_golang/prometheus/.gitignore new file mode 100644 index 0000000..3460f03 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/.gitignore | |||
@@ -0,0 +1 @@ | |||
command-line-arguments.test | |||
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter.go b/vendor/github.com/prometheus/client_golang/prometheus/counter.go index 765e455..d463e36 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/counter.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/counter.go | |||
@@ -136,7 +136,7 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { | |||
136 | return &CounterVec{ | 136 | return &CounterVec{ |
137 | metricVec: newMetricVec(desc, func(lvs ...string) Metric { | 137 | metricVec: newMetricVec(desc, func(lvs ...string) Metric { |
138 | if len(lvs) != len(desc.variableLabels) { | 138 | if len(lvs) != len(desc.variableLabels) { |
139 | panic(errInconsistentCardinality) | 139 | panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, lvs)) |
140 | } | 140 | } |
141 | result := &counter{desc: desc, labelPairs: makeLabelPairs(desc, lvs)} | 141 | result := &counter{desc: desc, labelPairs: makeLabelPairs(desc, lvs)} |
142 | result.init(result) // Init self-collection. | 142 | result.init(result) // Init self-collection. |
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go index 17c72d7..71d406b 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go | |||
@@ -147,7 +147,7 @@ func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { | |||
147 | return &GaugeVec{ | 147 | return &GaugeVec{ |
148 | metricVec: newMetricVec(desc, func(lvs ...string) Metric { | 148 | metricVec: newMetricVec(desc, func(lvs ...string) Metric { |
149 | if len(lvs) != len(desc.variableLabels) { | 149 | if len(lvs) != len(desc.variableLabels) { |
150 | panic(errInconsistentCardinality) | 150 | panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, lvs)) |
151 | } | 151 | } |
152 | result := &gauge{desc: desc, labelPairs: makeLabelPairs(desc, lvs)} | 152 | result := &gauge{desc: desc, labelPairs: makeLabelPairs(desc, lvs)} |
153 | result.init(result) // Init self-collection. | 153 | result.init(result) // Init self-collection. |
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go index 4d7fa97..f88da70 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go | |||
@@ -165,7 +165,7 @@ func NewHistogram(opts HistogramOpts) Histogram { | |||
165 | 165 | ||
166 | func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogram { | 166 | func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogram { |
167 | if len(desc.variableLabels) != len(labelValues) { | 167 | if len(desc.variableLabels) != len(labelValues) { |
168 | panic(errInconsistentCardinality) | 168 | panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, labelValues)) |
169 | } | 169 | } |
170 | 170 | ||
171 | for _, n := range desc.variableLabels { | 171 | for _, n := range desc.variableLabels { |
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/http.go b/vendor/github.com/prometheus/client_golang/prometheus/http.go index 4b8e602..9f0875b 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/http.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/http.go | |||
@@ -15,9 +15,7 @@ package prometheus | |||
15 | 15 | ||
16 | import ( | 16 | import ( |
17 | "bufio" | 17 | "bufio" |
18 | "bytes" | ||
19 | "compress/gzip" | 18 | "compress/gzip" |
20 | "fmt" | ||
21 | "io" | 19 | "io" |
22 | "net" | 20 | "net" |
23 | "net/http" | 21 | "net/http" |
@@ -41,19 +39,10 @@ const ( | |||
41 | acceptEncodingHeader = "Accept-Encoding" | 39 | acceptEncodingHeader = "Accept-Encoding" |
42 | ) | 40 | ) |
43 | 41 | ||
44 | var bufPool sync.Pool | 42 | var gzipPool = sync.Pool{ |
45 | 43 | New: func() interface{} { | |
46 | func getBuf() *bytes.Buffer { | 44 | return gzip.NewWriter(nil) |
47 | buf := bufPool.Get() | 45 | }, |
48 | if buf == nil { | ||
49 | return &bytes.Buffer{} | ||
50 | } | ||
51 | return buf.(*bytes.Buffer) | ||
52 | } | ||
53 | |||
54 | func giveBuf(buf *bytes.Buffer) { | ||
55 | buf.Reset() | ||
56 | bufPool.Put(buf) | ||
57 | } | 46 | } |
58 | 47 | ||
59 | // Handler returns an HTTP handler for the DefaultGatherer. It is | 48 | // Handler returns an HTTP handler for the DefaultGatherer. It is |
@@ -71,58 +60,40 @@ func Handler() http.Handler { | |||
71 | // Deprecated: Use promhttp.HandlerFor(DefaultGatherer, promhttp.HandlerOpts{}) | 60 | // Deprecated: Use promhttp.HandlerFor(DefaultGatherer, promhttp.HandlerOpts{}) |
72 | // instead. See there for further documentation. | 61 | // instead. See there for further documentation. |
73 | func UninstrumentedHandler() http.Handler { | 62 | func UninstrumentedHandler() http.Handler { |
74 | return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { | 63 | return http.HandlerFunc(func(rsp http.ResponseWriter, req *http.Request) { |
75 | mfs, err := DefaultGatherer.Gather() | 64 | mfs, err := DefaultGatherer.Gather() |
76 | if err != nil { | 65 | if err != nil { |
77 | http.Error(w, "An error has occurred during metrics collection:\n\n"+err.Error(), http.StatusInternalServerError) | 66 | httpError(rsp, err) |
78 | return | 67 | return |
79 | } | 68 | } |
80 | 69 | ||
81 | contentType := expfmt.Negotiate(req.Header) | 70 | contentType := expfmt.Negotiate(req.Header) |
82 | buf := getBuf() | 71 | header := rsp.Header() |
83 | defer giveBuf(buf) | 72 | header.Set(contentTypeHeader, string(contentType)) |
84 | writer, encoding := decorateWriter(req, buf) | 73 | |
85 | enc := expfmt.NewEncoder(writer, contentType) | 74 | w := io.Writer(rsp) |
86 | var lastErr error | 75 | if gzipAccepted(req.Header) { |
76 | header.Set(contentEncodingHeader, "gzip") | ||
77 | gz := gzipPool.Get().(*gzip.Writer) | ||
78 | defer gzipPool.Put(gz) | ||
79 | |||
80 | gz.Reset(w) | ||
81 | defer gz.Close() | ||
82 | |||
83 | w = gz | ||
84 | } | ||
85 | |||
86 | enc := expfmt.NewEncoder(w, contentType) | ||
87 | |||
87 | for _, mf := range mfs { | 88 | for _, mf := range mfs { |
88 | if err := enc.Encode(mf); err != nil { | 89 | if err := enc.Encode(mf); err != nil { |
89 | lastErr = err | 90 | httpError(rsp, err) |
90 | http.Error(w, "An error has occurred during metrics encoding:\n\n"+err.Error(), http.StatusInternalServerError) | ||
91 | return | 91 | return |
92 | } | 92 | } |
93 | } | 93 | } |
94 | if closer, ok := writer.(io.Closer); ok { | ||
95 | closer.Close() | ||
96 | } | ||
97 | if lastErr != nil && buf.Len() == 0 { | ||
98 | http.Error(w, "No metrics encoded, last error:\n\n"+lastErr.Error(), http.StatusInternalServerError) | ||
99 | return | ||
100 | } | ||
101 | header := w.Header() | ||
102 | header.Set(contentTypeHeader, string(contentType)) | ||
103 | header.Set(contentLengthHeader, fmt.Sprint(buf.Len())) | ||
104 | if encoding != "" { | ||
105 | header.Set(contentEncodingHeader, encoding) | ||
106 | } | ||
107 | w.Write(buf.Bytes()) | ||
108 | }) | 94 | }) |
109 | } | 95 | } |
110 | 96 | ||
111 | // decorateWriter wraps a writer to handle gzip compression if requested. It | ||
112 | // returns the decorated writer and the appropriate "Content-Encoding" header | ||
113 | // (which is empty if no compression is enabled). | ||
114 | func decorateWriter(request *http.Request, writer io.Writer) (io.Writer, string) { | ||
115 | header := request.Header.Get(acceptEncodingHeader) | ||
116 | parts := strings.Split(header, ",") | ||
117 | for _, part := range parts { | ||
118 | part = strings.TrimSpace(part) | ||
119 | if part == "gzip" || strings.HasPrefix(part, "gzip;") { | ||
120 | return gzip.NewWriter(writer), "gzip" | ||
121 | } | ||
122 | } | ||
123 | return writer, "" | ||
124 | } | ||
125 | |||
126 | var instLabels = []string{"method", "code"} | 97 | var instLabels = []string{"method", "code"} |
127 | 98 | ||
128 | type nower interface { | 99 | type nower interface { |
@@ -503,3 +474,31 @@ func sanitizeCode(s int) string { | |||
503 | return strconv.Itoa(s) | 474 | return strconv.Itoa(s) |
504 | } | 475 | } |
505 | } | 476 | } |
477 | |||
478 | // gzipAccepted returns whether the client will accept gzip-encoded content. | ||
479 | func gzipAccepted(header http.Header) bool { | ||
480 | a := header.Get(acceptEncodingHeader) | ||
481 | parts := strings.Split(a, ",") | ||
482 | for _, part := range parts { | ||
483 | part = strings.TrimSpace(part) | ||
484 | if part == "gzip" || strings.HasPrefix(part, "gzip;") { | ||
485 | return true | ||
486 | } | ||
487 | } | ||
488 | return false | ||
489 | } | ||
490 | |||
491 | // httpError removes any content-encoding header and then calls http.Error with | ||
492 | // the provided error and http.StatusInternalServerErrer. Error contents is | ||
493 | // supposed to be uncompressed plain text. However, same as with a plain | ||
494 | // http.Error, any header settings will be void if the header has already been | ||
495 | // sent. The error message will still be written to the writer, but it will | ||
496 | // probably be of limited use. | ||
497 | func httpError(rsp http.ResponseWriter, err error) { | ||
498 | rsp.Header().Del(contentEncodingHeader) | ||
499 | http.Error( | ||
500 | rsp, | ||
501 | "An error has occurred while serving metrics:\n\n"+err.Error(), | ||
502 | http.StatusInternalServerError, | ||
503 | ) | ||
504 | } | ||
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/labels.go b/vendor/github.com/prometheus/client_golang/prometheus/labels.go index e68f132..2744443 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/labels.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/labels.go | |||
@@ -37,9 +37,22 @@ const reservedLabelPrefix = "__" | |||
37 | 37 | ||
38 | var errInconsistentCardinality = errors.New("inconsistent label cardinality") | 38 | var errInconsistentCardinality = errors.New("inconsistent label cardinality") |
39 | 39 | ||
40 | func makeInconsistentCardinalityError(fqName string, labels, labelValues []string) error { | ||
41 | return fmt.Errorf( | ||
42 | "%s: %q has %d variable labels named %q but %d values %q were provided", | ||
43 | errInconsistentCardinality, fqName, | ||
44 | len(labels), labels, | ||
45 | len(labelValues), labelValues, | ||
46 | ) | ||
47 | } | ||
48 | |||
40 | func validateValuesInLabels(labels Labels, expectedNumberOfValues int) error { | 49 | func validateValuesInLabels(labels Labels, expectedNumberOfValues int) error { |
41 | if len(labels) != expectedNumberOfValues { | 50 | if len(labels) != expectedNumberOfValues { |
42 | return errInconsistentCardinality | 51 | return fmt.Errorf( |
52 | "%s: expected %d label values but got %d in %#v", | ||
53 | errInconsistentCardinality, expectedNumberOfValues, | ||
54 | len(labels), labels, | ||
55 | ) | ||
43 | } | 56 | } |
44 | 57 | ||
45 | for name, val := range labels { | 58 | for name, val := range labels { |
@@ -53,7 +66,11 @@ func validateValuesInLabels(labels Labels, expectedNumberOfValues int) error { | |||
53 | 66 | ||
54 | func validateLabelValues(vals []string, expectedNumberOfValues int) error { | 67 | func validateLabelValues(vals []string, expectedNumberOfValues int) error { |
55 | if len(vals) != expectedNumberOfValues { | 68 | if len(vals) != expectedNumberOfValues { |
56 | return errInconsistentCardinality | 69 | return fmt.Errorf( |
70 | "%s: expected %d label values but got %d in %#v", | ||
71 | errInconsistentCardinality, expectedNumberOfValues, | ||
72 | len(vals), vals, | ||
73 | ) | ||
57 | } | 74 | } |
58 | 75 | ||
59 | for _, val := range vals { | 76 | for _, val := range vals { |
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go index 0135737..668eb6b 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go | |||
@@ -32,7 +32,6 @@ | |||
32 | package promhttp | 32 | package promhttp |
33 | 33 | ||
34 | import ( | 34 | import ( |
35 | "bytes" | ||
36 | "compress/gzip" | 35 | "compress/gzip" |
37 | "fmt" | 36 | "fmt" |
38 | "io" | 37 | "io" |
@@ -53,19 +52,10 @@ const ( | |||
53 | acceptEncodingHeader = "Accept-Encoding" | 52 | acceptEncodingHeader = "Accept-Encoding" |
54 | ) | 53 | ) |
55 | 54 | ||
56 | var bufPool sync.Pool | 55 | var gzipPool = sync.Pool{ |
57 | 56 | New: func() interface{} { | |
58 | func getBuf() *bytes.Buffer { | 57 | return gzip.NewWriter(nil) |
59 | buf := bufPool.Get() | 58 | }, |
60 | if buf == nil { | ||
61 | return &bytes.Buffer{} | ||
62 | } | ||
63 | return buf.(*bytes.Buffer) | ||
64 | } | ||
65 | |||
66 | func giveBuf(buf *bytes.Buffer) { | ||
67 | buf.Reset() | ||
68 | bufPool.Put(buf) | ||
69 | } | 59 | } |
70 | 60 | ||
71 | // Handler returns an http.Handler for the prometheus.DefaultGatherer, using | 61 | // Handler returns an http.Handler for the prometheus.DefaultGatherer, using |
@@ -100,19 +90,18 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { | |||
100 | inFlightSem = make(chan struct{}, opts.MaxRequestsInFlight) | 90 | inFlightSem = make(chan struct{}, opts.MaxRequestsInFlight) |
101 | } | 91 | } |
102 | 92 | ||
103 | h := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { | 93 | h := http.HandlerFunc(func(rsp http.ResponseWriter, req *http.Request) { |
104 | if inFlightSem != nil { | 94 | if inFlightSem != nil { |
105 | select { | 95 | select { |
106 | case inFlightSem <- struct{}{}: // All good, carry on. | 96 | case inFlightSem <- struct{}{}: // All good, carry on. |
107 | defer func() { <-inFlightSem }() | 97 | defer func() { <-inFlightSem }() |
108 | default: | 98 | default: |
109 | http.Error(w, fmt.Sprintf( | 99 | http.Error(rsp, fmt.Sprintf( |
110 | "Limit of concurrent requests reached (%d), try again later.", opts.MaxRequestsInFlight, | 100 | "Limit of concurrent requests reached (%d), try again later.", opts.MaxRequestsInFlight, |
111 | ), http.StatusServiceUnavailable) | 101 | ), http.StatusServiceUnavailable) |
112 | return | 102 | return |
113 | } | 103 | } |
114 | } | 104 | } |
115 | |||
116 | mfs, err := reg.Gather() | 105 | mfs, err := reg.Gather() |
117 | if err != nil { | 106 | if err != nil { |
118 | if opts.ErrorLog != nil { | 107 | if opts.ErrorLog != nil { |
@@ -123,26 +112,40 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { | |||
123 | panic(err) | 112 | panic(err) |
124 | case ContinueOnError: | 113 | case ContinueOnError: |
125 | if len(mfs) == 0 { | 114 | if len(mfs) == 0 { |
126 | http.Error(w, "No metrics gathered, last error:\n\n"+err.Error(), http.StatusInternalServerError) | 115 | // Still report the error if no metrics have been gathered. |
116 | httpError(rsp, err) | ||
127 | return | 117 | return |
128 | } | 118 | } |
129 | case HTTPErrorOnError: | 119 | case HTTPErrorOnError: |
130 | http.Error(w, "An error has occurred during metrics gathering:\n\n"+err.Error(), http.StatusInternalServerError) | 120 | httpError(rsp, err) |
131 | return | 121 | return |
132 | } | 122 | } |
133 | } | 123 | } |
134 | 124 | ||
135 | contentType := expfmt.Negotiate(req.Header) | 125 | contentType := expfmt.Negotiate(req.Header) |
136 | buf := getBuf() | 126 | header := rsp.Header() |
137 | defer giveBuf(buf) | 127 | header.Set(contentTypeHeader, string(contentType)) |
138 | writer, encoding := decorateWriter(req, buf, opts.DisableCompression) | 128 | |
139 | enc := expfmt.NewEncoder(writer, contentType) | 129 | w := io.Writer(rsp) |
130 | if !opts.DisableCompression && gzipAccepted(req.Header) { | ||
131 | header.Set(contentEncodingHeader, "gzip") | ||
132 | gz := gzipPool.Get().(*gzip.Writer) | ||
133 | defer gzipPool.Put(gz) | ||
134 | |||
135 | gz.Reset(w) | ||
136 | defer gz.Close() | ||
137 | |||
138 | w = gz | ||
139 | } | ||
140 | |||
141 | enc := expfmt.NewEncoder(w, contentType) | ||
142 | |||
140 | var lastErr error | 143 | var lastErr error |
141 | for _, mf := range mfs { | 144 | for _, mf := range mfs { |
142 | if err := enc.Encode(mf); err != nil { | 145 | if err := enc.Encode(mf); err != nil { |
143 | lastErr = err | 146 | lastErr = err |
144 | if opts.ErrorLog != nil { | 147 | if opts.ErrorLog != nil { |
145 | opts.ErrorLog.Println("error encoding metric family:", err) | 148 | opts.ErrorLog.Println("error encoding and sending metric family:", err) |
146 | } | 149 | } |
147 | switch opts.ErrorHandling { | 150 | switch opts.ErrorHandling { |
148 | case PanicOnError: | 151 | case PanicOnError: |
@@ -150,28 +153,15 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { | |||
150 | case ContinueOnError: | 153 | case ContinueOnError: |
151 | // Handled later. | 154 | // Handled later. |
152 | case HTTPErrorOnError: | 155 | case HTTPErrorOnError: |
153 | http.Error(w, "An error has occurred during metrics encoding:\n\n"+err.Error(), http.StatusInternalServerError) | 156 | httpError(rsp, err) |
154 | return | 157 | return |
155 | } | 158 | } |
156 | } | 159 | } |
157 | } | 160 | } |
158 | if closer, ok := writer.(io.Closer); ok { | 161 | |
159 | closer.Close() | 162 | if lastErr != nil { |
160 | } | 163 | httpError(rsp, lastErr) |
161 | if lastErr != nil && buf.Len() == 0 { | ||
162 | http.Error(w, "No metrics encoded, last error:\n\n"+lastErr.Error(), http.StatusInternalServerError) | ||
163 | return | ||
164 | } | ||
165 | header := w.Header() | ||
166 | header.Set(contentTypeHeader, string(contentType)) | ||
167 | header.Set(contentLengthHeader, fmt.Sprint(buf.Len())) | ||
168 | if encoding != "" { | ||
169 | header.Set(contentEncodingHeader, encoding) | ||
170 | } | ||
171 | if _, err := w.Write(buf.Bytes()); err != nil && opts.ErrorLog != nil { | ||
172 | opts.ErrorLog.Println("error while sending encoded metrics:", err) | ||
173 | } | 164 | } |
174 | // TODO(beorn7): Consider streaming serving of metrics. | ||
175 | }) | 165 | }) |
176 | 166 | ||
177 | if opts.Timeout <= 0 { | 167 | if opts.Timeout <= 0 { |
@@ -292,20 +282,30 @@ type HandlerOpts struct { | |||
292 | Timeout time.Duration | 282 | Timeout time.Duration |
293 | } | 283 | } |
294 | 284 | ||
295 | // decorateWriter wraps a writer to handle gzip compression if requested. It | 285 | // gzipAccepted returns whether the client will accept gzip-encoded content. |
296 | // returns the decorated writer and the appropriate "Content-Encoding" header | 286 | func gzipAccepted(header http.Header) bool { |
297 | // (which is empty if no compression is enabled). | 287 | a := header.Get(acceptEncodingHeader) |
298 | func decorateWriter(request *http.Request, writer io.Writer, compressionDisabled bool) (io.Writer, string) { | 288 | parts := strings.Split(a, ",") |
299 | if compressionDisabled { | ||
300 | return writer, "" | ||
301 | } | ||
302 | header := request.Header.Get(acceptEncodingHeader) | ||
303 | parts := strings.Split(header, ",") | ||
304 | for _, part := range parts { | 289 | for _, part := range parts { |
305 | part = strings.TrimSpace(part) | 290 | part = strings.TrimSpace(part) |
306 | if part == "gzip" || strings.HasPrefix(part, "gzip;") { | 291 | if part == "gzip" || strings.HasPrefix(part, "gzip;") { |
307 | return gzip.NewWriter(writer), "gzip" | 292 | return true |
308 | } | 293 | } |
309 | } | 294 | } |
310 | return writer, "" | 295 | return false |
296 | } | ||
297 | |||
298 | // httpError removes any content-encoding header and then calls http.Error with | ||
299 | // the provided error and http.StatusInternalServerErrer. Error contents is | ||
300 | // supposed to be uncompressed plain text. However, same as with a plain | ||
301 | // http.Error, any header settings will be void if the header has already been | ||
302 | // sent. The error message will still be written to the writer, but it will | ||
303 | // probably be of limited use. | ||
304 | func httpError(rsp http.ResponseWriter, err error) { | ||
305 | rsp.Header().Del(contentEncodingHeader) | ||
306 | http.Error( | ||
307 | rsp, | ||
308 | "An error has occurred while serving metrics:\n\n"+err.Error(), | ||
309 | http.StatusInternalServerError, | ||
310 | ) | ||
311 | } | 311 | } |
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry.go b/vendor/github.com/prometheus/client_golang/prometheus/registry.go index e422ef3..f98c81a 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/registry.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/registry.go | |||
@@ -16,6 +16,9 @@ package prometheus | |||
16 | import ( | 16 | import ( |
17 | "bytes" | 17 | "bytes" |
18 | "fmt" | 18 | "fmt" |
19 | "io/ioutil" | ||
20 | "os" | ||
21 | "path/filepath" | ||
19 | "runtime" | 22 | "runtime" |
20 | "sort" | 23 | "sort" |
21 | "strings" | 24 | "strings" |
@@ -23,6 +26,7 @@ import ( | |||
23 | "unicode/utf8" | 26 | "unicode/utf8" |
24 | 27 | ||
25 | "github.com/golang/protobuf/proto" | 28 | "github.com/golang/protobuf/proto" |
29 | "github.com/prometheus/common/expfmt" | ||
26 | 30 | ||
27 | dto "github.com/prometheus/client_model/go" | 31 | dto "github.com/prometheus/client_model/go" |
28 | 32 | ||
@@ -533,6 +537,38 @@ func (r *Registry) Gather() ([]*dto.MetricFamily, error) { | |||
533 | return internal.NormalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap() | 537 | return internal.NormalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap() |
534 | } | 538 | } |
535 | 539 | ||
540 | // WriteToTextfile calls Gather on the provided Gatherer, encodes the result in the | ||
541 | // Prometheus text format, and writes it to a temporary file. Upon success, the | ||
542 | // temporary file is renamed to the provided filename. | ||
543 | // | ||
544 | // This is intended for use with the textfile collector of the node exporter. | ||
545 | // Note that the node exporter expects the filename to be suffixed with ".prom". | ||
546 | func WriteToTextfile(filename string, g Gatherer) error { | ||
547 | tmp, err := ioutil.TempFile(filepath.Dir(filename), filepath.Base(filename)) | ||
548 | if err != nil { | ||
549 | return err | ||
550 | } | ||
551 | defer os.Remove(tmp.Name()) | ||
552 | |||
553 | mfs, err := g.Gather() | ||
554 | if err != nil { | ||
555 | return err | ||
556 | } | ||
557 | for _, mf := range mfs { | ||
558 | if _, err := expfmt.MetricFamilyToText(tmp, mf); err != nil { | ||
559 | return err | ||
560 | } | ||
561 | } | ||
562 | if err := tmp.Close(); err != nil { | ||
563 | return err | ||
564 | } | ||
565 | |||
566 | if err := os.Chmod(tmp.Name(), 0644); err != nil { | ||
567 | return err | ||
568 | } | ||
569 | return os.Rename(tmp.Name(), filename) | ||
570 | } | ||
571 | |||
536 | // processMetric is an internal helper method only used by the Gather method. | 572 | // processMetric is an internal helper method only used by the Gather method. |
537 | func processMetric( | 573 | func processMetric( |
538 | metric Metric, | 574 | metric Metric, |
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/vendor/github.com/prometheus/client_golang/prometheus/summary.go index f7e92d8..2980614 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/summary.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/summary.go | |||
@@ -181,7 +181,7 @@ func NewSummary(opts SummaryOpts) Summary { | |||
181 | 181 | ||
182 | func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { | 182 | func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { |
183 | if len(desc.variableLabels) != len(labelValues) { | 183 | if len(desc.variableLabels) != len(labelValues) { |
184 | panic(errInconsistentCardinality) | 184 | panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, labelValues)) |
185 | } | 185 | } |
186 | 186 | ||
187 | for _, n := range desc.variableLabels { | 187 | for _, n := range desc.variableLabels { |
diff --git a/vendor/github.com/prometheus/procfs/.gitignore b/vendor/github.com/prometheus/procfs/.gitignore new file mode 100644 index 0000000..25e3659 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/.gitignore | |||
@@ -0,0 +1 @@ | |||
/fixtures/ | |||
diff --git a/vendor/github.com/prometheus/procfs/scripts/check_license.sh b/vendor/github.com/prometheus/procfs/scripts/check_license.sh deleted file mode 100755 index ac13e96..0000000 --- a/vendor/github.com/prometheus/procfs/scripts/check_license.sh +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Copyright 2018 The Prometheus Authors | ||
4 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | # you may not use this file except in compliance with the License. | ||
6 | # You may obtain a copy of the License at | ||
7 | # | ||
8 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | # | ||
10 | # Unless required by applicable law or agreed to in writing, software | ||
11 | # distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | # See the License for the specific language governing permissions and | ||
14 | # limitations under the License. | ||
15 | |||
16 | check_license() { | ||
17 | local file="" | ||
18 | for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do | ||
19 | head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo " ${file}" | ||
20 | done | ||
21 | } | ||
22 | |||
23 | licRes=$(check_license) | ||
24 | |||
25 | if [ -n "${licRes}" ]; then | ||
26 | echo "license header checking failed:" | ||
27 | echo "${licRes}" | ||
28 | exit 255 | ||
29 | fi | ||
diff --git a/vendor/github.com/prometheus/procfs/sysfs/.gitignore b/vendor/github.com/prometheus/procfs/sysfs/.gitignore new file mode 100644 index 0000000..67fc140 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/sysfs/.gitignore | |||
@@ -0,0 +1 @@ | |||
fixtures/ | |||
diff --git a/vendor/github.com/prometheus/procfs/ttar b/vendor/github.com/prometheus/procfs/ttar index b0171a1..b0171a1 100755..100644 --- a/vendor/github.com/prometheus/procfs/ttar +++ b/vendor/github.com/prometheus/procfs/ttar | |||
diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore new file mode 100644 index 0000000..66be63a --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.gitignore | |||
@@ -0,0 +1 @@ | |||
logrus | |||
diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml new file mode 100644 index 0000000..1f953be --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.travis.yml | |||
@@ -0,0 +1,51 @@ | |||
1 | language: go | ||
2 | env: | ||
3 | - GOMAXPROCS=4 GORACE=halt_on_error=1 | ||
4 | matrix: | ||
5 | include: | ||
6 | - go: 1.10.x | ||
7 | install: | ||
8 | - go get github.com/stretchr/testify/assert | ||
9 | - go get golang.org/x/crypto/ssh/terminal | ||
10 | - go get golang.org/x/sys/unix | ||
11 | - go get golang.org/x/sys/windows | ||
12 | script: | ||
13 | - go test -race -v ./... | ||
14 | - go: 1.11.x | ||
15 | env: GO111MODULE=on | ||
16 | install: | ||
17 | - go mod download | ||
18 | script: | ||
19 | - go test -race -v ./... | ||
20 | - go: 1.11.x | ||
21 | env: GO111MODULE=off | ||
22 | install: | ||
23 | - go get github.com/stretchr/testify/assert | ||
24 | - go get golang.org/x/crypto/ssh/terminal | ||
25 | - go get golang.org/x/sys/unix | ||
26 | - go get golang.org/x/sys/windows | ||
27 | script: | ||
28 | - go test -race -v ./... | ||
29 | - go: 1.10.x | ||
30 | install: | ||
31 | - go get github.com/stretchr/testify/assert | ||
32 | - go get golang.org/x/crypto/ssh/terminal | ||
33 | - go get golang.org/x/sys/unix | ||
34 | - go get golang.org/x/sys/windows | ||
35 | script: | ||
36 | - go test -race -v -tags appengine ./... | ||
37 | - go: 1.11.x | ||
38 | env: GO111MODULE=on | ||
39 | install: | ||
40 | - go mod download | ||
41 | script: | ||
42 | - go test -race -v -tags appengine ./... | ||
43 | - go: 1.11.x | ||
44 | env: GO111MODULE=off | ||
45 | install: | ||
46 | - go get github.com/stretchr/testify/assert | ||
47 | - go get golang.org/x/crypto/ssh/terminal | ||
48 | - go get golang.org/x/sys/unix | ||
49 | - go get golang.org/x/sys/windows | ||
50 | script: | ||
51 | - go test -race -v -tags appengine ./... | ||
diff --git a/vendor/golang.org/x/crypto/AUTHORS b/vendor/golang.org/x/crypto/AUTHORS new file mode 100644 index 0000000..2b00ddb --- /dev/null +++ b/vendor/golang.org/x/crypto/AUTHORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code refers to The Go Authors for copyright purposes. | ||
2 | # The master list of authors is in the main Go distribution, | ||
3 | # visible at https://tip.golang.org/AUTHORS. | ||
diff --git a/vendor/golang.org/x/crypto/CONTRIBUTORS b/vendor/golang.org/x/crypto/CONTRIBUTORS new file mode 100644 index 0000000..1fbd3e9 --- /dev/null +++ b/vendor/golang.org/x/crypto/CONTRIBUTORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code was written by the Go contributors. | ||
2 | # The master list of contributors is in the main Go distribution, | ||
3 | # visible at https://tip.golang.org/CONTRIBUTORS. | ||
diff --git a/vendor/golang.org/x/net/AUTHORS b/vendor/golang.org/x/net/AUTHORS new file mode 100644 index 0000000..15167cd --- /dev/null +++ b/vendor/golang.org/x/net/AUTHORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code refers to The Go Authors for copyright purposes. | ||
2 | # The master list of authors is in the main Go distribution, | ||
3 | # visible at http://tip.golang.org/AUTHORS. | ||
diff --git a/vendor/golang.org/x/net/CONTRIBUTORS b/vendor/golang.org/x/net/CONTRIBUTORS new file mode 100644 index 0000000..1c4577e --- /dev/null +++ b/vendor/golang.org/x/net/CONTRIBUTORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code was written by the Go contributors. | ||
2 | # The master list of contributors is in the main Go distribution, | ||
3 | # visible at http://tip.golang.org/CONTRIBUTORS. | ||
diff --git a/vendor/golang.org/x/net/internal/iana/gen.go b/vendor/golang.org/x/net/internal/iana/gen.go new file mode 100644 index 0000000..2a7661c --- /dev/null +++ b/vendor/golang.org/x/net/internal/iana/gen.go | |||
@@ -0,0 +1,383 @@ | |||
1 | // Copyright 2013 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | //go:generate go run gen.go | ||
8 | |||
9 | // This program generates internet protocol constants and tables by | ||
10 | // reading IANA protocol registries. | ||
11 | package main | ||
12 | |||
13 | import ( | ||
14 | "bytes" | ||
15 | "encoding/xml" | ||
16 | "fmt" | ||
17 | "go/format" | ||
18 | "io" | ||
19 | "io/ioutil" | ||
20 | "net/http" | ||
21 | "os" | ||
22 | "strconv" | ||
23 | "strings" | ||
24 | ) | ||
25 | |||
26 | var registries = []struct { | ||
27 | url string | ||
28 | parse func(io.Writer, io.Reader) error | ||
29 | }{ | ||
30 | { | ||
31 | "https://www.iana.org/assignments/dscp-registry/dscp-registry.xml", | ||
32 | parseDSCPRegistry, | ||
33 | }, | ||
34 | { | ||
35 | "https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml", | ||
36 | parseProtocolNumbers, | ||
37 | }, | ||
38 | { | ||
39 | "https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xml", | ||
40 | parseAddrFamilyNumbers, | ||
41 | }, | ||
42 | } | ||
43 | |||
44 | func main() { | ||
45 | var bb bytes.Buffer | ||
46 | fmt.Fprintf(&bb, "// go generate gen.go\n") | ||
47 | fmt.Fprintf(&bb, "// Code generated by the command above; DO NOT EDIT.\n\n") | ||
48 | fmt.Fprintf(&bb, "// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).\n") | ||
49 | fmt.Fprintf(&bb, `package iana // import "golang.org/x/net/internal/iana"`+"\n\n") | ||
50 | for _, r := range registries { | ||
51 | resp, err := http.Get(r.url) | ||
52 | if err != nil { | ||
53 | fmt.Fprintln(os.Stderr, err) | ||
54 | os.Exit(1) | ||
55 | } | ||
56 | defer resp.Body.Close() | ||
57 | if resp.StatusCode != http.StatusOK { | ||
58 | fmt.Fprintf(os.Stderr, "got HTTP status code %v for %v\n", resp.StatusCode, r.url) | ||
59 | os.Exit(1) | ||
60 | } | ||
61 | if err := r.parse(&bb, resp.Body); err != nil { | ||
62 | fmt.Fprintln(os.Stderr, err) | ||
63 | os.Exit(1) | ||
64 | } | ||
65 | fmt.Fprintf(&bb, "\n") | ||
66 | } | ||
67 | b, err := format.Source(bb.Bytes()) | ||
68 | if err != nil { | ||
69 | fmt.Fprintln(os.Stderr, err) | ||
70 | os.Exit(1) | ||
71 | } | ||
72 | if err := ioutil.WriteFile("const.go", b, 0644); err != nil { | ||
73 | fmt.Fprintln(os.Stderr, err) | ||
74 | os.Exit(1) | ||
75 | } | ||
76 | } | ||
77 | |||
78 | func parseDSCPRegistry(w io.Writer, r io.Reader) error { | ||
79 | dec := xml.NewDecoder(r) | ||
80 | var dr dscpRegistry | ||
81 | if err := dec.Decode(&dr); err != nil { | ||
82 | return err | ||
83 | } | ||
84 | fmt.Fprintf(w, "// %s, Updated: %s\n", dr.Title, dr.Updated) | ||
85 | fmt.Fprintf(w, "const (\n") | ||
86 | for _, dr := range dr.escapeDSCP() { | ||
87 | fmt.Fprintf(w, "DiffServ%s = %#02x", dr.Name, dr.Value) | ||
88 | fmt.Fprintf(w, "// %s\n", dr.OrigName) | ||
89 | } | ||
90 | for _, er := range dr.escapeECN() { | ||
91 | fmt.Fprintf(w, "%s = %#02x", er.Descr, er.Value) | ||
92 | fmt.Fprintf(w, "// %s\n", er.OrigDescr) | ||
93 | } | ||
94 | fmt.Fprintf(w, ")\n") | ||
95 | return nil | ||
96 | } | ||
97 | |||
98 | type dscpRegistry struct { | ||
99 | XMLName xml.Name `xml:"registry"` | ||
100 | Title string `xml:"title"` | ||
101 | Updated string `xml:"updated"` | ||
102 | Note string `xml:"note"` | ||
103 | Registries []struct { | ||
104 | Title string `xml:"title"` | ||
105 | Registries []struct { | ||
106 | Title string `xml:"title"` | ||
107 | Records []struct { | ||
108 | Name string `xml:"name"` | ||
109 | Space string `xml:"space"` | ||
110 | } `xml:"record"` | ||
111 | } `xml:"registry"` | ||
112 | Records []struct { | ||
113 | Value string `xml:"value"` | ||
114 | Descr string `xml:"description"` | ||
115 | } `xml:"record"` | ||
116 | } `xml:"registry"` | ||
117 | } | ||
118 | |||
119 | type canonDSCPRecord struct { | ||
120 | OrigName string | ||
121 | Name string | ||
122 | Value int | ||
123 | } | ||
124 | |||
125 | func (drr *dscpRegistry) escapeDSCP() []canonDSCPRecord { | ||
126 | var drs []canonDSCPRecord | ||
127 | for _, preg := range drr.Registries { | ||
128 | if !strings.Contains(preg.Title, "Differentiated Services Field Codepoints") { | ||
129 | continue | ||
130 | } | ||
131 | for _, reg := range preg.Registries { | ||
132 | if !strings.Contains(reg.Title, "Pool 1 Codepoints") { | ||
133 | continue | ||
134 | } | ||
135 | drs = make([]canonDSCPRecord, len(reg.Records)) | ||
136 | sr := strings.NewReplacer( | ||
137 | "+", "", | ||
138 | "-", "", | ||
139 | "/", "", | ||
140 | ".", "", | ||
141 | " ", "", | ||
142 | ) | ||
143 | for i, dr := range reg.Records { | ||
144 | s := strings.TrimSpace(dr.Name) | ||
145 | drs[i].OrigName = s | ||
146 | drs[i].Name = sr.Replace(s) | ||
147 | n, err := strconv.ParseUint(dr.Space, 2, 8) | ||
148 | if err != nil { | ||
149 | continue | ||
150 | } | ||
151 | drs[i].Value = int(n) << 2 | ||
152 | } | ||
153 | } | ||
154 | } | ||
155 | return drs | ||
156 | } | ||
157 | |||
158 | type canonECNRecord struct { | ||
159 | OrigDescr string | ||
160 | Descr string | ||
161 | Value int | ||
162 | } | ||
163 | |||
164 | func (drr *dscpRegistry) escapeECN() []canonECNRecord { | ||
165 | var ers []canonECNRecord | ||
166 | for _, reg := range drr.Registries { | ||
167 | if !strings.Contains(reg.Title, "ECN Field") { | ||
168 | continue | ||
169 | } | ||
170 | ers = make([]canonECNRecord, len(reg.Records)) | ||
171 | sr := strings.NewReplacer( | ||
172 | "Capable", "", | ||
173 | "Not-ECT", "", | ||
174 | "ECT(1)", "", | ||
175 | "ECT(0)", "", | ||
176 | "CE", "", | ||
177 | "(", "", | ||
178 | ")", "", | ||
179 | "+", "", | ||
180 | "-", "", | ||
181 | "/", "", | ||
182 | ".", "", | ||
183 | " ", "", | ||
184 | ) | ||
185 | for i, er := range reg.Records { | ||
186 | s := strings.TrimSpace(er.Descr) | ||
187 | ers[i].OrigDescr = s | ||
188 | ss := strings.Split(s, " ") | ||
189 | if len(ss) > 1 { | ||
190 | ers[i].Descr = strings.Join(ss[1:], " ") | ||
191 | } else { | ||
192 | ers[i].Descr = ss[0] | ||
193 | } | ||
194 | ers[i].Descr = sr.Replace(er.Descr) | ||
195 | n, err := strconv.ParseUint(er.Value, 2, 8) | ||
196 | if err != nil { | ||
197 | continue | ||
198 | } | ||
199 | ers[i].Value = int(n) | ||
200 | } | ||
201 | } | ||
202 | return ers | ||
203 | } | ||
204 | |||
205 | func parseProtocolNumbers(w io.Writer, r io.Reader) error { | ||
206 | dec := xml.NewDecoder(r) | ||
207 | var pn protocolNumbers | ||
208 | if err := dec.Decode(&pn); err != nil { | ||
209 | return err | ||
210 | } | ||
211 | prs := pn.escape() | ||
212 | prs = append([]canonProtocolRecord{{ | ||
213 | Name: "IP", | ||
214 | Descr: "IPv4 encapsulation, pseudo protocol number", | ||
215 | Value: 0, | ||
216 | }}, prs...) | ||
217 | fmt.Fprintf(w, "// %s, Updated: %s\n", pn.Title, pn.Updated) | ||
218 | fmt.Fprintf(w, "const (\n") | ||
219 | for _, pr := range prs { | ||
220 | if pr.Name == "" { | ||
221 | continue | ||
222 | } | ||
223 | fmt.Fprintf(w, "Protocol%s = %d", pr.Name, pr.Value) | ||
224 | s := pr.Descr | ||
225 | if s == "" { | ||
226 | s = pr.OrigName | ||
227 | } | ||
228 | fmt.Fprintf(w, "// %s\n", s) | ||
229 | } | ||
230 | fmt.Fprintf(w, ")\n") | ||
231 | return nil | ||
232 | } | ||
233 | |||
234 | type protocolNumbers struct { | ||
235 | XMLName xml.Name `xml:"registry"` | ||
236 | Title string `xml:"title"` | ||
237 | Updated string `xml:"updated"` | ||
238 | RegTitle string `xml:"registry>title"` | ||
239 | Note string `xml:"registry>note"` | ||
240 | Records []struct { | ||
241 | Value string `xml:"value"` | ||
242 | Name string `xml:"name"` | ||
243 | Descr string `xml:"description"` | ||
244 | } `xml:"registry>record"` | ||
245 | } | ||
246 | |||
247 | type canonProtocolRecord struct { | ||
248 | OrigName string | ||
249 | Name string | ||
250 | Descr string | ||
251 | Value int | ||
252 | } | ||
253 | |||
254 | func (pn *protocolNumbers) escape() []canonProtocolRecord { | ||
255 | prs := make([]canonProtocolRecord, len(pn.Records)) | ||
256 | sr := strings.NewReplacer( | ||
257 | "-in-", "in", | ||
258 | "-within-", "within", | ||
259 | "-over-", "over", | ||
260 | "+", "P", | ||
261 | "-", "", | ||
262 | "/", "", | ||
263 | ".", "", | ||
264 | " ", "", | ||
265 | ) | ||
266 | for i, pr := range pn.Records { | ||
267 | if strings.Contains(pr.Name, "Deprecated") || | ||
268 | strings.Contains(pr.Name, "deprecated") { | ||
269 | continue | ||
270 | } | ||
271 | prs[i].OrigName = pr.Name | ||
272 | s := strings.TrimSpace(pr.Name) | ||
273 | switch pr.Name { | ||
274 | case "ISIS over IPv4": | ||
275 | prs[i].Name = "ISIS" | ||
276 | case "manet": | ||
277 | prs[i].Name = "MANET" | ||
278 | default: | ||
279 | prs[i].Name = sr.Replace(s) | ||
280 | } | ||
281 | ss := strings.Split(pr.Descr, "\n") | ||
282 | for i := range ss { | ||
283 | ss[i] = strings.TrimSpace(ss[i]) | ||
284 | } | ||
285 | if len(ss) > 1 { | ||
286 | prs[i].Descr = strings.Join(ss, " ") | ||
287 | } else { | ||
288 | prs[i].Descr = ss[0] | ||
289 | } | ||
290 | prs[i].Value, _ = strconv.Atoi(pr.Value) | ||
291 | } | ||
292 | return prs | ||
293 | } | ||
294 | |||
295 | func parseAddrFamilyNumbers(w io.Writer, r io.Reader) error { | ||
296 | dec := xml.NewDecoder(r) | ||
297 | var afn addrFamilylNumbers | ||
298 | if err := dec.Decode(&afn); err != nil { | ||
299 | return err | ||
300 | } | ||
301 | afrs := afn.escape() | ||
302 | fmt.Fprintf(w, "// %s, Updated: %s\n", afn.Title, afn.Updated) | ||
303 | fmt.Fprintf(w, "const (\n") | ||
304 | for _, afr := range afrs { | ||
305 | if afr.Name == "" { | ||
306 | continue | ||
307 | } | ||
308 | fmt.Fprintf(w, "AddrFamily%s = %d", afr.Name, afr.Value) | ||
309 | fmt.Fprintf(w, "// %s\n", afr.Descr) | ||
310 | } | ||
311 | fmt.Fprintf(w, ")\n") | ||
312 | return nil | ||
313 | } | ||
314 | |||
315 | type addrFamilylNumbers struct { | ||
316 | XMLName xml.Name `xml:"registry"` | ||
317 | Title string `xml:"title"` | ||
318 | Updated string `xml:"updated"` | ||
319 | RegTitle string `xml:"registry>title"` | ||
320 | Note string `xml:"registry>note"` | ||
321 | Records []struct { | ||
322 | Value string `xml:"value"` | ||
323 | Descr string `xml:"description"` | ||
324 | } `xml:"registry>record"` | ||
325 | } | ||
326 | |||
327 | type canonAddrFamilyRecord struct { | ||
328 | Name string | ||
329 | Descr string | ||
330 | Value int | ||
331 | } | ||
332 | |||
333 | func (afn *addrFamilylNumbers) escape() []canonAddrFamilyRecord { | ||
334 | afrs := make([]canonAddrFamilyRecord, len(afn.Records)) | ||
335 | sr := strings.NewReplacer( | ||
336 | "IP version 4", "IPv4", | ||
337 | "IP version 6", "IPv6", | ||
338 | "Identifier", "ID", | ||
339 | "-", "", | ||
340 | "-", "", | ||
341 | "/", "", | ||
342 | ".", "", | ||
343 | " ", "", | ||
344 | ) | ||
345 | for i, afr := range afn.Records { | ||
346 | if strings.Contains(afr.Descr, "Unassigned") || | ||
347 | strings.Contains(afr.Descr, "Reserved") { | ||
348 | continue | ||
349 | } | ||
350 | afrs[i].Descr = afr.Descr | ||
351 | s := strings.TrimSpace(afr.Descr) | ||
352 | switch s { | ||
353 | case "IP (IP version 4)": | ||
354 | afrs[i].Name = "IPv4" | ||
355 | case "IP6 (IP version 6)": | ||
356 | afrs[i].Name = "IPv6" | ||
357 | case "AFI for L2VPN information": | ||
358 | afrs[i].Name = "L2VPN" | ||
359 | case "E.164 with NSAP format subaddress": | ||
360 | afrs[i].Name = "E164withSubaddress" | ||
361 | case "MT IP: Multi-Topology IP version 4": | ||
362 | afrs[i].Name = "MTIPv4" | ||
363 | case "MAC/24": | ||
364 | afrs[i].Name = "MACFinal24bits" | ||
365 | case "MAC/40": | ||
366 | afrs[i].Name = "MACFinal40bits" | ||
367 | case "IPv6/64": | ||
368 | afrs[i].Name = "IPv6Initial64bits" | ||
369 | default: | ||
370 | n := strings.Index(s, "(") | ||
371 | if n > 0 { | ||
372 | s = s[:n] | ||
373 | } | ||
374 | n = strings.Index(s, ":") | ||
375 | if n > 0 { | ||
376 | s = s[:n] | ||
377 | } | ||
378 | afrs[i].Name = sr.Replace(s) | ||
379 | } | ||
380 | afrs[i].Value, _ = strconv.Atoi(afr.Value) | ||
381 | } | ||
382 | return afrs | ||
383 | } | ||
diff --git a/vendor/golang.org/x/net/internal/socket/defs_darwin.go b/vendor/golang.org/x/net/internal/socket/defs_darwin.go new file mode 100644 index 0000000..14e28c0 --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/defs_darwin.go | |||
@@ -0,0 +1,44 @@ | |||
1 | // Copyright 2017 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
9 | |||
10 | package socket | ||
11 | |||
12 | /* | ||
13 | #include <sys/socket.h> | ||
14 | |||
15 | #include <netinet/in.h> | ||
16 | */ | ||
17 | import "C" | ||
18 | |||
19 | const ( | ||
20 | sysAF_UNSPEC = C.AF_UNSPEC | ||
21 | sysAF_INET = C.AF_INET | ||
22 | sysAF_INET6 = C.AF_INET6 | ||
23 | |||
24 | sysSOCK_RAW = C.SOCK_RAW | ||
25 | ) | ||
26 | |||
27 | type iovec C.struct_iovec | ||
28 | |||
29 | type msghdr C.struct_msghdr | ||
30 | |||
31 | type cmsghdr C.struct_cmsghdr | ||
32 | |||
33 | type sockaddrInet C.struct_sockaddr_in | ||
34 | |||
35 | type sockaddrInet6 C.struct_sockaddr_in6 | ||
36 | |||
37 | const ( | ||
38 | sizeofIovec = C.sizeof_struct_iovec | ||
39 | sizeofMsghdr = C.sizeof_struct_msghdr | ||
40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
41 | |||
42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
44 | ) | ||
diff --git a/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go b/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go new file mode 100644 index 0000000..14e28c0 --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go | |||
@@ -0,0 +1,44 @@ | |||
1 | // Copyright 2017 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
9 | |||
10 | package socket | ||
11 | |||
12 | /* | ||
13 | #include <sys/socket.h> | ||
14 | |||
15 | #include <netinet/in.h> | ||
16 | */ | ||
17 | import "C" | ||
18 | |||
19 | const ( | ||
20 | sysAF_UNSPEC = C.AF_UNSPEC | ||
21 | sysAF_INET = C.AF_INET | ||
22 | sysAF_INET6 = C.AF_INET6 | ||
23 | |||
24 | sysSOCK_RAW = C.SOCK_RAW | ||
25 | ) | ||
26 | |||
27 | type iovec C.struct_iovec | ||
28 | |||
29 | type msghdr C.struct_msghdr | ||
30 | |||
31 | type cmsghdr C.struct_cmsghdr | ||
32 | |||
33 | type sockaddrInet C.struct_sockaddr_in | ||
34 | |||
35 | type sockaddrInet6 C.struct_sockaddr_in6 | ||
36 | |||
37 | const ( | ||
38 | sizeofIovec = C.sizeof_struct_iovec | ||
39 | sizeofMsghdr = C.sizeof_struct_msghdr | ||
40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
41 | |||
42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
44 | ) | ||
diff --git a/vendor/golang.org/x/net/internal/socket/defs_freebsd.go b/vendor/golang.org/x/net/internal/socket/defs_freebsd.go new file mode 100644 index 0000000..14e28c0 --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/defs_freebsd.go | |||
@@ -0,0 +1,44 @@ | |||
1 | // Copyright 2017 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
9 | |||
10 | package socket | ||
11 | |||
12 | /* | ||
13 | #include <sys/socket.h> | ||
14 | |||
15 | #include <netinet/in.h> | ||
16 | */ | ||
17 | import "C" | ||
18 | |||
19 | const ( | ||
20 | sysAF_UNSPEC = C.AF_UNSPEC | ||
21 | sysAF_INET = C.AF_INET | ||
22 | sysAF_INET6 = C.AF_INET6 | ||
23 | |||
24 | sysSOCK_RAW = C.SOCK_RAW | ||
25 | ) | ||
26 | |||
27 | type iovec C.struct_iovec | ||
28 | |||
29 | type msghdr C.struct_msghdr | ||
30 | |||
31 | type cmsghdr C.struct_cmsghdr | ||
32 | |||
33 | type sockaddrInet C.struct_sockaddr_in | ||
34 | |||
35 | type sockaddrInet6 C.struct_sockaddr_in6 | ||
36 | |||
37 | const ( | ||
38 | sizeofIovec = C.sizeof_struct_iovec | ||
39 | sizeofMsghdr = C.sizeof_struct_msghdr | ||
40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
41 | |||
42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
44 | ) | ||
diff --git a/vendor/golang.org/x/net/internal/socket/defs_linux.go b/vendor/golang.org/x/net/internal/socket/defs_linux.go new file mode 100644 index 0000000..ce9ec2f --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/defs_linux.go | |||
@@ -0,0 +1,49 @@ | |||
1 | // Copyright 2017 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
9 | |||
10 | package socket | ||
11 | |||
12 | /* | ||
13 | #include <linux/in.h> | ||
14 | #include <linux/in6.h> | ||
15 | |||
16 | #define _GNU_SOURCE | ||
17 | #include <sys/socket.h> | ||
18 | */ | ||
19 | import "C" | ||
20 | |||
21 | const ( | ||
22 | sysAF_UNSPEC = C.AF_UNSPEC | ||
23 | sysAF_INET = C.AF_INET | ||
24 | sysAF_INET6 = C.AF_INET6 | ||
25 | |||
26 | sysSOCK_RAW = C.SOCK_RAW | ||
27 | ) | ||
28 | |||
29 | type iovec C.struct_iovec | ||
30 | |||
31 | type msghdr C.struct_msghdr | ||
32 | |||
33 | type mmsghdr C.struct_mmsghdr | ||
34 | |||
35 | type cmsghdr C.struct_cmsghdr | ||
36 | |||
37 | type sockaddrInet C.struct_sockaddr_in | ||
38 | |||
39 | type sockaddrInet6 C.struct_sockaddr_in6 | ||
40 | |||
41 | const ( | ||
42 | sizeofIovec = C.sizeof_struct_iovec | ||
43 | sizeofMsghdr = C.sizeof_struct_msghdr | ||
44 | sizeofMmsghdr = C.sizeof_struct_mmsghdr | ||
45 | sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
46 | |||
47 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
48 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
49 | ) | ||
diff --git a/vendor/golang.org/x/net/internal/socket/defs_netbsd.go b/vendor/golang.org/x/net/internal/socket/defs_netbsd.go new file mode 100644 index 0000000..3f84335 --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/defs_netbsd.go | |||
@@ -0,0 +1,47 @@ | |||
1 | // Copyright 2017 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
9 | |||
10 | package socket | ||
11 | |||
12 | /* | ||
13 | #include <sys/socket.h> | ||
14 | |||
15 | #include <netinet/in.h> | ||
16 | */ | ||
17 | import "C" | ||
18 | |||
19 | const ( | ||
20 | sysAF_UNSPEC = C.AF_UNSPEC | ||
21 | sysAF_INET = C.AF_INET | ||
22 | sysAF_INET6 = C.AF_INET6 | ||
23 | |||
24 | sysSOCK_RAW = C.SOCK_RAW | ||
25 | ) | ||
26 | |||
27 | type iovec C.struct_iovec | ||
28 | |||
29 | type msghdr C.struct_msghdr | ||
30 | |||
31 | type mmsghdr C.struct_mmsghdr | ||
32 | |||
33 | type cmsghdr C.struct_cmsghdr | ||
34 | |||
35 | type sockaddrInet C.struct_sockaddr_in | ||
36 | |||
37 | type sockaddrInet6 C.struct_sockaddr_in6 | ||
38 | |||
39 | const ( | ||
40 | sizeofIovec = C.sizeof_struct_iovec | ||
41 | sizeofMsghdr = C.sizeof_struct_msghdr | ||
42 | sizeofMmsghdr = C.sizeof_struct_mmsghdr | ||
43 | sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
44 | |||
45 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
46 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
47 | ) | ||
diff --git a/vendor/golang.org/x/net/internal/socket/defs_openbsd.go b/vendor/golang.org/x/net/internal/socket/defs_openbsd.go new file mode 100644 index 0000000..14e28c0 --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/defs_openbsd.go | |||
@@ -0,0 +1,44 @@ | |||
1 | // Copyright 2017 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
9 | |||
10 | package socket | ||
11 | |||
12 | /* | ||
13 | #include <sys/socket.h> | ||
14 | |||
15 | #include <netinet/in.h> | ||
16 | */ | ||
17 | import "C" | ||
18 | |||
19 | const ( | ||
20 | sysAF_UNSPEC = C.AF_UNSPEC | ||
21 | sysAF_INET = C.AF_INET | ||
22 | sysAF_INET6 = C.AF_INET6 | ||
23 | |||
24 | sysSOCK_RAW = C.SOCK_RAW | ||
25 | ) | ||
26 | |||
27 | type iovec C.struct_iovec | ||
28 | |||
29 | type msghdr C.struct_msghdr | ||
30 | |||
31 | type cmsghdr C.struct_cmsghdr | ||
32 | |||
33 | type sockaddrInet C.struct_sockaddr_in | ||
34 | |||
35 | type sockaddrInet6 C.struct_sockaddr_in6 | ||
36 | |||
37 | const ( | ||
38 | sizeofIovec = C.sizeof_struct_iovec | ||
39 | sizeofMsghdr = C.sizeof_struct_msghdr | ||
40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
41 | |||
42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
44 | ) | ||
diff --git a/vendor/golang.org/x/net/internal/socket/defs_solaris.go b/vendor/golang.org/x/net/internal/socket/defs_solaris.go new file mode 100644 index 0000000..14e28c0 --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/defs_solaris.go | |||
@@ -0,0 +1,44 @@ | |||
1 | // Copyright 2017 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
9 | |||
10 | package socket | ||
11 | |||
12 | /* | ||
13 | #include <sys/socket.h> | ||
14 | |||
15 | #include <netinet/in.h> | ||
16 | */ | ||
17 | import "C" | ||
18 | |||
19 | const ( | ||
20 | sysAF_UNSPEC = C.AF_UNSPEC | ||
21 | sysAF_INET = C.AF_INET | ||
22 | sysAF_INET6 = C.AF_INET6 | ||
23 | |||
24 | sysSOCK_RAW = C.SOCK_RAW | ||
25 | ) | ||
26 | |||
27 | type iovec C.struct_iovec | ||
28 | |||
29 | type msghdr C.struct_msghdr | ||
30 | |||
31 | type cmsghdr C.struct_cmsghdr | ||
32 | |||
33 | type sockaddrInet C.struct_sockaddr_in | ||
34 | |||
35 | type sockaddrInet6 C.struct_sockaddr_in6 | ||
36 | |||
37 | const ( | ||
38 | sizeofIovec = C.sizeof_struct_iovec | ||
39 | sizeofMsghdr = C.sizeof_struct_msghdr | ||
40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
41 | |||
42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
44 | ) | ||
diff --git a/vendor/golang.org/x/net/ipv4/defs_darwin.go b/vendor/golang.org/x/net/ipv4/defs_darwin.go new file mode 100644 index 0000000..c8f2e05 --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/defs_darwin.go | |||
@@ -0,0 +1,77 @@ | |||
1 | // Copyright 2014 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | |||
9 | package ipv4 | ||
10 | |||
11 | /* | ||
12 | #include <sys/socket.h> | ||
13 | |||
14 | #include <netinet/in.h> | ||
15 | */ | ||
16 | import "C" | ||
17 | |||
18 | const ( | ||
19 | sysIP_OPTIONS = C.IP_OPTIONS | ||
20 | sysIP_HDRINCL = C.IP_HDRINCL | ||
21 | sysIP_TOS = C.IP_TOS | ||
22 | sysIP_TTL = C.IP_TTL | ||
23 | sysIP_RECVOPTS = C.IP_RECVOPTS | ||
24 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS | ||
25 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR | ||
26 | sysIP_RETOPTS = C.IP_RETOPTS | ||
27 | sysIP_RECVIF = C.IP_RECVIF | ||
28 | sysIP_STRIPHDR = C.IP_STRIPHDR | ||
29 | sysIP_RECVTTL = C.IP_RECVTTL | ||
30 | sysIP_BOUND_IF = C.IP_BOUND_IF | ||
31 | sysIP_PKTINFO = C.IP_PKTINFO | ||
32 | sysIP_RECVPKTINFO = C.IP_RECVPKTINFO | ||
33 | |||
34 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF | ||
35 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL | ||
36 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP | ||
37 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP | ||
38 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP | ||
39 | sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF | ||
40 | sysIP_MULTICAST_IFINDEX = C.IP_MULTICAST_IFINDEX | ||
41 | sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP | ||
42 | sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP | ||
43 | sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE | ||
44 | sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE | ||
45 | sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP | ||
46 | sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP | ||
47 | sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP | ||
48 | sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP | ||
49 | sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE | ||
50 | sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE | ||
51 | |||
52 | sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage | ||
53 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
54 | sizeofInetPktinfo = C.sizeof_struct_in_pktinfo | ||
55 | |||
56 | sizeofIPMreq = C.sizeof_struct_ip_mreq | ||
57 | sizeofIPMreqn = C.sizeof_struct_ip_mreqn | ||
58 | sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source | ||
59 | sizeofGroupReq = C.sizeof_struct_group_req | ||
60 | sizeofGroupSourceReq = C.sizeof_struct_group_source_req | ||
61 | ) | ||
62 | |||
63 | type sockaddrStorage C.struct_sockaddr_storage | ||
64 | |||
65 | type sockaddrInet C.struct_sockaddr_in | ||
66 | |||
67 | type inetPktinfo C.struct_in_pktinfo | ||
68 | |||
69 | type ipMreq C.struct_ip_mreq | ||
70 | |||
71 | type ipMreqn C.struct_ip_mreqn | ||
72 | |||
73 | type ipMreqSource C.struct_ip_mreq_source | ||
74 | |||
75 | type groupReq C.struct_group_req | ||
76 | |||
77 | type groupSourceReq C.struct_group_source_req | ||
diff --git a/vendor/golang.org/x/net/ipv4/defs_dragonfly.go b/vendor/golang.org/x/net/ipv4/defs_dragonfly.go new file mode 100644 index 0000000..f30544e --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/defs_dragonfly.go | |||
@@ -0,0 +1,38 @@ | |||
1 | // Copyright 2014 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | |||
9 | package ipv4 | ||
10 | |||
11 | /* | ||
12 | #include <netinet/in.h> | ||
13 | */ | ||
14 | import "C" | ||
15 | |||
16 | const ( | ||
17 | sysIP_OPTIONS = C.IP_OPTIONS | ||
18 | sysIP_HDRINCL = C.IP_HDRINCL | ||
19 | sysIP_TOS = C.IP_TOS | ||
20 | sysIP_TTL = C.IP_TTL | ||
21 | sysIP_RECVOPTS = C.IP_RECVOPTS | ||
22 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS | ||
23 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR | ||
24 | sysIP_RETOPTS = C.IP_RETOPTS | ||
25 | sysIP_RECVIF = C.IP_RECVIF | ||
26 | sysIP_RECVTTL = C.IP_RECVTTL | ||
27 | |||
28 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF | ||
29 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL | ||
30 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP | ||
31 | sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF | ||
32 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP | ||
33 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP | ||
34 | |||
35 | sizeofIPMreq = C.sizeof_struct_ip_mreq | ||
36 | ) | ||
37 | |||
38 | type ipMreq C.struct_ip_mreq | ||
diff --git a/vendor/golang.org/x/net/ipv4/defs_freebsd.go b/vendor/golang.org/x/net/ipv4/defs_freebsd.go new file mode 100644 index 0000000..4dd57d8 --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/defs_freebsd.go | |||
@@ -0,0 +1,75 @@ | |||
1 | // Copyright 2014 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | |||
9 | package ipv4 | ||
10 | |||
11 | /* | ||
12 | #include <sys/socket.h> | ||
13 | |||
14 | #include <netinet/in.h> | ||
15 | */ | ||
16 | import "C" | ||
17 | |||
18 | const ( | ||
19 | sysIP_OPTIONS = C.IP_OPTIONS | ||
20 | sysIP_HDRINCL = C.IP_HDRINCL | ||
21 | sysIP_TOS = C.IP_TOS | ||
22 | sysIP_TTL = C.IP_TTL | ||
23 | sysIP_RECVOPTS = C.IP_RECVOPTS | ||
24 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS | ||
25 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR | ||
26 | sysIP_SENDSRCADDR = C.IP_SENDSRCADDR | ||
27 | sysIP_RETOPTS = C.IP_RETOPTS | ||
28 | sysIP_RECVIF = C.IP_RECVIF | ||
29 | sysIP_ONESBCAST = C.IP_ONESBCAST | ||
30 | sysIP_BINDANY = C.IP_BINDANY | ||
31 | sysIP_RECVTTL = C.IP_RECVTTL | ||
32 | sysIP_MINTTL = C.IP_MINTTL | ||
33 | sysIP_DONTFRAG = C.IP_DONTFRAG | ||
34 | sysIP_RECVTOS = C.IP_RECVTOS | ||
35 | |||
36 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF | ||
37 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL | ||
38 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP | ||
39 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP | ||
40 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP | ||
41 | sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF | ||
42 | sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP | ||
43 | sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP | ||
44 | sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE | ||
45 | sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE | ||
46 | sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP | ||
47 | sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP | ||
48 | sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP | ||
49 | sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP | ||
50 | sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE | ||
51 | sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE | ||
52 | |||
53 | sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage | ||
54 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
55 | |||
56 | sizeofIPMreq = C.sizeof_struct_ip_mreq | ||
57 | sizeofIPMreqn = C.sizeof_struct_ip_mreqn | ||
58 | sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source | ||
59 | sizeofGroupReq = C.sizeof_struct_group_req | ||
60 | sizeofGroupSourceReq = C.sizeof_struct_group_source_req | ||
61 | ) | ||
62 | |||
63 | type sockaddrStorage C.struct_sockaddr_storage | ||
64 | |||
65 | type sockaddrInet C.struct_sockaddr_in | ||
66 | |||
67 | type ipMreq C.struct_ip_mreq | ||
68 | |||
69 | type ipMreqn C.struct_ip_mreqn | ||
70 | |||
71 | type ipMreqSource C.struct_ip_mreq_source | ||
72 | |||
73 | type groupReq C.struct_group_req | ||
74 | |||
75 | type groupSourceReq C.struct_group_source_req | ||
diff --git a/vendor/golang.org/x/net/ipv4/defs_linux.go b/vendor/golang.org/x/net/ipv4/defs_linux.go new file mode 100644 index 0000000..beb1107 --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/defs_linux.go | |||
@@ -0,0 +1,122 @@ | |||
1 | // Copyright 2014 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | |||
9 | package ipv4 | ||
10 | |||
11 | /* | ||
12 | #include <time.h> | ||
13 | |||
14 | #include <linux/errqueue.h> | ||
15 | #include <linux/icmp.h> | ||
16 | #include <linux/in.h> | ||
17 | #include <linux/filter.h> | ||
18 | #include <sys/socket.h> | ||
19 | */ | ||
20 | import "C" | ||
21 | |||
22 | const ( | ||
23 | sysIP_TOS = C.IP_TOS | ||
24 | sysIP_TTL = C.IP_TTL | ||
25 | sysIP_HDRINCL = C.IP_HDRINCL | ||
26 | sysIP_OPTIONS = C.IP_OPTIONS | ||
27 | sysIP_ROUTER_ALERT = C.IP_ROUTER_ALERT | ||
28 | sysIP_RECVOPTS = C.IP_RECVOPTS | ||
29 | sysIP_RETOPTS = C.IP_RETOPTS | ||
30 | sysIP_PKTINFO = C.IP_PKTINFO | ||
31 | sysIP_PKTOPTIONS = C.IP_PKTOPTIONS | ||
32 | sysIP_MTU_DISCOVER = C.IP_MTU_DISCOVER | ||
33 | sysIP_RECVERR = C.IP_RECVERR | ||
34 | sysIP_RECVTTL = C.IP_RECVTTL | ||
35 | sysIP_RECVTOS = C.IP_RECVTOS | ||
36 | sysIP_MTU = C.IP_MTU | ||
37 | sysIP_FREEBIND = C.IP_FREEBIND | ||
38 | sysIP_TRANSPARENT = C.IP_TRANSPARENT | ||
39 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS | ||
40 | sysIP_ORIGDSTADDR = C.IP_ORIGDSTADDR | ||
41 | sysIP_RECVORIGDSTADDR = C.IP_RECVORIGDSTADDR | ||
42 | sysIP_MINTTL = C.IP_MINTTL | ||
43 | sysIP_NODEFRAG = C.IP_NODEFRAG | ||
44 | sysIP_UNICAST_IF = C.IP_UNICAST_IF | ||
45 | |||
46 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF | ||
47 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL | ||
48 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP | ||
49 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP | ||
50 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP | ||
51 | sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE | ||
52 | sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE | ||
53 | sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP | ||
54 | sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP | ||
55 | sysIP_MSFILTER = C.IP_MSFILTER | ||
56 | sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP | ||
57 | sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP | ||
58 | sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP | ||
59 | sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP | ||
60 | sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE | ||
61 | sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE | ||
62 | sysMCAST_MSFILTER = C.MCAST_MSFILTER | ||
63 | sysIP_MULTICAST_ALL = C.IP_MULTICAST_ALL | ||
64 | |||
65 | //sysIP_PMTUDISC_DONT = C.IP_PMTUDISC_DONT | ||
66 | //sysIP_PMTUDISC_WANT = C.IP_PMTUDISC_WANT | ||
67 | //sysIP_PMTUDISC_DO = C.IP_PMTUDISC_DO | ||
68 | //sysIP_PMTUDISC_PROBE = C.IP_PMTUDISC_PROBE | ||
69 | //sysIP_PMTUDISC_INTERFACE = C.IP_PMTUDISC_INTERFACE | ||
70 | //sysIP_PMTUDISC_OMIT = C.IP_PMTUDISC_OMIT | ||
71 | |||
72 | sysICMP_FILTER = C.ICMP_FILTER | ||
73 | |||
74 | sysSO_EE_ORIGIN_NONE = C.SO_EE_ORIGIN_NONE | ||
75 | sysSO_EE_ORIGIN_LOCAL = C.SO_EE_ORIGIN_LOCAL | ||
76 | sysSO_EE_ORIGIN_ICMP = C.SO_EE_ORIGIN_ICMP | ||
77 | sysSO_EE_ORIGIN_ICMP6 = C.SO_EE_ORIGIN_ICMP6 | ||
78 | sysSO_EE_ORIGIN_TXSTATUS = C.SO_EE_ORIGIN_TXSTATUS | ||
79 | sysSO_EE_ORIGIN_TIMESTAMPING = C.SO_EE_ORIGIN_TIMESTAMPING | ||
80 | |||
81 | sysSOL_SOCKET = C.SOL_SOCKET | ||
82 | sysSO_ATTACH_FILTER = C.SO_ATTACH_FILTER | ||
83 | |||
84 | sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage | ||
85 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
86 | sizeofInetPktinfo = C.sizeof_struct_in_pktinfo | ||
87 | sizeofSockExtendedErr = C.sizeof_struct_sock_extended_err | ||
88 | |||
89 | sizeofIPMreq = C.sizeof_struct_ip_mreq | ||
90 | sizeofIPMreqn = C.sizeof_struct_ip_mreqn | ||
91 | sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source | ||
92 | sizeofGroupReq = C.sizeof_struct_group_req | ||
93 | sizeofGroupSourceReq = C.sizeof_struct_group_source_req | ||
94 | |||
95 | sizeofICMPFilter = C.sizeof_struct_icmp_filter | ||
96 | |||
97 | sizeofSockFprog = C.sizeof_struct_sock_fprog | ||
98 | ) | ||
99 | |||
100 | type kernelSockaddrStorage C.struct___kernel_sockaddr_storage | ||
101 | |||
102 | type sockaddrInet C.struct_sockaddr_in | ||
103 | |||
104 | type inetPktinfo C.struct_in_pktinfo | ||
105 | |||
106 | type sockExtendedErr C.struct_sock_extended_err | ||
107 | |||
108 | type ipMreq C.struct_ip_mreq | ||
109 | |||
110 | type ipMreqn C.struct_ip_mreqn | ||
111 | |||
112 | type ipMreqSource C.struct_ip_mreq_source | ||
113 | |||
114 | type groupReq C.struct_group_req | ||
115 | |||
116 | type groupSourceReq C.struct_group_source_req | ||
117 | |||
118 | type icmpFilter C.struct_icmp_filter | ||
119 | |||
120 | type sockFProg C.struct_sock_fprog | ||
121 | |||
122 | type sockFilter C.struct_sock_filter | ||
diff --git a/vendor/golang.org/x/net/ipv4/defs_netbsd.go b/vendor/golang.org/x/net/ipv4/defs_netbsd.go new file mode 100644 index 0000000..8f8af1b --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/defs_netbsd.go | |||
@@ -0,0 +1,37 @@ | |||
1 | // Copyright 2014 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | |||
9 | package ipv4 | ||
10 | |||
11 | /* | ||
12 | #include <netinet/in.h> | ||
13 | */ | ||
14 | import "C" | ||
15 | |||
16 | const ( | ||
17 | sysIP_OPTIONS = C.IP_OPTIONS | ||
18 | sysIP_HDRINCL = C.IP_HDRINCL | ||
19 | sysIP_TOS = C.IP_TOS | ||
20 | sysIP_TTL = C.IP_TTL | ||
21 | sysIP_RECVOPTS = C.IP_RECVOPTS | ||
22 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS | ||
23 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR | ||
24 | sysIP_RETOPTS = C.IP_RETOPTS | ||
25 | sysIP_RECVIF = C.IP_RECVIF | ||
26 | sysIP_RECVTTL = C.IP_RECVTTL | ||
27 | |||
28 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF | ||
29 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL | ||
30 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP | ||
31 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP | ||
32 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP | ||
33 | |||
34 | sizeofIPMreq = C.sizeof_struct_ip_mreq | ||
35 | ) | ||
36 | |||
37 | type ipMreq C.struct_ip_mreq | ||
diff --git a/vendor/golang.org/x/net/ipv4/defs_openbsd.go b/vendor/golang.org/x/net/ipv4/defs_openbsd.go new file mode 100644 index 0000000..8f8af1b --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/defs_openbsd.go | |||
@@ -0,0 +1,37 @@ | |||
1 | // Copyright 2014 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | |||
9 | package ipv4 | ||
10 | |||
11 | /* | ||
12 | #include <netinet/in.h> | ||
13 | */ | ||
14 | import "C" | ||
15 | |||
16 | const ( | ||
17 | sysIP_OPTIONS = C.IP_OPTIONS | ||
18 | sysIP_HDRINCL = C.IP_HDRINCL | ||
19 | sysIP_TOS = C.IP_TOS | ||
20 | sysIP_TTL = C.IP_TTL | ||
21 | sysIP_RECVOPTS = C.IP_RECVOPTS | ||
22 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS | ||
23 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR | ||
24 | sysIP_RETOPTS = C.IP_RETOPTS | ||
25 | sysIP_RECVIF = C.IP_RECVIF | ||
26 | sysIP_RECVTTL = C.IP_RECVTTL | ||
27 | |||
28 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF | ||
29 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL | ||
30 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP | ||
31 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP | ||
32 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP | ||
33 | |||
34 | sizeofIPMreq = C.sizeof_struct_ip_mreq | ||
35 | ) | ||
36 | |||
37 | type ipMreq C.struct_ip_mreq | ||
diff --git a/vendor/golang.org/x/net/ipv4/defs_solaris.go b/vendor/golang.org/x/net/ipv4/defs_solaris.go new file mode 100644 index 0000000..aeb33e9 --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/defs_solaris.go | |||
@@ -0,0 +1,84 @@ | |||
1 | // Copyright 2014 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
8 | |||
9 | package ipv4 | ||
10 | |||
11 | /* | ||
12 | #include <sys/socket.h> | ||
13 | |||
14 | #include <netinet/in.h> | ||
15 | */ | ||
16 | import "C" | ||
17 | |||
18 | const ( | ||
19 | sysIP_OPTIONS = C.IP_OPTIONS | ||
20 | sysIP_HDRINCL = C.IP_HDRINCL | ||
21 | sysIP_TOS = C.IP_TOS | ||
22 | sysIP_TTL = C.IP_TTL | ||
23 | sysIP_RECVOPTS = C.IP_RECVOPTS | ||
24 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS | ||
25 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR | ||
26 | sysIP_RETOPTS = C.IP_RETOPTS | ||
27 | sysIP_RECVIF = C.IP_RECVIF | ||
28 | sysIP_RECVSLLA = C.IP_RECVSLLA | ||
29 | sysIP_RECVTTL = C.IP_RECVTTL | ||
30 | |||
31 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF | ||
32 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL | ||
33 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP | ||
34 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP | ||
35 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP | ||
36 | sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE | ||
37 | sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE | ||
38 | sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP | ||
39 | sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP | ||
40 | sysIP_NEXTHOP = C.IP_NEXTHOP | ||
41 | |||
42 | sysIP_PKTINFO = C.IP_PKTINFO | ||
43 | sysIP_RECVPKTINFO = C.IP_RECVPKTINFO | ||
44 | sysIP_DONTFRAG = C.IP_DONTFRAG | ||
45 | |||
46 | sysIP_BOUND_IF = C.IP_BOUND_IF | ||
47 | sysIP_UNSPEC_SRC = C.IP_UNSPEC_SRC | ||
48 | sysIP_BROADCAST_TTL = C.IP_BROADCAST_TTL | ||
49 | sysIP_DHCPINIT_IF = C.IP_DHCPINIT_IF | ||
50 | |||
51 | sysIP_REUSEADDR = C.IP_REUSEADDR | ||
52 | sysIP_DONTROUTE = C.IP_DONTROUTE | ||
53 | sysIP_BROADCAST = C.IP_BROADCAST | ||
54 | |||
55 | sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP | ||
56 | sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP | ||
57 | sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE | ||
58 | sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE | ||
59 | sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP | ||
60 | sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP | ||
61 | |||
62 | sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage | ||
63 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
64 | sizeofInetPktinfo = C.sizeof_struct_in_pktinfo | ||
65 | |||
66 | sizeofIPMreq = C.sizeof_struct_ip_mreq | ||
67 | sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source | ||
68 | sizeofGroupReq = C.sizeof_struct_group_req | ||
69 | sizeofGroupSourceReq = C.sizeof_struct_group_source_req | ||
70 | ) | ||
71 | |||
72 | type sockaddrStorage C.struct_sockaddr_storage | ||
73 | |||
74 | type sockaddrInet C.struct_sockaddr_in | ||
75 | |||
76 | type inetPktinfo C.struct_in_pktinfo | ||
77 | |||
78 | type ipMreq C.struct_ip_mreq | ||
79 | |||
80 | type ipMreqSource C.struct_ip_mreq_source | ||
81 | |||
82 | type groupReq C.struct_group_req | ||
83 | |||
84 | type groupSourceReq C.struct_group_source_req | ||
diff --git a/vendor/golang.org/x/net/ipv4/gen.go b/vendor/golang.org/x/net/ipv4/gen.go new file mode 100644 index 0000000..1bb1737 --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/gen.go | |||
@@ -0,0 +1,199 @@ | |||
1 | // Copyright 2013 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | //go:generate go run gen.go | ||
8 | |||
9 | // This program generates system adaptation constants and types, | ||
10 | // internet protocol constants and tables by reading template files | ||
11 | // and IANA protocol registries. | ||
12 | package main | ||
13 | |||
14 | import ( | ||
15 | "bytes" | ||
16 | "encoding/xml" | ||
17 | "fmt" | ||
18 | "go/format" | ||
19 | "io" | ||
20 | "io/ioutil" | ||
21 | "net/http" | ||
22 | "os" | ||
23 | "os/exec" | ||
24 | "runtime" | ||
25 | "strconv" | ||
26 | "strings" | ||
27 | ) | ||
28 | |||
29 | func main() { | ||
30 | if err := genzsys(); err != nil { | ||
31 | fmt.Fprintln(os.Stderr, err) | ||
32 | os.Exit(1) | ||
33 | } | ||
34 | if err := geniana(); err != nil { | ||
35 | fmt.Fprintln(os.Stderr, err) | ||
36 | os.Exit(1) | ||
37 | } | ||
38 | } | ||
39 | |||
40 | func genzsys() error { | ||
41 | defs := "defs_" + runtime.GOOS + ".go" | ||
42 | f, err := os.Open(defs) | ||
43 | if err != nil { | ||
44 | if os.IsNotExist(err) { | ||
45 | return nil | ||
46 | } | ||
47 | return err | ||
48 | } | ||
49 | f.Close() | ||
50 | cmd := exec.Command("go", "tool", "cgo", "-godefs", defs) | ||
51 | b, err := cmd.Output() | ||
52 | if err != nil { | ||
53 | return err | ||
54 | } | ||
55 | b, err = format.Source(b) | ||
56 | if err != nil { | ||
57 | return err | ||
58 | } | ||
59 | zsys := "zsys_" + runtime.GOOS + ".go" | ||
60 | switch runtime.GOOS { | ||
61 | case "freebsd", "linux": | ||
62 | zsys = "zsys_" + runtime.GOOS + "_" + runtime.GOARCH + ".go" | ||
63 | } | ||
64 | if err := ioutil.WriteFile(zsys, b, 0644); err != nil { | ||
65 | return err | ||
66 | } | ||
67 | return nil | ||
68 | } | ||
69 | |||
70 | var registries = []struct { | ||
71 | url string | ||
72 | parse func(io.Writer, io.Reader) error | ||
73 | }{ | ||
74 | { | ||
75 | "https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml", | ||
76 | parseICMPv4Parameters, | ||
77 | }, | ||
78 | } | ||
79 | |||
80 | func geniana() error { | ||
81 | var bb bytes.Buffer | ||
82 | fmt.Fprintf(&bb, "// go generate gen.go\n") | ||
83 | fmt.Fprintf(&bb, "// Code generated by the command above; DO NOT EDIT.\n\n") | ||
84 | fmt.Fprintf(&bb, "package ipv4\n\n") | ||
85 | for _, r := range registries { | ||
86 | resp, err := http.Get(r.url) | ||
87 | if err != nil { | ||
88 | return err | ||
89 | } | ||
90 | defer resp.Body.Close() | ||
91 | if resp.StatusCode != http.StatusOK { | ||
92 | return fmt.Errorf("got HTTP status code %v for %v\n", resp.StatusCode, r.url) | ||
93 | } | ||
94 | if err := r.parse(&bb, resp.Body); err != nil { | ||
95 | return err | ||
96 | } | ||
97 | fmt.Fprintf(&bb, "\n") | ||
98 | } | ||
99 | b, err := format.Source(bb.Bytes()) | ||
100 | if err != nil { | ||
101 | return err | ||
102 | } | ||
103 | if err := ioutil.WriteFile("iana.go", b, 0644); err != nil { | ||
104 | return err | ||
105 | } | ||
106 | return nil | ||
107 | } | ||
108 | |||
109 | func parseICMPv4Parameters(w io.Writer, r io.Reader) error { | ||
110 | dec := xml.NewDecoder(r) | ||
111 | var icp icmpv4Parameters | ||
112 | if err := dec.Decode(&icp); err != nil { | ||
113 | return err | ||
114 | } | ||
115 | prs := icp.escape() | ||
116 | fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated) | ||
117 | fmt.Fprintf(w, "const (\n") | ||
118 | for _, pr := range prs { | ||
119 | if pr.Descr == "" { | ||
120 | continue | ||
121 | } | ||
122 | fmt.Fprintf(w, "ICMPType%s ICMPType = %d", pr.Descr, pr.Value) | ||
123 | fmt.Fprintf(w, "// %s\n", pr.OrigDescr) | ||
124 | } | ||
125 | fmt.Fprintf(w, ")\n\n") | ||
126 | fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated) | ||
127 | fmt.Fprintf(w, "var icmpTypes = map[ICMPType]string{\n") | ||
128 | for _, pr := range prs { | ||
129 | if pr.Descr == "" { | ||
130 | continue | ||
131 | } | ||
132 | fmt.Fprintf(w, "%d: %q,\n", pr.Value, strings.ToLower(pr.OrigDescr)) | ||
133 | } | ||
134 | fmt.Fprintf(w, "}\n") | ||
135 | return nil | ||
136 | } | ||
137 | |||
138 | type icmpv4Parameters struct { | ||
139 | XMLName xml.Name `xml:"registry"` | ||
140 | Title string `xml:"title"` | ||
141 | Updated string `xml:"updated"` | ||
142 | Registries []struct { | ||
143 | Title string `xml:"title"` | ||
144 | Records []struct { | ||
145 | Value string `xml:"value"` | ||
146 | Descr string `xml:"description"` | ||
147 | } `xml:"record"` | ||
148 | } `xml:"registry"` | ||
149 | } | ||
150 | |||
151 | type canonICMPv4ParamRecord struct { | ||
152 | OrigDescr string | ||
153 | Descr string | ||
154 | Value int | ||
155 | } | ||
156 | |||
157 | func (icp *icmpv4Parameters) escape() []canonICMPv4ParamRecord { | ||
158 | id := -1 | ||
159 | for i, r := range icp.Registries { | ||
160 | if strings.Contains(r.Title, "Type") || strings.Contains(r.Title, "type") { | ||
161 | id = i | ||
162 | break | ||
163 | } | ||
164 | } | ||
165 | if id < 0 { | ||
166 | return nil | ||
167 | } | ||
168 | prs := make([]canonICMPv4ParamRecord, len(icp.Registries[id].Records)) | ||
169 | sr := strings.NewReplacer( | ||
170 | "Messages", "", | ||
171 | "Message", "", | ||
172 | "ICMP", "", | ||
173 | "+", "P", | ||
174 | "-", "", | ||
175 | "/", "", | ||
176 | ".", "", | ||
177 | " ", "", | ||
178 | ) | ||
179 | for i, pr := range icp.Registries[id].Records { | ||
180 | if strings.Contains(pr.Descr, "Reserved") || | ||
181 | strings.Contains(pr.Descr, "Unassigned") || | ||
182 | strings.Contains(pr.Descr, "Deprecated") || | ||
183 | strings.Contains(pr.Descr, "Experiment") || | ||
184 | strings.Contains(pr.Descr, "experiment") { | ||
185 | continue | ||
186 | } | ||
187 | ss := strings.Split(pr.Descr, "\n") | ||
188 | if len(ss) > 1 { | ||
189 | prs[i].Descr = strings.Join(ss, " ") | ||
190 | } else { | ||
191 | prs[i].Descr = ss[0] | ||
192 | } | ||
193 | s := strings.TrimSpace(prs[i].Descr) | ||
194 | prs[i].OrigDescr = s | ||
195 | prs[i].Descr = sr.Replace(s) | ||
196 | prs[i].Value, _ = strconv.Atoi(pr.Value) | ||
197 | } | ||
198 | return prs | ||
199 | } | ||
diff --git a/vendor/golang.org/x/sys/AUTHORS b/vendor/golang.org/x/sys/AUTHORS new file mode 100644 index 0000000..15167cd --- /dev/null +++ b/vendor/golang.org/x/sys/AUTHORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code refers to The Go Authors for copyright purposes. | ||
2 | # The master list of authors is in the main Go distribution, | ||
3 | # visible at http://tip.golang.org/AUTHORS. | ||
diff --git a/vendor/golang.org/x/sys/CONTRIBUTORS b/vendor/golang.org/x/sys/CONTRIBUTORS new file mode 100644 index 0000000..1c4577e --- /dev/null +++ b/vendor/golang.org/x/sys/CONTRIBUTORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code was written by the Go contributors. | ||
2 | # The master list of contributors is in the main Go distribution, | ||
3 | # visible at http://tip.golang.org/CONTRIBUTORS. | ||
diff --git a/vendor/golang.org/x/sys/unix/.gitignore b/vendor/golang.org/x/sys/unix/.gitignore new file mode 100644 index 0000000..e3e0fc6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | _obj/ | ||
2 | unix.test | ||
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index edb176f..edb176f 100755..100644 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh | |||
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 7943853..7943853 100755..100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh | |||
diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go new file mode 100644 index 0000000..7e5c22c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mkpost.go | |||
@@ -0,0 +1,98 @@ | |||
1 | // Copyright 2016 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | // mkpost processes the output of cgo -godefs to | ||
8 | // modify the generated types. It is used to clean up | ||
9 | // the sys API in an architecture specific manner. | ||
10 | // | ||
11 | // mkpost is run after cgo -godefs; see README.md. | ||
12 | package main | ||
13 | |||
14 | import ( | ||
15 | "bytes" | ||
16 | "fmt" | ||
17 | "go/format" | ||
18 | "io/ioutil" | ||
19 | "log" | ||
20 | "os" | ||
21 | "regexp" | ||
22 | ) | ||
23 | |||
24 | func main() { | ||
25 | // Get the OS and architecture (using GOARCH_TARGET if it exists) | ||
26 | goos := os.Getenv("GOOS") | ||
27 | goarch := os.Getenv("GOARCH_TARGET") | ||
28 | if goarch == "" { | ||
29 | goarch = os.Getenv("GOARCH") | ||
30 | } | ||
31 | // Check that we are using the new build system if we should be. | ||
32 | if goos == "linux" && goarch != "sparc64" { | ||
33 | if os.Getenv("GOLANG_SYS_BUILD") != "docker" { | ||
34 | os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n") | ||
35 | os.Stderr.WriteString("See README.md\n") | ||
36 | os.Exit(1) | ||
37 | } | ||
38 | } | ||
39 | |||
40 | b, err := ioutil.ReadAll(os.Stdin) | ||
41 | if err != nil { | ||
42 | log.Fatal(err) | ||
43 | } | ||
44 | |||
45 | // Intentionally export __val fields in Fsid and Sigset_t | ||
46 | valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`) | ||
47 | b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}")) | ||
48 | |||
49 | // If we have empty Ptrace structs, we should delete them. Only s390x emits | ||
50 | // nonempty Ptrace structs. | ||
51 | ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`) | ||
52 | b = ptraceRexexp.ReplaceAll(b, nil) | ||
53 | |||
54 | // Replace the control_regs union with a blank identifier for now. | ||
55 | controlRegsRegex := regexp.MustCompile(`(Control_regs)\s+\[0\]uint64`) | ||
56 | b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64")) | ||
57 | |||
58 | // Remove fields that are added by glibc | ||
59 | // Note that this is unstable as the identifers are private. | ||
60 | removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`) | ||
61 | b = removeFieldsRegex.ReplaceAll(b, []byte("_")) | ||
62 | |||
63 | // Convert [65]int8 to [65]byte in Utsname members to simplify | ||
64 | // conversion to string; see golang.org/issue/20753 | ||
65 | convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`) | ||
66 | b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte")) | ||
67 | |||
68 | // Remove spare fields (e.g. in Statx_t) | ||
69 | spareFieldsRegex := regexp.MustCompile(`X__spare\S*`) | ||
70 | b = spareFieldsRegex.ReplaceAll(b, []byte("_")) | ||
71 | |||
72 | // Remove cgo padding fields | ||
73 | removePaddingFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`) | ||
74 | b = removePaddingFieldsRegex.ReplaceAll(b, []byte("_")) | ||
75 | |||
76 | // Remove padding, hidden, or unused fields | ||
77 | removeFieldsRegex = regexp.MustCompile(`\b(X_\S+|Padding)`) | ||
78 | b = removeFieldsRegex.ReplaceAll(b, []byte("_")) | ||
79 | |||
80 | // Remove the first line of warning from cgo | ||
81 | b = b[bytes.IndexByte(b, '\n')+1:] | ||
82 | // Modify the command in the header to include: | ||
83 | // mkpost, our own warning, and a build tag. | ||
84 | replacement := fmt.Sprintf(`$1 | go run mkpost.go | ||
85 | // Code generated by the command above; see README.md. DO NOT EDIT. | ||
86 | |||
87 | // +build %s,%s`, goarch, goos) | ||
88 | cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`) | ||
89 | b = cgoCommandRegex.ReplaceAll(b, []byte(replacement)) | ||
90 | |||
91 | // gofmt | ||
92 | b, err = format.Source(b) | ||
93 | if err != nil { | ||
94 | log.Fatal(err) | ||
95 | } | ||
96 | |||
97 | os.Stdout.Write(b) | ||
98 | } | ||
diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl index 1f6b926..1f6b926 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksyscall.pl +++ b/vendor/golang.org/x/sys/unix/mksyscall.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl b/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl index 3e6ed9d..3e6ed9d 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl +++ b/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl b/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl index 20632e1..20632e1 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl +++ b/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl b/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl index 5453c53..5453c53 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl +++ b/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl b/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl index 6804f41..6804f41 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl +++ b/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl index 198993d..198993d 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl +++ b/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl index 85988b1..85988b1 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl +++ b/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl index 84edf60..84edf60 100755..100644 --- a/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl +++ b/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl | |||
diff --git a/vendor/golang.org/x/sys/unix/types_aix.go b/vendor/golang.org/x/sys/unix/types_aix.go new file mode 100644 index 0000000..25e8349 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_aix.go | |||
@@ -0,0 +1,236 @@ | |||
1 | // Copyright 2018 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | // +build aix | ||
7 | |||
8 | /* | ||
9 | Input to cgo -godefs. See also mkerrors.sh and mkall.sh | ||
10 | */ | ||
11 | |||
12 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
13 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
14 | |||
15 | package unix | ||
16 | |||
17 | /* | ||
18 | #include <sys/types.h> | ||
19 | #include <sys/time.h> | ||
20 | #include <sys/limits.h> | ||
21 | #include <sys/un.h> | ||
22 | #include <utime.h> | ||
23 | #include <sys/utsname.h> | ||
24 | #include <sys/poll.h> | ||
25 | #include <sys/resource.h> | ||
26 | #include <sys/stat.h> | ||
27 | #include <sys/statfs.h> | ||
28 | #include <sys/termio.h> | ||
29 | #include <sys/ioctl.h> | ||
30 | |||
31 | #include <termios.h> | ||
32 | |||
33 | #include <net/if.h> | ||
34 | #include <net/if_dl.h> | ||
35 | #include <netinet/in.h> | ||
36 | #include <netinet/icmp6.h> | ||
37 | |||
38 | |||
39 | #include <dirent.h> | ||
40 | #include <fcntl.h> | ||
41 | |||
42 | enum { | ||
43 | sizeofPtr = sizeof(void*), | ||
44 | }; | ||
45 | |||
46 | union sockaddr_all { | ||
47 | struct sockaddr s1; // this one gets used for fields | ||
48 | struct sockaddr_in s2; // these pad it out | ||
49 | struct sockaddr_in6 s3; | ||
50 | struct sockaddr_un s4; | ||
51 | struct sockaddr_dl s5; | ||
52 | }; | ||
53 | |||
54 | struct sockaddr_any { | ||
55 | struct sockaddr addr; | ||
56 | char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; | ||
57 | }; | ||
58 | |||
59 | */ | ||
60 | import "C" | ||
61 | |||
62 | // Machine characteristics | ||
63 | |||
64 | const ( | ||
65 | SizeofPtr = C.sizeofPtr | ||
66 | SizeofShort = C.sizeof_short | ||
67 | SizeofInt = C.sizeof_int | ||
68 | SizeofLong = C.sizeof_long | ||
69 | SizeofLongLong = C.sizeof_longlong | ||
70 | PathMax = C.PATH_MAX | ||
71 | ) | ||
72 | |||
73 | // Basic types | ||
74 | |||
75 | type ( | ||
76 | _C_short C.short | ||
77 | _C_int C.int | ||
78 | _C_long C.long | ||
79 | _C_long_long C.longlong | ||
80 | ) | ||
81 | |||
82 | type off64 C.off64_t | ||
83 | type off C.off_t | ||
84 | type Mode_t C.mode_t | ||
85 | |||
86 | // Time | ||
87 | |||
88 | type Timespec C.struct_timespec | ||
89 | |||
90 | type StTimespec C.struct_st_timespec | ||
91 | |||
92 | type Timeval C.struct_timeval | ||
93 | |||
94 | type Timeval32 C.struct_timeval32 | ||
95 | |||
96 | type Timex C.struct_timex | ||
97 | |||
98 | type Time_t C.time_t | ||
99 | |||
100 | type Tms C.struct_tms | ||
101 | |||
102 | type Utimbuf C.struct_utimbuf | ||
103 | |||
104 | type Timezone C.struct_timezone | ||
105 | |||
106 | // Processes | ||
107 | |||
108 | type Rusage C.struct_rusage | ||
109 | |||
110 | type Rlimit C.struct_rlimit64 | ||
111 | |||
112 | type Pid_t C.pid_t | ||
113 | |||
114 | type _Gid_t C.gid_t | ||
115 | |||
116 | type dev_t C.dev_t | ||
117 | |||
118 | // Files | ||
119 | |||
120 | type Stat_t C.struct_stat | ||
121 | |||
122 | type StatxTimestamp C.struct_statx_timestamp | ||
123 | |||
124 | type Statx_t C.struct_statx | ||
125 | |||
126 | type Dirent C.struct_dirent | ||
127 | |||
128 | // Sockets | ||
129 | |||
130 | type RawSockaddrInet4 C.struct_sockaddr_in | ||
131 | |||
132 | type RawSockaddrInet6 C.struct_sockaddr_in6 | ||
133 | |||
134 | type RawSockaddrUnix C.struct_sockaddr_un | ||
135 | |||
136 | type RawSockaddr C.struct_sockaddr | ||
137 | |||
138 | type RawSockaddrAny C.struct_sockaddr_any | ||
139 | |||
140 | type _Socklen C.socklen_t | ||
141 | |||
142 | type Cmsghdr C.struct_cmsghdr | ||
143 | |||
144 | type ICMPv6Filter C.struct_icmp6_filter | ||
145 | |||
146 | type Iovec C.struct_iovec | ||
147 | |||
148 | type IPMreq C.struct_ip_mreq | ||
149 | |||
150 | type IPv6Mreq C.struct_ipv6_mreq | ||
151 | |||
152 | type IPv6MTUInfo C.struct_ip6_mtuinfo | ||
153 | |||
154 | type Linger C.struct_linger | ||
155 | |||
156 | type Msghdr C.struct_msghdr | ||
157 | |||
158 | const ( | ||
159 | SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in | ||
160 | SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
161 | SizeofSockaddrAny = C.sizeof_struct_sockaddr_any | ||
162 | SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un | ||
163 | SizeofLinger = C.sizeof_struct_linger | ||
164 | SizeofIPMreq = C.sizeof_struct_ip_mreq | ||
165 | SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq | ||
166 | SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo | ||
167 | SizeofMsghdr = C.sizeof_struct_msghdr | ||
168 | SizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
169 | SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter | ||
170 | ) | ||
171 | |||
172 | // Routing and interface messages | ||
173 | |||
174 | const ( | ||
175 | SizeofIfMsghdr = C.sizeof_struct_if_msghdr | ||
176 | ) | ||
177 | |||
178 | type IfMsgHdr C.struct_if_msghdr | ||
179 | |||
180 | // Misc | ||
181 | |||
182 | type FdSet C.fd_set | ||
183 | |||
184 | type Utsname C.struct_utsname | ||
185 | |||
186 | type Ustat_t C.struct_ustat | ||
187 | |||
188 | type Sigset_t C.sigset_t | ||
189 | |||
190 | const ( | ||
191 | AT_FDCWD = C.AT_FDCWD | ||
192 | AT_REMOVEDIR = C.AT_REMOVEDIR | ||
193 | AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW | ||
194 | ) | ||
195 | |||
196 | // Terminal handling | ||
197 | |||
198 | type Termios C.struct_termios | ||
199 | |||
200 | type Termio C.struct_termio | ||
201 | |||
202 | type Winsize C.struct_winsize | ||
203 | |||
204 | //poll | ||
205 | |||
206 | type PollFd struct { | ||
207 | Fd int32 | ||
208 | Events uint16 | ||
209 | Revents uint16 | ||
210 | } | ||
211 | |||
212 | const ( | ||
213 | POLLERR = C.POLLERR | ||
214 | POLLHUP = C.POLLHUP | ||
215 | POLLIN = C.POLLIN | ||
216 | POLLNVAL = C.POLLNVAL | ||
217 | POLLOUT = C.POLLOUT | ||
218 | POLLPRI = C.POLLPRI | ||
219 | POLLRDBAND = C.POLLRDBAND | ||
220 | POLLRDNORM = C.POLLRDNORM | ||
221 | POLLWRBAND = C.POLLWRBAND | ||
222 | POLLWRNORM = C.POLLWRNORM | ||
223 | ) | ||
224 | |||
225 | //flock_t | ||
226 | |||
227 | type Flock_t C.struct_flock64 | ||
228 | |||
229 | // Statfs | ||
230 | |||
231 | type Fsid_t C.struct_fsid_t | ||
232 | type Fsid64_t C.struct_fsid64_t | ||
233 | |||
234 | type Statfs_t C.struct_statfs | ||
235 | |||
236 | const RNDGETENTCNT = 0x80045200 | ||
diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go new file mode 100644 index 0000000..9fd2aaa --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_darwin.go | |||
@@ -0,0 +1,277 @@ | |||
1 | // Copyright 2009 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | /* | ||
8 | Input to cgo -godefs. See README.md | ||
9 | */ | ||
10 | |||
11 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
12 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
13 | |||
14 | package unix | ||
15 | |||
16 | /* | ||
17 | #define __DARWIN_UNIX03 0 | ||
18 | #define KERNEL | ||
19 | #define _DARWIN_USE_64_BIT_INODE | ||
20 | #include <dirent.h> | ||
21 | #include <fcntl.h> | ||
22 | #include <poll.h> | ||
23 | #include <signal.h> | ||
24 | #include <termios.h> | ||
25 | #include <unistd.h> | ||
26 | #include <mach/mach.h> | ||
27 | #include <mach/message.h> | ||
28 | #include <sys/event.h> | ||
29 | #include <sys/mman.h> | ||
30 | #include <sys/mount.h> | ||
31 | #include <sys/param.h> | ||
32 | #include <sys/ptrace.h> | ||
33 | #include <sys/resource.h> | ||
34 | #include <sys/select.h> | ||
35 | #include <sys/signal.h> | ||
36 | #include <sys/socket.h> | ||
37 | #include <sys/stat.h> | ||
38 | #include <sys/time.h> | ||
39 | #include <sys/types.h> | ||
40 | #include <sys/uio.h> | ||
41 | #include <sys/un.h> | ||
42 | #include <sys/utsname.h> | ||
43 | #include <sys/wait.h> | ||
44 | #include <net/bpf.h> | ||
45 | #include <net/if.h> | ||
46 | #include <net/if_dl.h> | ||
47 | #include <net/if_var.h> | ||
48 | #include <net/route.h> | ||
49 | #include <netinet/in.h> | ||
50 | #include <netinet/icmp6.h> | ||
51 | #include <netinet/tcp.h> | ||
52 | |||
53 | enum { | ||
54 | sizeofPtr = sizeof(void*), | ||
55 | }; | ||
56 | |||
57 | union sockaddr_all { | ||
58 | struct sockaddr s1; // this one gets used for fields | ||
59 | struct sockaddr_in s2; // these pad it out | ||
60 | struct sockaddr_in6 s3; | ||
61 | struct sockaddr_un s4; | ||
62 | struct sockaddr_dl s5; | ||
63 | }; | ||
64 | |||
65 | struct sockaddr_any { | ||
66 | struct sockaddr addr; | ||
67 | char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; | ||
68 | }; | ||
69 | |||
70 | */ | ||
71 | import "C" | ||
72 | |||
73 | // Machine characteristics | ||
74 | |||
75 | const ( | ||
76 | SizeofPtr = C.sizeofPtr | ||
77 | SizeofShort = C.sizeof_short | ||
78 | SizeofInt = C.sizeof_int | ||
79 | SizeofLong = C.sizeof_long | ||
80 | SizeofLongLong = C.sizeof_longlong | ||
81 | ) | ||
82 | |||
83 | // Basic types | ||
84 | |||
85 | type ( | ||
86 | _C_short C.short | ||
87 | _C_int C.int | ||
88 | _C_long C.long | ||
89 | _C_long_long C.longlong | ||
90 | ) | ||
91 | |||
92 | // Time | ||
93 | |||
94 | type Timespec C.struct_timespec | ||
95 | |||
96 | type Timeval C.struct_timeval | ||
97 | |||
98 | type Timeval32 C.struct_timeval32 | ||
99 | |||
100 | // Processes | ||
101 | |||
102 | type Rusage C.struct_rusage | ||
103 | |||
104 | type Rlimit C.struct_rlimit | ||
105 | |||
106 | type _Gid_t C.gid_t | ||
107 | |||
108 | // Files | ||
109 | |||
110 | type Stat_t C.struct_stat64 | ||
111 | |||
112 | type Statfs_t C.struct_statfs64 | ||
113 | |||
114 | type Flock_t C.struct_flock | ||
115 | |||
116 | type Fstore_t C.struct_fstore | ||
117 | |||
118 | type Radvisory_t C.struct_radvisory | ||
119 | |||
120 | type Fbootstraptransfer_t C.struct_fbootstraptransfer | ||
121 | |||
122 | type Log2phys_t C.struct_log2phys | ||
123 | |||
124 | type Fsid C.struct_fsid | ||
125 | |||
126 | type Dirent C.struct_dirent | ||
127 | |||
128 | // Sockets | ||
129 | |||
130 | type RawSockaddrInet4 C.struct_sockaddr_in | ||
131 | |||
132 | type RawSockaddrInet6 C.struct_sockaddr_in6 | ||
133 | |||
134 | type RawSockaddrUnix C.struct_sockaddr_un | ||
135 | |||
136 | type RawSockaddrDatalink C.struct_sockaddr_dl | ||
137 | |||
138 | type RawSockaddr C.struct_sockaddr | ||
139 | |||
140 | type RawSockaddrAny C.struct_sockaddr_any | ||
141 | |||
142 | type _Socklen C.socklen_t | ||
143 | |||
144 | type Linger C.struct_linger | ||
145 | |||
146 | type Iovec C.struct_iovec | ||
147 | |||
148 | type IPMreq C.struct_ip_mreq | ||
149 | |||
150 | type IPv6Mreq C.struct_ipv6_mreq | ||
151 | |||
152 | type Msghdr C.struct_msghdr | ||
153 | |||
154 | type Cmsghdr C.struct_cmsghdr | ||
155 | |||
156 | type Inet4Pktinfo C.struct_in_pktinfo | ||
157 | |||
158 | type Inet6Pktinfo C.struct_in6_pktinfo | ||
159 | |||
160 | type IPv6MTUInfo C.struct_ip6_mtuinfo | ||
161 | |||
162 | type ICMPv6Filter C.struct_icmp6_filter | ||
163 | |||
164 | const ( | ||
165 | SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in | ||
166 | SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
167 | SizeofSockaddrAny = C.sizeof_struct_sockaddr_any | ||
168 | SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un | ||
169 | SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl | ||
170 | SizeofLinger = C.sizeof_struct_linger | ||
171 | SizeofIPMreq = C.sizeof_struct_ip_mreq | ||
172 | SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq | ||
173 | SizeofMsghdr = C.sizeof_struct_msghdr | ||
174 | SizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
175 | SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo | ||
176 | SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo | ||
177 | SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo | ||
178 | SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter | ||
179 | ) | ||
180 | |||
181 | // Ptrace requests | ||
182 | |||
183 | const ( | ||
184 | PTRACE_TRACEME = C.PT_TRACE_ME | ||
185 | PTRACE_CONT = C.PT_CONTINUE | ||
186 | PTRACE_KILL = C.PT_KILL | ||
187 | ) | ||
188 | |||
189 | // Events (kqueue, kevent) | ||
190 | |||
191 | type Kevent_t C.struct_kevent | ||
192 | |||
193 | // Select | ||
194 | |||
195 | type FdSet C.fd_set | ||
196 | |||
197 | // Routing and interface messages | ||
198 | |||
199 | const ( | ||
200 | SizeofIfMsghdr = C.sizeof_struct_if_msghdr | ||
201 | SizeofIfData = C.sizeof_struct_if_data | ||
202 | SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr | ||
203 | SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr | ||
204 | SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2 | ||
205 | SizeofRtMsghdr = C.sizeof_struct_rt_msghdr | ||
206 | SizeofRtMetrics = C.sizeof_struct_rt_metrics | ||
207 | ) | ||
208 | |||
209 | type IfMsghdr C.struct_if_msghdr | ||
210 | |||
211 | type IfData C.struct_if_data | ||
212 | |||
213 | type IfaMsghdr C.struct_ifa_msghdr | ||
214 | |||
215 | type IfmaMsghdr C.struct_ifma_msghdr | ||
216 | |||
217 | type IfmaMsghdr2 C.struct_ifma_msghdr2 | ||
218 | |||
219 | type RtMsghdr C.struct_rt_msghdr | ||
220 | |||
221 | type RtMetrics C.struct_rt_metrics | ||
222 | |||
223 | // Berkeley packet filter | ||
224 | |||
225 | const ( | ||
226 | SizeofBpfVersion = C.sizeof_struct_bpf_version | ||
227 | SizeofBpfStat = C.sizeof_struct_bpf_stat | ||
228 | SizeofBpfProgram = C.sizeof_struct_bpf_program | ||
229 | SizeofBpfInsn = C.sizeof_struct_bpf_insn | ||
230 | SizeofBpfHdr = C.sizeof_struct_bpf_hdr | ||
231 | ) | ||
232 | |||
233 | type BpfVersion C.struct_bpf_version | ||
234 | |||
235 | type BpfStat C.struct_bpf_stat | ||
236 | |||
237 | type BpfProgram C.struct_bpf_program | ||
238 | |||
239 | type BpfInsn C.struct_bpf_insn | ||
240 | |||
241 | type BpfHdr C.struct_bpf_hdr | ||
242 | |||
243 | // Terminal handling | ||
244 | |||
245 | type Termios C.struct_termios | ||
246 | |||
247 | type Winsize C.struct_winsize | ||
248 | |||
249 | // fchmodat-like syscalls. | ||
250 | |||
251 | const ( | ||
252 | AT_FDCWD = C.AT_FDCWD | ||
253 | AT_REMOVEDIR = C.AT_REMOVEDIR | ||
254 | AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW | ||
255 | AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW | ||
256 | ) | ||
257 | |||
258 | // poll | ||
259 | |||
260 | type PollFd C.struct_pollfd | ||
261 | |||
262 | const ( | ||
263 | POLLERR = C.POLLERR | ||
264 | POLLHUP = C.POLLHUP | ||
265 | POLLIN = C.POLLIN | ||
266 | POLLNVAL = C.POLLNVAL | ||
267 | POLLOUT = C.POLLOUT | ||
268 | POLLPRI = C.POLLPRI | ||
269 | POLLRDBAND = C.POLLRDBAND | ||
270 | POLLRDNORM = C.POLLRDNORM | ||
271 | POLLWRBAND = C.POLLWRBAND | ||
272 | POLLWRNORM = C.POLLWRNORM | ||
273 | ) | ||
274 | |||
275 | // uname | ||
276 | |||
277 | type Utsname C.struct_utsname | ||
diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go new file mode 100644 index 0000000..3365dd7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go | |||
@@ -0,0 +1,263 @@ | |||
1 | // Copyright 2009 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | /* | ||
8 | Input to cgo -godefs. See README.md | ||
9 | */ | ||
10 | |||
11 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
12 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
13 | |||
14 | package unix | ||
15 | |||
16 | /* | ||
17 | #define KERNEL | ||
18 | #include <dirent.h> | ||
19 | #include <fcntl.h> | ||
20 | #include <poll.h> | ||
21 | #include <signal.h> | ||
22 | #include <termios.h> | ||
23 | #include <stdio.h> | ||
24 | #include <unistd.h> | ||
25 | #include <sys/event.h> | ||
26 | #include <sys/mman.h> | ||
27 | #include <sys/mount.h> | ||
28 | #include <sys/param.h> | ||
29 | #include <sys/ptrace.h> | ||
30 | #include <sys/resource.h> | ||
31 | #include <sys/select.h> | ||
32 | #include <sys/signal.h> | ||
33 | #include <sys/socket.h> | ||
34 | #include <sys/stat.h> | ||
35 | #include <sys/time.h> | ||
36 | #include <sys/types.h> | ||
37 | #include <sys/un.h> | ||
38 | #include <sys/utsname.h> | ||
39 | #include <sys/wait.h> | ||
40 | #include <net/bpf.h> | ||
41 | #include <net/if.h> | ||
42 | #include <net/if_dl.h> | ||
43 | #include <net/route.h> | ||
44 | #include <netinet/in.h> | ||
45 | #include <netinet/icmp6.h> | ||
46 | #include <netinet/tcp.h> | ||
47 | |||
48 | enum { | ||
49 | sizeofPtr = sizeof(void*), | ||
50 | }; | ||
51 | |||
52 | union sockaddr_all { | ||
53 | struct sockaddr s1; // this one gets used for fields | ||
54 | struct sockaddr_in s2; // these pad it out | ||
55 | struct sockaddr_in6 s3; | ||
56 | struct sockaddr_un s4; | ||
57 | struct sockaddr_dl s5; | ||
58 | }; | ||
59 | |||
60 | struct sockaddr_any { | ||
61 | struct sockaddr addr; | ||
62 | char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; | ||
63 | }; | ||
64 | |||
65 | */ | ||
66 | import "C" | ||
67 | |||
68 | // Machine characteristics | ||
69 | |||
70 | const ( | ||
71 | SizeofPtr = C.sizeofPtr | ||
72 | SizeofShort = C.sizeof_short | ||
73 | SizeofInt = C.sizeof_int | ||
74 | SizeofLong = C.sizeof_long | ||
75 | SizeofLongLong = C.sizeof_longlong | ||
76 | ) | ||
77 | |||
78 | // Basic types | ||
79 | |||
80 | type ( | ||
81 | _C_short C.short | ||
82 | _C_int C.int | ||
83 | _C_long C.long | ||
84 | _C_long_long C.longlong | ||
85 | ) | ||
86 | |||
87 | // Time | ||
88 | |||
89 | type Timespec C.struct_timespec | ||
90 | |||
91 | type Timeval C.struct_timeval | ||
92 | |||
93 | // Processes | ||
94 | |||
95 | type Rusage C.struct_rusage | ||
96 | |||
97 | type Rlimit C.struct_rlimit | ||
98 | |||
99 | type _Gid_t C.gid_t | ||
100 | |||
101 | // Files | ||
102 | |||
103 | type Stat_t C.struct_stat | ||
104 | |||
105 | type Statfs_t C.struct_statfs | ||
106 | |||
107 | type Flock_t C.struct_flock | ||
108 | |||
109 | type Dirent C.struct_dirent | ||
110 | |||
111 | type Fsid C.struct_fsid | ||
112 | |||
113 | // File system limits | ||
114 | |||
115 | const ( | ||
116 | PathMax = C.PATH_MAX | ||
117 | ) | ||
118 | |||
119 | // Sockets | ||
120 | |||
121 | type RawSockaddrInet4 C.struct_sockaddr_in | ||
122 | |||
123 | type RawSockaddrInet6 C.struct_sockaddr_in6 | ||
124 | |||
125 | type RawSockaddrUnix C.struct_sockaddr_un | ||
126 | |||
127 | type RawSockaddrDatalink C.struct_sockaddr_dl | ||
128 | |||
129 | type RawSockaddr C.struct_sockaddr | ||
130 | |||
131 | type RawSockaddrAny C.struct_sockaddr_any | ||
132 | |||
133 | type _Socklen C.socklen_t | ||
134 | |||
135 | type Linger C.struct_linger | ||
136 | |||
137 | type Iovec C.struct_iovec | ||
138 | |||
139 | type IPMreq C.struct_ip_mreq | ||
140 | |||
141 | type IPv6Mreq C.struct_ipv6_mreq | ||
142 | |||
143 | type Msghdr C.struct_msghdr | ||
144 | |||
145 | type Cmsghdr C.struct_cmsghdr | ||
146 | |||
147 | type Inet6Pktinfo C.struct_in6_pktinfo | ||
148 | |||
149 | type IPv6MTUInfo C.struct_ip6_mtuinfo | ||
150 | |||
151 | type ICMPv6Filter C.struct_icmp6_filter | ||
152 | |||
153 | const ( | ||
154 | SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in | ||
155 | SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
156 | SizeofSockaddrAny = C.sizeof_struct_sockaddr_any | ||
157 | SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un | ||
158 | SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl | ||
159 | SizeofLinger = C.sizeof_struct_linger | ||
160 | SizeofIPMreq = C.sizeof_struct_ip_mreq | ||
161 | SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq | ||
162 | SizeofMsghdr = C.sizeof_struct_msghdr | ||
163 | SizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
164 | SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo | ||
165 | SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo | ||
166 | SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter | ||
167 | ) | ||
168 | |||
169 | // Ptrace requests | ||
170 | |||
171 | const ( | ||
172 | PTRACE_TRACEME = C.PT_TRACE_ME | ||
173 | PTRACE_CONT = C.PT_CONTINUE | ||
174 | PTRACE_KILL = C.PT_KILL | ||
175 | ) | ||
176 | |||
177 | // Events (kqueue, kevent) | ||
178 | |||
179 | type Kevent_t C.struct_kevent | ||
180 | |||
181 | // Select | ||
182 | |||
183 | type FdSet C.fd_set | ||
184 | |||
185 | // Routing and interface messages | ||
186 | |||
187 | const ( | ||
188 | SizeofIfMsghdr = C.sizeof_struct_if_msghdr | ||
189 | SizeofIfData = C.sizeof_struct_if_data | ||
190 | SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr | ||
191 | SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr | ||
192 | SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr | ||
193 | SizeofRtMsghdr = C.sizeof_struct_rt_msghdr | ||
194 | SizeofRtMetrics = C.sizeof_struct_rt_metrics | ||
195 | ) | ||
196 | |||
197 | type IfMsghdr C.struct_if_msghdr | ||
198 | |||
199 | type IfData C.struct_if_data | ||
200 | |||
201 | type IfaMsghdr C.struct_ifa_msghdr | ||
202 | |||
203 | type IfmaMsghdr C.struct_ifma_msghdr | ||
204 | |||
205 | type IfAnnounceMsghdr C.struct_if_announcemsghdr | ||
206 | |||
207 | type RtMsghdr C.struct_rt_msghdr | ||
208 | |||
209 | type RtMetrics C.struct_rt_metrics | ||
210 | |||
211 | // Berkeley packet filter | ||
212 | |||
213 | const ( | ||
214 | SizeofBpfVersion = C.sizeof_struct_bpf_version | ||
215 | SizeofBpfStat = C.sizeof_struct_bpf_stat | ||
216 | SizeofBpfProgram = C.sizeof_struct_bpf_program | ||
217 | SizeofBpfInsn = C.sizeof_struct_bpf_insn | ||
218 | SizeofBpfHdr = C.sizeof_struct_bpf_hdr | ||
219 | ) | ||
220 | |||
221 | type BpfVersion C.struct_bpf_version | ||
222 | |||
223 | type BpfStat C.struct_bpf_stat | ||
224 | |||
225 | type BpfProgram C.struct_bpf_program | ||
226 | |||
227 | type BpfInsn C.struct_bpf_insn | ||
228 | |||
229 | type BpfHdr C.struct_bpf_hdr | ||
230 | |||
231 | // Terminal handling | ||
232 | |||
233 | type Termios C.struct_termios | ||
234 | |||
235 | type Winsize C.struct_winsize | ||
236 | |||
237 | // fchmodat-like syscalls. | ||
238 | |||
239 | const ( | ||
240 | AT_FDCWD = C.AT_FDCWD | ||
241 | AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW | ||
242 | ) | ||
243 | |||
244 | // poll | ||
245 | |||
246 | type PollFd C.struct_pollfd | ||
247 | |||
248 | const ( | ||
249 | POLLERR = C.POLLERR | ||
250 | POLLHUP = C.POLLHUP | ||
251 | POLLIN = C.POLLIN | ||
252 | POLLNVAL = C.POLLNVAL | ||
253 | POLLOUT = C.POLLOUT | ||
254 | POLLPRI = C.POLLPRI | ||
255 | POLLRDBAND = C.POLLRDBAND | ||
256 | POLLRDNORM = C.POLLRDNORM | ||
257 | POLLWRBAND = C.POLLWRBAND | ||
258 | POLLWRNORM = C.POLLWRNORM | ||
259 | ) | ||
260 | |||
261 | // Uname | ||
262 | |||
263 | type Utsname C.struct_utsname | ||
diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go new file mode 100644 index 0000000..a0a5843 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_freebsd.go | |||
@@ -0,0 +1,385 @@ | |||
1 | // Copyright 2009 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | /* | ||
8 | Input to cgo -godefs. See README.md | ||
9 | */ | ||
10 | |||
11 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
12 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
13 | |||
14 | package unix | ||
15 | |||
16 | /* | ||
17 | #define KERNEL | ||
18 | #include <dirent.h> | ||
19 | #include <fcntl.h> | ||
20 | #include <poll.h> | ||
21 | #include <signal.h> | ||
22 | #include <termios.h> | ||
23 | #include <stdio.h> | ||
24 | #include <unistd.h> | ||
25 | #include <sys/capability.h> | ||
26 | #include <sys/event.h> | ||
27 | #include <sys/mman.h> | ||
28 | #include <sys/mount.h> | ||
29 | #include <sys/param.h> | ||
30 | #include <sys/ptrace.h> | ||
31 | #include <sys/resource.h> | ||
32 | #include <sys/select.h> | ||
33 | #include <sys/signal.h> | ||
34 | #include <sys/socket.h> | ||
35 | #include <sys/stat.h> | ||
36 | #include <sys/time.h> | ||
37 | #include <sys/types.h> | ||
38 | #include <sys/un.h> | ||
39 | #include <sys/utsname.h> | ||
40 | #include <sys/wait.h> | ||
41 | #include <net/bpf.h> | ||
42 | #include <net/if.h> | ||
43 | #include <net/if_dl.h> | ||
44 | #include <net/route.h> | ||
45 | #include <netinet/in.h> | ||
46 | #include <netinet/icmp6.h> | ||
47 | #include <netinet/tcp.h> | ||
48 | |||
49 | enum { | ||
50 | sizeofPtr = sizeof(void*), | ||
51 | }; | ||
52 | |||
53 | union sockaddr_all { | ||
54 | struct sockaddr s1; // this one gets used for fields | ||
55 | struct sockaddr_in s2; // these pad it out | ||
56 | struct sockaddr_in6 s3; | ||
57 | struct sockaddr_un s4; | ||
58 | struct sockaddr_dl s5; | ||
59 | }; | ||
60 | |||
61 | struct sockaddr_any { | ||
62 | struct sockaddr addr; | ||
63 | char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; | ||
64 | }; | ||
65 | |||
66 | // This structure is a duplicate of stat on FreeBSD 8-STABLE. | ||
67 | // See /usr/include/sys/stat.h. | ||
68 | struct stat8 { | ||
69 | #undef st_atimespec st_atim | ||
70 | #undef st_mtimespec st_mtim | ||
71 | #undef st_ctimespec st_ctim | ||
72 | #undef st_birthtimespec st_birthtim | ||
73 | __dev_t st_dev; | ||
74 | ino_t st_ino; | ||
75 | mode_t st_mode; | ||
76 | nlink_t st_nlink; | ||
77 | uid_t st_uid; | ||
78 | gid_t st_gid; | ||
79 | __dev_t st_rdev; | ||
80 | #if __BSD_VISIBLE | ||
81 | struct timespec st_atimespec; | ||
82 | struct timespec st_mtimespec; | ||
83 | struct timespec st_ctimespec; | ||
84 | #else | ||
85 | time_t st_atime; | ||
86 | long __st_atimensec; | ||
87 | time_t st_mtime; | ||
88 | long __st_mtimensec; | ||
89 | time_t st_ctime; | ||
90 | long __st_ctimensec; | ||
91 | #endif | ||
92 | off_t st_size; | ||
93 | blkcnt_t st_blocks; | ||
94 | blksize_t st_blksize; | ||
95 | fflags_t st_flags; | ||
96 | __uint32_t st_gen; | ||
97 | __int32_t st_lspare; | ||
98 | #if __BSD_VISIBLE | ||
99 | struct timespec st_birthtimespec; | ||
100 | unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); | ||
101 | unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); | ||
102 | #else | ||
103 | time_t st_birthtime; | ||
104 | long st_birthtimensec; | ||
105 | unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); | ||
106 | unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); | ||
107 | #endif | ||
108 | }; | ||
109 | |||
110 | // This structure is a duplicate of if_data on FreeBSD 8-STABLE. | ||
111 | // See /usr/include/net/if.h. | ||
112 | struct if_data8 { | ||
113 | u_char ifi_type; | ||
114 | u_char ifi_physical; | ||
115 | u_char ifi_addrlen; | ||
116 | u_char ifi_hdrlen; | ||
117 | u_char ifi_link_state; | ||
118 | u_char ifi_spare_char1; | ||
119 | u_char ifi_spare_char2; | ||
120 | u_char ifi_datalen; | ||
121 | u_long ifi_mtu; | ||
122 | u_long ifi_metric; | ||
123 | u_long ifi_baudrate; | ||
124 | u_long ifi_ipackets; | ||
125 | u_long ifi_ierrors; | ||
126 | u_long ifi_opackets; | ||
127 | u_long ifi_oerrors; | ||
128 | u_long ifi_collisions; | ||
129 | u_long ifi_ibytes; | ||
130 | u_long ifi_obytes; | ||
131 | u_long ifi_imcasts; | ||
132 | u_long ifi_omcasts; | ||
133 | u_long ifi_iqdrops; | ||
134 | u_long ifi_noproto; | ||
135 | u_long ifi_hwassist; | ||
136 | // FIXME: these are now unions, so maybe need to change definitions? | ||
137 | #undef ifi_epoch | ||
138 | time_t ifi_epoch; | ||
139 | #undef ifi_lastchange | ||
140 | struct timeval ifi_lastchange; | ||
141 | }; | ||
142 | |||
143 | // This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE. | ||
144 | // See /usr/include/net/if.h. | ||
145 | struct if_msghdr8 { | ||
146 | u_short ifm_msglen; | ||
147 | u_char ifm_version; | ||
148 | u_char ifm_type; | ||
149 | int ifm_addrs; | ||
150 | int ifm_flags; | ||
151 | u_short ifm_index; | ||
152 | struct if_data8 ifm_data; | ||
153 | }; | ||
154 | */ | ||
155 | import "C" | ||
156 | |||
157 | // Machine characteristics | ||
158 | |||
159 | const ( | ||
160 | SizeofPtr = C.sizeofPtr | ||
161 | SizeofShort = C.sizeof_short | ||
162 | SizeofInt = C.sizeof_int | ||
163 | SizeofLong = C.sizeof_long | ||
164 | SizeofLongLong = C.sizeof_longlong | ||
165 | ) | ||
166 | |||
167 | // Basic types | ||
168 | |||
169 | type ( | ||
170 | _C_short C.short | ||
171 | _C_int C.int | ||
172 | _C_long C.long | ||
173 | _C_long_long C.longlong | ||
174 | ) | ||
175 | |||
176 | // Time | ||
177 | |||
178 | type Timespec C.struct_timespec | ||
179 | |||
180 | type Timeval C.struct_timeval | ||
181 | |||
182 | // Processes | ||
183 | |||
184 | type Rusage C.struct_rusage | ||
185 | |||
186 | type Rlimit C.struct_rlimit | ||
187 | |||
188 | type _Gid_t C.gid_t | ||
189 | |||
190 | // Files | ||
191 | |||
192 | type Stat_t C.struct_stat8 | ||
193 | |||
194 | type Statfs_t C.struct_statfs | ||
195 | |||
196 | type Flock_t C.struct_flock | ||
197 | |||
198 | type Dirent C.struct_dirent | ||
199 | |||
200 | type Fsid C.struct_fsid | ||
201 | |||
202 | // File system limits | ||
203 | |||
204 | const ( | ||
205 | PathMax = C.PATH_MAX | ||
206 | ) | ||
207 | |||
208 | // Advice to Fadvise | ||
209 | |||
210 | const ( | ||
211 | FADV_NORMAL = C.POSIX_FADV_NORMAL | ||
212 | FADV_RANDOM = C.POSIX_FADV_RANDOM | ||
213 | FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL | ||
214 | FADV_WILLNEED = C.POSIX_FADV_WILLNEED | ||
215 | FADV_DONTNEED = C.POSIX_FADV_DONTNEED | ||
216 | FADV_NOREUSE = C.POSIX_FADV_NOREUSE | ||
217 | ) | ||
218 | |||
219 | // Sockets | ||
220 | |||
221 | type RawSockaddrInet4 C.struct_sockaddr_in | ||
222 | |||
223 | type RawSockaddrInet6 C.struct_sockaddr_in6 | ||
224 | |||
225 | type RawSockaddrUnix C.struct_sockaddr_un | ||
226 | |||
227 | type RawSockaddrDatalink C.struct_sockaddr_dl | ||
228 | |||
229 | type RawSockaddr C.struct_sockaddr | ||
230 | |||
231 | type RawSockaddrAny C.struct_sockaddr_any | ||
232 | |||
233 | type _Socklen C.socklen_t | ||
234 | |||
235 | type Linger C.struct_linger | ||
236 | |||
237 | type Iovec C.struct_iovec | ||
238 | |||
239 | type IPMreq C.struct_ip_mreq | ||
240 | |||
241 | type IPMreqn C.struct_ip_mreqn | ||
242 | |||
243 | type IPv6Mreq C.struct_ipv6_mreq | ||
244 | |||
245 | type Msghdr C.struct_msghdr | ||
246 | |||
247 | type Cmsghdr C.struct_cmsghdr | ||
248 | |||
249 | type Inet6Pktinfo C.struct_in6_pktinfo | ||
250 | |||
251 | type IPv6MTUInfo C.struct_ip6_mtuinfo | ||
252 | |||
253 | type ICMPv6Filter C.struct_icmp6_filter | ||
254 | |||
255 | const ( | ||
256 | SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in | ||
257 | SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
258 | SizeofSockaddrAny = C.sizeof_struct_sockaddr_any | ||
259 | SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un | ||
260 | SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl | ||
261 | SizeofLinger = C.sizeof_struct_linger | ||
262 | SizeofIPMreq = C.sizeof_struct_ip_mreq | ||
263 | SizeofIPMreqn = C.sizeof_struct_ip_mreqn | ||
264 | SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq | ||
265 | SizeofMsghdr = C.sizeof_struct_msghdr | ||
266 | SizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
267 | SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo | ||
268 | SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo | ||
269 | SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter | ||
270 | ) | ||
271 | |||
272 | // Ptrace requests | ||
273 | |||
274 | const ( | ||
275 | PTRACE_TRACEME = C.PT_TRACE_ME | ||
276 | PTRACE_CONT = C.PT_CONTINUE | ||
277 | PTRACE_KILL = C.PT_KILL | ||
278 | ) | ||
279 | |||
280 | // Events (kqueue, kevent) | ||
281 | |||
282 | type Kevent_t C.struct_kevent | ||
283 | |||
284 | // Select | ||
285 | |||
286 | type FdSet C.fd_set | ||
287 | |||
288 | // Routing and interface messages | ||
289 | |||
290 | const ( | ||
291 | sizeofIfMsghdr = C.sizeof_struct_if_msghdr | ||
292 | SizeofIfMsghdr = C.sizeof_struct_if_msghdr8 | ||
293 | sizeofIfData = C.sizeof_struct_if_data | ||
294 | SizeofIfData = C.sizeof_struct_if_data8 | ||
295 | SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr | ||
296 | SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr | ||
297 | SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr | ||
298 | SizeofRtMsghdr = C.sizeof_struct_rt_msghdr | ||
299 | SizeofRtMetrics = C.sizeof_struct_rt_metrics | ||
300 | ) | ||
301 | |||
302 | type ifMsghdr C.struct_if_msghdr | ||
303 | |||
304 | type IfMsghdr C.struct_if_msghdr8 | ||
305 | |||
306 | type ifData C.struct_if_data | ||
307 | |||
308 | type IfData C.struct_if_data8 | ||
309 | |||
310 | type IfaMsghdr C.struct_ifa_msghdr | ||
311 | |||
312 | type IfmaMsghdr C.struct_ifma_msghdr | ||
313 | |||
314 | type IfAnnounceMsghdr C.struct_if_announcemsghdr | ||
315 | |||
316 | type RtMsghdr C.struct_rt_msghdr | ||
317 | |||
318 | type RtMetrics C.struct_rt_metrics | ||
319 | |||
320 | // Berkeley packet filter | ||
321 | |||
322 | const ( | ||
323 | SizeofBpfVersion = C.sizeof_struct_bpf_version | ||
324 | SizeofBpfStat = C.sizeof_struct_bpf_stat | ||
325 | SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf | ||
326 | SizeofBpfProgram = C.sizeof_struct_bpf_program | ||
327 | SizeofBpfInsn = C.sizeof_struct_bpf_insn | ||
328 | SizeofBpfHdr = C.sizeof_struct_bpf_hdr | ||
329 | SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header | ||
330 | ) | ||
331 | |||
332 | type BpfVersion C.struct_bpf_version | ||
333 | |||
334 | type BpfStat C.struct_bpf_stat | ||
335 | |||
336 | type BpfZbuf C.struct_bpf_zbuf | ||
337 | |||
338 | type BpfProgram C.struct_bpf_program | ||
339 | |||
340 | type BpfInsn C.struct_bpf_insn | ||
341 | |||
342 | type BpfHdr C.struct_bpf_hdr | ||
343 | |||
344 | type BpfZbufHeader C.struct_bpf_zbuf_header | ||
345 | |||
346 | // Terminal handling | ||
347 | |||
348 | type Termios C.struct_termios | ||
349 | |||
350 | type Winsize C.struct_winsize | ||
351 | |||
352 | // fchmodat-like syscalls. | ||
353 | |||
354 | const ( | ||
355 | AT_FDCWD = C.AT_FDCWD | ||
356 | AT_REMOVEDIR = C.AT_REMOVEDIR | ||
357 | AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW | ||
358 | AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW | ||
359 | ) | ||
360 | |||
361 | // poll | ||
362 | |||
363 | type PollFd C.struct_pollfd | ||
364 | |||
365 | const ( | ||
366 | POLLERR = C.POLLERR | ||
367 | POLLHUP = C.POLLHUP | ||
368 | POLLIN = C.POLLIN | ||
369 | POLLINIGNEOF = C.POLLINIGNEOF | ||
370 | POLLNVAL = C.POLLNVAL | ||
371 | POLLOUT = C.POLLOUT | ||
372 | POLLPRI = C.POLLPRI | ||
373 | POLLRDBAND = C.POLLRDBAND | ||
374 | POLLRDNORM = C.POLLRDNORM | ||
375 | POLLWRBAND = C.POLLWRBAND | ||
376 | POLLWRNORM = C.POLLWRNORM | ||
377 | ) | ||
378 | |||
379 | // Capabilities | ||
380 | |||
381 | type CapRights C.struct_cap_rights | ||
382 | |||
383 | // Uname | ||
384 | |||
385 | type Utsname C.struct_utsname | ||
diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go new file mode 100644 index 0000000..1edbf1b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_netbsd.go | |||
@@ -0,0 +1,287 @@ | |||
1 | // Copyright 2009 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | /* | ||
8 | Input to cgo -godefs. See README.md | ||
9 | */ | ||
10 | |||
11 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
12 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
13 | |||
14 | package unix | ||
15 | |||
16 | /* | ||
17 | #define KERNEL | ||
18 | #include <dirent.h> | ||
19 | #include <fcntl.h> | ||
20 | #include <poll.h> | ||
21 | #include <signal.h> | ||
22 | #include <termios.h> | ||
23 | #include <stdio.h> | ||
24 | #include <unistd.h> | ||
25 | #include <sys/param.h> | ||
26 | #include <sys/types.h> | ||
27 | #include <sys/event.h> | ||
28 | #include <sys/mman.h> | ||
29 | #include <sys/mount.h> | ||
30 | #include <sys/ptrace.h> | ||
31 | #include <sys/resource.h> | ||
32 | #include <sys/select.h> | ||
33 | #include <sys/signal.h> | ||
34 | #include <sys/socket.h> | ||
35 | #include <sys/stat.h> | ||
36 | #include <sys/sysctl.h> | ||
37 | #include <sys/time.h> | ||
38 | #include <sys/uio.h> | ||
39 | #include <sys/un.h> | ||
40 | #include <sys/utsname.h> | ||
41 | #include <sys/wait.h> | ||
42 | #include <net/bpf.h> | ||
43 | #include <net/if.h> | ||
44 | #include <net/if_dl.h> | ||
45 | #include <net/route.h> | ||
46 | #include <netinet/in.h> | ||
47 | #include <netinet/icmp6.h> | ||
48 | #include <netinet/tcp.h> | ||
49 | |||
50 | enum { | ||
51 | sizeofPtr = sizeof(void*), | ||
52 | }; | ||
53 | |||
54 | union sockaddr_all { | ||
55 | struct sockaddr s1; // this one gets used for fields | ||
56 | struct sockaddr_in s2; // these pad it out | ||
57 | struct sockaddr_in6 s3; | ||
58 | struct sockaddr_un s4; | ||
59 | struct sockaddr_dl s5; | ||
60 | }; | ||
61 | |||
62 | struct sockaddr_any { | ||
63 | struct sockaddr addr; | ||
64 | char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; | ||
65 | }; | ||
66 | |||
67 | */ | ||
68 | import "C" | ||
69 | |||
70 | // Machine characteristics | ||
71 | |||
72 | const ( | ||
73 | SizeofPtr = C.sizeofPtr | ||
74 | SizeofShort = C.sizeof_short | ||
75 | SizeofInt = C.sizeof_int | ||
76 | SizeofLong = C.sizeof_long | ||
77 | SizeofLongLong = C.sizeof_longlong | ||
78 | ) | ||
79 | |||
80 | // Basic types | ||
81 | |||
82 | type ( | ||
83 | _C_short C.short | ||
84 | _C_int C.int | ||
85 | _C_long C.long | ||
86 | _C_long_long C.longlong | ||
87 | ) | ||
88 | |||
89 | // Time | ||
90 | |||
91 | type Timespec C.struct_timespec | ||
92 | |||
93 | type Timeval C.struct_timeval | ||
94 | |||
95 | // Processes | ||
96 | |||
97 | type Rusage C.struct_rusage | ||
98 | |||
99 | type Rlimit C.struct_rlimit | ||
100 | |||
101 | type _Gid_t C.gid_t | ||
102 | |||
103 | // Files | ||
104 | |||
105 | type Stat_t C.struct_stat | ||
106 | |||
107 | type Statfs_t C.struct_statfs | ||
108 | |||
109 | type Flock_t C.struct_flock | ||
110 | |||
111 | type Dirent C.struct_dirent | ||
112 | |||
113 | type Fsid C.fsid_t | ||
114 | |||
115 | // File system limits | ||
116 | |||
117 | const ( | ||
118 | PathMax = C.PATH_MAX | ||
119 | ) | ||
120 | |||
121 | // Advice to Fadvise | ||
122 | |||
123 | const ( | ||
124 | FADV_NORMAL = C.POSIX_FADV_NORMAL | ||
125 | FADV_RANDOM = C.POSIX_FADV_RANDOM | ||
126 | FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL | ||
127 | FADV_WILLNEED = C.POSIX_FADV_WILLNEED | ||
128 | FADV_DONTNEED = C.POSIX_FADV_DONTNEED | ||
129 | FADV_NOREUSE = C.POSIX_FADV_NOREUSE | ||
130 | ) | ||
131 | |||
132 | // Sockets | ||
133 | |||
134 | type RawSockaddrInet4 C.struct_sockaddr_in | ||
135 | |||
136 | type RawSockaddrInet6 C.struct_sockaddr_in6 | ||
137 | |||
138 | type RawSockaddrUnix C.struct_sockaddr_un | ||
139 | |||
140 | type RawSockaddrDatalink C.struct_sockaddr_dl | ||
141 | |||
142 | type RawSockaddr C.struct_sockaddr | ||
143 | |||
144 | type RawSockaddrAny C.struct_sockaddr_any | ||
145 | |||
146 | type _Socklen C.socklen_t | ||
147 | |||
148 | type Linger C.struct_linger | ||
149 | |||
150 | type Iovec C.struct_iovec | ||
151 | |||
152 | type IPMreq C.struct_ip_mreq | ||
153 | |||
154 | type IPv6Mreq C.struct_ipv6_mreq | ||
155 | |||
156 | type Msghdr C.struct_msghdr | ||
157 | |||
158 | type Cmsghdr C.struct_cmsghdr | ||
159 | |||
160 | type Inet6Pktinfo C.struct_in6_pktinfo | ||
161 | |||
162 | type IPv6MTUInfo C.struct_ip6_mtuinfo | ||
163 | |||
164 | type ICMPv6Filter C.struct_icmp6_filter | ||
165 | |||
166 | const ( | ||
167 | SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in | ||
168 | SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
169 | SizeofSockaddrAny = C.sizeof_struct_sockaddr_any | ||
170 | SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un | ||
171 | SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl | ||
172 | SizeofLinger = C.sizeof_struct_linger | ||
173 | SizeofIPMreq = C.sizeof_struct_ip_mreq | ||
174 | SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq | ||
175 | SizeofMsghdr = C.sizeof_struct_msghdr | ||
176 | SizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
177 | SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo | ||
178 | SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo | ||
179 | SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter | ||
180 | ) | ||
181 | |||
182 | // Ptrace requests | ||
183 | |||
184 | const ( | ||
185 | PTRACE_TRACEME = C.PT_TRACE_ME | ||
186 | PTRACE_CONT = C.PT_CONTINUE | ||
187 | PTRACE_KILL = C.PT_KILL | ||
188 | ) | ||
189 | |||
190 | // Events (kqueue, kevent) | ||
191 | |||
192 | type Kevent_t C.struct_kevent | ||
193 | |||
194 | // Select | ||
195 | |||
196 | type FdSet C.fd_set | ||
197 | |||
198 | // Routing and interface messages | ||
199 | |||
200 | const ( | ||
201 | SizeofIfMsghdr = C.sizeof_struct_if_msghdr | ||
202 | SizeofIfData = C.sizeof_struct_if_data | ||
203 | SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr | ||
204 | SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr | ||
205 | SizeofRtMsghdr = C.sizeof_struct_rt_msghdr | ||
206 | SizeofRtMetrics = C.sizeof_struct_rt_metrics | ||
207 | ) | ||
208 | |||
209 | type IfMsghdr C.struct_if_msghdr | ||
210 | |||
211 | type IfData C.struct_if_data | ||
212 | |||
213 | type IfaMsghdr C.struct_ifa_msghdr | ||
214 | |||
215 | type IfAnnounceMsghdr C.struct_if_announcemsghdr | ||
216 | |||
217 | type RtMsghdr C.struct_rt_msghdr | ||
218 | |||
219 | type RtMetrics C.struct_rt_metrics | ||
220 | |||
221 | type Mclpool C.struct_mclpool | ||
222 | |||
223 | // Berkeley packet filter | ||
224 | |||
225 | const ( | ||
226 | SizeofBpfVersion = C.sizeof_struct_bpf_version | ||
227 | SizeofBpfStat = C.sizeof_struct_bpf_stat | ||
228 | SizeofBpfProgram = C.sizeof_struct_bpf_program | ||
229 | SizeofBpfInsn = C.sizeof_struct_bpf_insn | ||
230 | SizeofBpfHdr = C.sizeof_struct_bpf_hdr | ||
231 | ) | ||
232 | |||
233 | type BpfVersion C.struct_bpf_version | ||
234 | |||
235 | type BpfStat C.struct_bpf_stat | ||
236 | |||
237 | type BpfProgram C.struct_bpf_program | ||
238 | |||
239 | type BpfInsn C.struct_bpf_insn | ||
240 | |||
241 | type BpfHdr C.struct_bpf_hdr | ||
242 | |||
243 | type BpfTimeval C.struct_bpf_timeval | ||
244 | |||
245 | // Terminal handling | ||
246 | |||
247 | type Termios C.struct_termios | ||
248 | |||
249 | type Winsize C.struct_winsize | ||
250 | |||
251 | // fchmodat-like syscalls. | ||
252 | |||
253 | const ( | ||
254 | AT_FDCWD = C.AT_FDCWD | ||
255 | AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW | ||
256 | ) | ||
257 | |||
258 | // poll | ||
259 | |||
260 | type PollFd C.struct_pollfd | ||
261 | |||
262 | const ( | ||
263 | POLLERR = C.POLLERR | ||
264 | POLLHUP = C.POLLHUP | ||
265 | POLLIN = C.POLLIN | ||
266 | POLLNVAL = C.POLLNVAL | ||
267 | POLLOUT = C.POLLOUT | ||
268 | POLLPRI = C.POLLPRI | ||
269 | POLLRDBAND = C.POLLRDBAND | ||
270 | POLLRDNORM = C.POLLRDNORM | ||
271 | POLLWRBAND = C.POLLWRBAND | ||
272 | POLLWRNORM = C.POLLWRNORM | ||
273 | ) | ||
274 | |||
275 | // Sysctl | ||
276 | |||
277 | type Sysctlnode C.struct_sysctlnode | ||
278 | |||
279 | // Uname | ||
280 | |||
281 | type Utsname C.struct_utsname | ||
282 | |||
283 | // Clockinfo | ||
284 | |||
285 | const SizeofClockinfo = C.sizeof_struct_clockinfo | ||
286 | |||
287 | type Clockinfo C.struct_clockinfo | ||
diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go new file mode 100644 index 0000000..297e40d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go | |||
@@ -0,0 +1,272 @@ | |||
1 | // Copyright 2009 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | /* | ||
8 | Input to cgo -godefs. See README.md | ||
9 | */ | ||
10 | |||
11 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
12 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
13 | |||
14 | package unix | ||
15 | |||
16 | /* | ||
17 | #define KERNEL | ||
18 | #include <dirent.h> | ||
19 | #include <fcntl.h> | ||
20 | #include <poll.h> | ||
21 | #include <signal.h> | ||
22 | #include <termios.h> | ||
23 | #include <stdio.h> | ||
24 | #include <unistd.h> | ||
25 | #include <sys/param.h> | ||
26 | #include <sys/types.h> | ||
27 | #include <sys/event.h> | ||
28 | #include <sys/mman.h> | ||
29 | #include <sys/mount.h> | ||
30 | #include <sys/ptrace.h> | ||
31 | #include <sys/resource.h> | ||
32 | #include <sys/select.h> | ||
33 | #include <sys/signal.h> | ||
34 | #include <sys/socket.h> | ||
35 | #include <sys/stat.h> | ||
36 | #include <sys/time.h> | ||
37 | #include <sys/uio.h> | ||
38 | #include <sys/un.h> | ||
39 | #include <sys/utsname.h> | ||
40 | #include <sys/wait.h> | ||
41 | #include <uvm/uvmexp.h> | ||
42 | #include <net/bpf.h> | ||
43 | #include <net/if.h> | ||
44 | #include <net/if_dl.h> | ||
45 | #include <net/route.h> | ||
46 | #include <netinet/in.h> | ||
47 | #include <netinet/icmp6.h> | ||
48 | #include <netinet/tcp.h> | ||
49 | |||
50 | enum { | ||
51 | sizeofPtr = sizeof(void*), | ||
52 | }; | ||
53 | |||
54 | union sockaddr_all { | ||
55 | struct sockaddr s1; // this one gets used for fields | ||
56 | struct sockaddr_in s2; // these pad it out | ||
57 | struct sockaddr_in6 s3; | ||
58 | struct sockaddr_un s4; | ||
59 | struct sockaddr_dl s5; | ||
60 | }; | ||
61 | |||
62 | struct sockaddr_any { | ||
63 | struct sockaddr addr; | ||
64 | char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; | ||
65 | }; | ||
66 | |||
67 | */ | ||
68 | import "C" | ||
69 | |||
70 | // Machine characteristics | ||
71 | |||
72 | const ( | ||
73 | SizeofPtr = C.sizeofPtr | ||
74 | SizeofShort = C.sizeof_short | ||
75 | SizeofInt = C.sizeof_int | ||
76 | SizeofLong = C.sizeof_long | ||
77 | SizeofLongLong = C.sizeof_longlong | ||
78 | ) | ||
79 | |||
80 | // Basic types | ||
81 | |||
82 | type ( | ||
83 | _C_short C.short | ||
84 | _C_int C.int | ||
85 | _C_long C.long | ||
86 | _C_long_long C.longlong | ||
87 | ) | ||
88 | |||
89 | // Time | ||
90 | |||
91 | type Timespec C.struct_timespec | ||
92 | |||
93 | type Timeval C.struct_timeval | ||
94 | |||
95 | // Processes | ||
96 | |||
97 | type Rusage C.struct_rusage | ||
98 | |||
99 | type Rlimit C.struct_rlimit | ||
100 | |||
101 | type _Gid_t C.gid_t | ||
102 | |||
103 | // Files | ||
104 | |||
105 | type Stat_t C.struct_stat | ||
106 | |||
107 | type Statfs_t C.struct_statfs | ||
108 | |||
109 | type Flock_t C.struct_flock | ||
110 | |||
111 | type Dirent C.struct_dirent | ||
112 | |||
113 | type Fsid C.fsid_t | ||
114 | |||
115 | // File system limits | ||
116 | |||
117 | const ( | ||
118 | PathMax = C.PATH_MAX | ||
119 | ) | ||
120 | |||
121 | // Sockets | ||
122 | |||
123 | type RawSockaddrInet4 C.struct_sockaddr_in | ||
124 | |||
125 | type RawSockaddrInet6 C.struct_sockaddr_in6 | ||
126 | |||
127 | type RawSockaddrUnix C.struct_sockaddr_un | ||
128 | |||
129 | type RawSockaddrDatalink C.struct_sockaddr_dl | ||
130 | |||
131 | type RawSockaddr C.struct_sockaddr | ||
132 | |||
133 | type RawSockaddrAny C.struct_sockaddr_any | ||
134 | |||
135 | type _Socklen C.socklen_t | ||
136 | |||
137 | type Linger C.struct_linger | ||
138 | |||
139 | type Iovec C.struct_iovec | ||
140 | |||
141 | type IPMreq C.struct_ip_mreq | ||
142 | |||
143 | type IPv6Mreq C.struct_ipv6_mreq | ||
144 | |||
145 | type Msghdr C.struct_msghdr | ||
146 | |||
147 | type Cmsghdr C.struct_cmsghdr | ||
148 | |||
149 | type Inet6Pktinfo C.struct_in6_pktinfo | ||
150 | |||
151 | type IPv6MTUInfo C.struct_ip6_mtuinfo | ||
152 | |||
153 | type ICMPv6Filter C.struct_icmp6_filter | ||
154 | |||
155 | const ( | ||
156 | SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in | ||
157 | SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
158 | SizeofSockaddrAny = C.sizeof_struct_sockaddr_any | ||
159 | SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un | ||
160 | SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl | ||
161 | SizeofLinger = C.sizeof_struct_linger | ||
162 | SizeofIPMreq = C.sizeof_struct_ip_mreq | ||
163 | SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq | ||
164 | SizeofMsghdr = C.sizeof_struct_msghdr | ||
165 | SizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
166 | SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo | ||
167 | SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo | ||
168 | SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter | ||
169 | ) | ||
170 | |||
171 | // Ptrace requests | ||
172 | |||
173 | const ( | ||
174 | PTRACE_TRACEME = C.PT_TRACE_ME | ||
175 | PTRACE_CONT = C.PT_CONTINUE | ||
176 | PTRACE_KILL = C.PT_KILL | ||
177 | ) | ||
178 | |||
179 | // Events (kqueue, kevent) | ||
180 | |||
181 | type Kevent_t C.struct_kevent | ||
182 | |||
183 | // Select | ||
184 | |||
185 | type FdSet C.fd_set | ||
186 | |||
187 | // Routing and interface messages | ||
188 | |||
189 | const ( | ||
190 | SizeofIfMsghdr = C.sizeof_struct_if_msghdr | ||
191 | SizeofIfData = C.sizeof_struct_if_data | ||
192 | SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr | ||
193 | SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr | ||
194 | SizeofRtMsghdr = C.sizeof_struct_rt_msghdr | ||
195 | SizeofRtMetrics = C.sizeof_struct_rt_metrics | ||
196 | ) | ||
197 | |||
198 | type IfMsghdr C.struct_if_msghdr | ||
199 | |||
200 | type IfData C.struct_if_data | ||
201 | |||
202 | type IfaMsghdr C.struct_ifa_msghdr | ||
203 | |||
204 | type IfAnnounceMsghdr C.struct_if_announcemsghdr | ||
205 | |||
206 | type RtMsghdr C.struct_rt_msghdr | ||
207 | |||
208 | type RtMetrics C.struct_rt_metrics | ||
209 | |||
210 | type Mclpool C.struct_mclpool | ||
211 | |||
212 | // Berkeley packet filter | ||
213 | |||
214 | const ( | ||
215 | SizeofBpfVersion = C.sizeof_struct_bpf_version | ||
216 | SizeofBpfStat = C.sizeof_struct_bpf_stat | ||
217 | SizeofBpfProgram = C.sizeof_struct_bpf_program | ||
218 | SizeofBpfInsn = C.sizeof_struct_bpf_insn | ||
219 | SizeofBpfHdr = C.sizeof_struct_bpf_hdr | ||
220 | ) | ||
221 | |||
222 | type BpfVersion C.struct_bpf_version | ||
223 | |||
224 | type BpfStat C.struct_bpf_stat | ||
225 | |||
226 | type BpfProgram C.struct_bpf_program | ||
227 | |||
228 | type BpfInsn C.struct_bpf_insn | ||
229 | |||
230 | type BpfHdr C.struct_bpf_hdr | ||
231 | |||
232 | type BpfTimeval C.struct_bpf_timeval | ||
233 | |||
234 | // Terminal handling | ||
235 | |||
236 | type Termios C.struct_termios | ||
237 | |||
238 | type Winsize C.struct_winsize | ||
239 | |||
240 | // fchmodat-like syscalls. | ||
241 | |||
242 | const ( | ||
243 | AT_FDCWD = C.AT_FDCWD | ||
244 | AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW | ||
245 | ) | ||
246 | |||
247 | // poll | ||
248 | |||
249 | type PollFd C.struct_pollfd | ||
250 | |||
251 | const ( | ||
252 | POLLERR = C.POLLERR | ||
253 | POLLHUP = C.POLLHUP | ||
254 | POLLIN = C.POLLIN | ||
255 | POLLNVAL = C.POLLNVAL | ||
256 | POLLOUT = C.POLLOUT | ||
257 | POLLPRI = C.POLLPRI | ||
258 | POLLRDBAND = C.POLLRDBAND | ||
259 | POLLRDNORM = C.POLLRDNORM | ||
260 | POLLWRBAND = C.POLLWRBAND | ||
261 | POLLWRNORM = C.POLLWRNORM | ||
262 | ) | ||
263 | |||
264 | // Uname | ||
265 | |||
266 | type Utsname C.struct_utsname | ||
267 | |||
268 | // Uvmexp | ||
269 | |||
270 | const SizeofUvmexp = C.sizeof_struct_uvmexp | ||
271 | |||
272 | type Uvmexp C.struct_uvmexp | ||
diff --git a/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go new file mode 100644 index 0000000..2b716f9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_solaris.go | |||
@@ -0,0 +1,266 @@ | |||
1 | // Copyright 2009 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build ignore | ||
6 | |||
7 | /* | ||
8 | Input to cgo -godefs. See README.md | ||
9 | */ | ||
10 | |||
11 | // +godefs map struct_in_addr [4]byte /* in_addr */ | ||
12 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
13 | |||
14 | package unix | ||
15 | |||
16 | /* | ||
17 | #define KERNEL | ||
18 | // These defines ensure that builds done on newer versions of Solaris are | ||
19 | // backwards-compatible with older versions of Solaris and | ||
20 | // OpenSolaris-based derivatives. | ||
21 | #define __USE_SUNOS_SOCKETS__ // msghdr | ||
22 | #define __USE_LEGACY_PROTOTYPES__ // iovec | ||
23 | #include <dirent.h> | ||
24 | #include <fcntl.h> | ||
25 | #include <netdb.h> | ||
26 | #include <limits.h> | ||
27 | #include <poll.h> | ||
28 | #include <signal.h> | ||
29 | #include <termios.h> | ||
30 | #include <termio.h> | ||
31 | #include <stdio.h> | ||
32 | #include <unistd.h> | ||
33 | #include <sys/mman.h> | ||
34 | #include <sys/mount.h> | ||
35 | #include <sys/param.h> | ||
36 | #include <sys/resource.h> | ||
37 | #include <sys/select.h> | ||
38 | #include <sys/signal.h> | ||
39 | #include <sys/socket.h> | ||
40 | #include <sys/stat.h> | ||
41 | #include <sys/statvfs.h> | ||
42 | #include <sys/time.h> | ||
43 | #include <sys/times.h> | ||
44 | #include <sys/types.h> | ||
45 | #include <sys/utsname.h> | ||
46 | #include <sys/un.h> | ||
47 | #include <sys/wait.h> | ||
48 | #include <net/bpf.h> | ||
49 | #include <net/if.h> | ||
50 | #include <net/if_dl.h> | ||
51 | #include <net/route.h> | ||
52 | #include <netinet/in.h> | ||
53 | #include <netinet/icmp6.h> | ||
54 | #include <netinet/tcp.h> | ||
55 | #include <ustat.h> | ||
56 | #include <utime.h> | ||
57 | |||
58 | enum { | ||
59 | sizeofPtr = sizeof(void*), | ||
60 | }; | ||
61 | |||
62 | union sockaddr_all { | ||
63 | struct sockaddr s1; // this one gets used for fields | ||
64 | struct sockaddr_in s2; // these pad it out | ||
65 | struct sockaddr_in6 s3; | ||
66 | struct sockaddr_un s4; | ||
67 | struct sockaddr_dl s5; | ||
68 | }; | ||
69 | |||
70 | struct sockaddr_any { | ||
71 | struct sockaddr addr; | ||
72 | char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; | ||
73 | }; | ||
74 | |||
75 | */ | ||
76 | import "C" | ||
77 | |||
78 | // Machine characteristics | ||
79 | |||
80 | const ( | ||
81 | SizeofPtr = C.sizeofPtr | ||
82 | SizeofShort = C.sizeof_short | ||
83 | SizeofInt = C.sizeof_int | ||
84 | SizeofLong = C.sizeof_long | ||
85 | SizeofLongLong = C.sizeof_longlong | ||
86 | PathMax = C.PATH_MAX | ||
87 | MaxHostNameLen = C.MAXHOSTNAMELEN | ||
88 | ) | ||
89 | |||
90 | // Basic types | ||
91 | |||
92 | type ( | ||
93 | _C_short C.short | ||
94 | _C_int C.int | ||
95 | _C_long C.long | ||
96 | _C_long_long C.longlong | ||
97 | ) | ||
98 | |||
99 | // Time | ||
100 | |||
101 | type Timespec C.struct_timespec | ||
102 | |||
103 | type Timeval C.struct_timeval | ||
104 | |||
105 | type Timeval32 C.struct_timeval32 | ||
106 | |||
107 | type Tms C.struct_tms | ||
108 | |||
109 | type Utimbuf C.struct_utimbuf | ||
110 | |||
111 | // Processes | ||
112 | |||
113 | type Rusage C.struct_rusage | ||
114 | |||
115 | type Rlimit C.struct_rlimit | ||
116 | |||
117 | type _Gid_t C.gid_t | ||
118 | |||
119 | // Files | ||
120 | |||
121 | type Stat_t C.struct_stat | ||
122 | |||
123 | type Flock_t C.struct_flock | ||
124 | |||
125 | type Dirent C.struct_dirent | ||
126 | |||
127 | // Filesystems | ||
128 | |||
129 | type _Fsblkcnt_t C.fsblkcnt_t | ||
130 | |||
131 | type Statvfs_t C.struct_statvfs | ||
132 | |||
133 | // Sockets | ||
134 | |||
135 | type RawSockaddrInet4 C.struct_sockaddr_in | ||
136 | |||
137 | type RawSockaddrInet6 C.struct_sockaddr_in6 | ||
138 | |||
139 | type RawSockaddrUnix C.struct_sockaddr_un | ||
140 | |||
141 | type RawSockaddrDatalink C.struct_sockaddr_dl | ||
142 | |||
143 | type RawSockaddr C.struct_sockaddr | ||
144 | |||
145 | type RawSockaddrAny C.struct_sockaddr_any | ||
146 | |||
147 | type _Socklen C.socklen_t | ||
148 | |||
149 | type Linger C.struct_linger | ||
150 | |||
151 | type Iovec C.struct_iovec | ||
152 | |||
153 | type IPMreq C.struct_ip_mreq | ||
154 | |||
155 | type IPv6Mreq C.struct_ipv6_mreq | ||
156 | |||
157 | type Msghdr C.struct_msghdr | ||
158 | |||
159 | type Cmsghdr C.struct_cmsghdr | ||
160 | |||
161 | type Inet6Pktinfo C.struct_in6_pktinfo | ||
162 | |||
163 | type IPv6MTUInfo C.struct_ip6_mtuinfo | ||
164 | |||
165 | type ICMPv6Filter C.struct_icmp6_filter | ||
166 | |||
167 | const ( | ||
168 | SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in | ||
169 | SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
170 | SizeofSockaddrAny = C.sizeof_struct_sockaddr_any | ||
171 | SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un | ||
172 | SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl | ||
173 | SizeofLinger = C.sizeof_struct_linger | ||
174 | SizeofIPMreq = C.sizeof_struct_ip_mreq | ||
175 | SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq | ||
176 | SizeofMsghdr = C.sizeof_struct_msghdr | ||
177 | SizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
178 | SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo | ||
179 | SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo | ||
180 | SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter | ||
181 | ) | ||
182 | |||
183 | // Select | ||
184 | |||
185 | type FdSet C.fd_set | ||
186 | |||
187 | // Misc | ||
188 | |||
189 | type Utsname C.struct_utsname | ||
190 | |||
191 | type Ustat_t C.struct_ustat | ||
192 | |||
193 | const ( | ||
194 | AT_FDCWD = C.AT_FDCWD | ||
195 | AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW | ||
196 | AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW | ||
197 | AT_REMOVEDIR = C.AT_REMOVEDIR | ||
198 | AT_EACCESS = C.AT_EACCESS | ||
199 | ) | ||
200 | |||
201 | // Routing and interface messages | ||
202 | |||
203 | const ( | ||
204 | SizeofIfMsghdr = C.sizeof_struct_if_msghdr | ||
205 | SizeofIfData = C.sizeof_struct_if_data | ||
206 | SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr | ||
207 | SizeofRtMsghdr = C.sizeof_struct_rt_msghdr | ||
208 | SizeofRtMetrics = C.sizeof_struct_rt_metrics | ||
209 | ) | ||
210 | |||
211 | type IfMsghdr C.struct_if_msghdr | ||
212 | |||
213 | type IfData C.struct_if_data | ||
214 | |||
215 | type IfaMsghdr C.struct_ifa_msghdr | ||
216 | |||
217 | type RtMsghdr C.struct_rt_msghdr | ||
218 | |||
219 | type RtMetrics C.struct_rt_metrics | ||
220 | |||
221 | // Berkeley packet filter | ||
222 | |||
223 | const ( | ||
224 | SizeofBpfVersion = C.sizeof_struct_bpf_version | ||
225 | SizeofBpfStat = C.sizeof_struct_bpf_stat | ||
226 | SizeofBpfProgram = C.sizeof_struct_bpf_program | ||
227 | SizeofBpfInsn = C.sizeof_struct_bpf_insn | ||
228 | SizeofBpfHdr = C.sizeof_struct_bpf_hdr | ||
229 | ) | ||
230 | |||
231 | type BpfVersion C.struct_bpf_version | ||
232 | |||
233 | type BpfStat C.struct_bpf_stat | ||
234 | |||
235 | type BpfProgram C.struct_bpf_program | ||
236 | |||
237 | type BpfInsn C.struct_bpf_insn | ||
238 | |||
239 | type BpfTimeval C.struct_bpf_timeval | ||
240 | |||
241 | type BpfHdr C.struct_bpf_hdr | ||
242 | |||
243 | // Terminal handling | ||
244 | |||
245 | type Termios C.struct_termios | ||
246 | |||
247 | type Termio C.struct_termio | ||
248 | |||
249 | type Winsize C.struct_winsize | ||
250 | |||
251 | // poll | ||
252 | |||
253 | type PollFd C.struct_pollfd | ||
254 | |||
255 | const ( | ||
256 | POLLERR = C.POLLERR | ||
257 | POLLHUP = C.POLLHUP | ||
258 | POLLIN = C.POLLIN | ||
259 | POLLNVAL = C.POLLNVAL | ||
260 | POLLOUT = C.POLLOUT | ||
261 | POLLPRI = C.POLLPRI | ||
262 | POLLRDBAND = C.POLLRDBAND | ||
263 | POLLRDNORM = C.POLLRDNORM | ||
264 | POLLWRBAND = C.POLLWRBAND | ||
265 | POLLWRNORM = C.POLLWRNORM | ||
266 | ) | ||
diff --git a/vendor/gopkg.in/alecthomas/kingpin.v2/.travis.yml b/vendor/gopkg.in/alecthomas/kingpin.v2/.travis.yml new file mode 100644 index 0000000..e564b74 --- /dev/null +++ b/vendor/gopkg.in/alecthomas/kingpin.v2/.travis.yml | |||
@@ -0,0 +1,4 @@ | |||
1 | sudo: false | ||
2 | language: go | ||
3 | install: go get -t -v ./... | ||
4 | go: 1.2 | ||
diff --git a/vendor/modules.txt b/vendor/modules.txt new file mode 100644 index 0000000..d048101 --- /dev/null +++ b/vendor/modules.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | # github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc | ||
2 | github.com/alecthomas/template | ||
3 | github.com/alecthomas/template/parse | ||
4 | # github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf | ||
5 | github.com/alecthomas/units | ||
6 | # github.com/beevik/ntp v0.2.0 | ||
7 | github.com/beevik/ntp | ||
8 | # github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 | ||
9 | github.com/beorn7/perks/quantile | ||
10 | # github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 | ||
11 | github.com/coreos/go-systemd/dbus | ||
12 | # github.com/ema/qdisc v0.0.0-20180104102928-b307c22d3ce7 | ||
13 | github.com/ema/qdisc | ||
14 | # github.com/godbus/dbus v4.1.0+incompatible | ||
15 | github.com/godbus/dbus | ||
16 | # github.com/golang/protobuf v1.2.0 | ||
17 | github.com/golang/protobuf/proto | ||
18 | # github.com/konsorten/go-windows-terminal-sequences v1.0.1 | ||
19 | github.com/konsorten/go-windows-terminal-sequences | ||
20 | # github.com/lufia/iostat v0.0.0-20170605150913-9f7362b77ad3 | ||
21 | github.com/lufia/iostat | ||
22 | # github.com/mattn/go-xmlrpc v0.0.0-20180913190254-6e944673e4c0 | ||
23 | github.com/mattn/go-xmlrpc | ||
24 | # github.com/matttproud/golang_protobuf_extensions v1.0.1 | ||
25 | github.com/matttproud/golang_protobuf_extensions/pbutil | ||
26 | # github.com/mdlayher/genetlink v0.0.0-20180917171408-7615bc153978 | ||
27 | github.com/mdlayher/genetlink | ||
28 | # github.com/mdlayher/netlink v0.0.0-20180920202405-794849f2d5bf | ||
29 | github.com/mdlayher/netlink | ||
30 | github.com/mdlayher/netlink/nlenc | ||
31 | # github.com/mdlayher/wifi v0.0.0-20180727163819-efdf3f4195d9 | ||
32 | github.com/mdlayher/wifi | ||
33 | github.com/mdlayher/wifi/internal/nl80211 | ||
34 | # github.com/prometheus/client_golang v0.9.1 | ||
35 | github.com/prometheus/client_golang/prometheus | ||
36 | github.com/prometheus/client_golang/prometheus/promhttp | ||
37 | github.com/prometheus/client_golang/prometheus/internal | ||
38 | # github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 | ||
39 | github.com/prometheus/client_model/go | ||
40 | # github.com/prometheus/common v0.0.0-20181015124227-bcb74de08d37 | ||
41 | github.com/prometheus/common/log | ||
42 | github.com/prometheus/common/version | ||
43 | github.com/prometheus/common/expfmt | ||
44 | github.com/prometheus/common/model | ||
45 | github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg | ||
46 | # github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d | ||
47 | github.com/prometheus/procfs | ||
48 | github.com/prometheus/procfs/bcache | ||
49 | github.com/prometheus/procfs/nfs | ||
50 | github.com/prometheus/procfs/sysfs | ||
51 | github.com/prometheus/procfs/xfs | ||
52 | github.com/prometheus/procfs/internal/util | ||
53 | # github.com/sirupsen/logrus v1.1.1 | ||
54 | github.com/sirupsen/logrus | ||
55 | # github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a | ||
56 | github.com/soundcloud/go-runit/runit | ||
57 | # golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941 | ||
58 | golang.org/x/crypto/ssh/terminal | ||
59 | # golang.org/x/net v0.0.0-20181005035420-146acd28ed58 | ||
60 | golang.org/x/net/ipv4 | ||
61 | golang.org/x/net/bpf | ||
62 | golang.org/x/net/internal/iana | ||
63 | golang.org/x/net/internal/socket | ||
64 | # golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e | ||
65 | golang.org/x/sys/unix | ||
66 | golang.org/x/sys/windows/svc/eventlog | ||
67 | golang.org/x/sys/windows | ||
68 | golang.org/x/sys/windows/registry | ||
69 | # gopkg.in/alecthomas/kingpin.v2 v2.2.6 | ||
70 | gopkg.in/alecthomas/kingpin.v2 | ||
diff --git a/vendor/vendor.json b/vendor/vendor.json deleted file mode 100644 index e5a1488..0000000 --- a/vendor/vendor.json +++ /dev/null | |||
@@ -1,297 +0,0 @@ | |||
1 | { | ||
2 | "comment": "", | ||
3 | "ignore": "test", | ||
4 | "package": [ | ||
5 | { | ||
6 | "checksumSHA1": "KmjnydoAbofMieIWm+it5OWERaM=", | ||
7 | "path": "github.com/alecthomas/template", | ||
8 | "revision": "a0175ee3bccc567396460bf5acd36800cb10c49c", | ||
9 | "revisionTime": "2016-04-05T07:15:01Z" | ||
10 | }, | ||
11 | { | ||
12 | "checksumSHA1": "3wt0pTXXeS+S93unwhGoLIyGX/Q=", | ||
13 | "path": "github.com/alecthomas/template/parse", | ||
14 | "revision": "a0175ee3bccc567396460bf5acd36800cb10c49c", | ||
15 | "revisionTime": "2016-04-05T07:15:01Z" | ||
16 | }, | ||
17 | { | ||
18 | "checksumSHA1": "fCc3grA7vIxfBru7R3SqjcW+oLI=", | ||
19 | "path": "github.com/alecthomas/units", | ||
20 | "revision": "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a", | ||
21 | "revisionTime": "2015-10-22T06:55:26Z" | ||
22 | }, | ||
23 | { | ||
24 | "checksumSHA1": "Gofi5dpQ/jevSfySSRDaoNpHMq8=", | ||
25 | "path": "github.com/beevik/ntp", | ||
26 | "revision": "62c80a04de2086884d8296004b6d74ee1846c582", | ||
27 | "revisionTime": "2017-10-20T00:02:52Z", | ||
28 | "version": "v0.2.0", | ||
29 | "versionExact": "v0.2.0" | ||
30 | }, | ||
31 | { | ||
32 | "checksumSHA1": "spyv5/YFBjYyZLZa1U2LBfDR8PM=", | ||
33 | "path": "github.com/beorn7/perks/quantile", | ||
34 | "revision": "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9", | ||
35 | "revisionTime": "2016-08-04T10:47:26Z" | ||
36 | }, | ||
37 | { | ||
38 | "checksumSHA1": "1txgvJO9bgE703kK2EQ/NATy1Rg=", | ||
39 | "path": "github.com/coreos/go-systemd/dbus", | ||
40 | "revision": "39ca1b05acc7ad1220e09f133283b8859a8b71ab", | ||
41 | "revisionTime": "2018-05-11T13:34:05Z", | ||
42 | "version": "v17", | ||
43 | "versionExact": "v17" | ||
44 | }, | ||
45 | { | ||
46 | "checksumSHA1": "wPbKObbGzS/43nrskRaJVFVEW/A=", | ||
47 | "path": "github.com/ema/qdisc", | ||
48 | "revision": "b307c22d3ce761d351b6e6270b50195b44ee9248", | ||
49 | "revisionTime": "2018-01-04T10:29:28Z" | ||
50 | }, | ||
51 | { | ||
52 | "checksumSHA1": "Qbh78KcLmLVoURsCp+f5xVeA/fI=", | ||
53 | "path": "github.com/godbus/dbus", | ||
54 | "revision": "a389bdde4dd695d414e47b755e95e72b7826432c", | ||
55 | "revisionTime": "2017-09-18T23:46:06Z", | ||
56 | "version": "v4.1.0", | ||
57 | "versionExact": "v4.1.0" | ||
58 | }, | ||
59 | { | ||
60 | "checksumSHA1": "mE9XW26JSpe4meBObM6J/Oeq0eg=", | ||
61 | "path": "github.com/golang/protobuf/proto", | ||
62 | "revision": "aa810b61a9c79d51363740d207bb46cf8e620ed5", | ||
63 | "revisionTime": "2018-08-14T21:14:27Z", | ||
64 | "version": "v1.2.0", | ||
65 | "versionExact": "v1.2.0" | ||
66 | }, | ||
67 | { | ||
68 | "checksumSHA1": "r6ZMyP/HsdeToXIxvgP3ntL6Bds=", | ||
69 | "path": "github.com/konsorten/go-windows-terminal-sequences", | ||
70 | "revision": "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242", | ||
71 | "revisionTime": "2018-10-04T22:41:46Z", | ||
72 | "version": "v1.0.1", | ||
73 | "versionExact": "v1.0.1" | ||
74 | }, | ||
75 | { | ||
76 | "checksumSHA1": "IdBAvtVSv0sbi8sEsLovnZubims=", | ||
77 | "path": "github.com/lufia/iostat", | ||
78 | "revision": "9f7362b77ad333b26c01c99de52a11bdb650ded2", | ||
79 | "revisionTime": "2017-06-05T15:08:45Z" | ||
80 | }, | ||
81 | { | ||
82 | "checksumSHA1": "bCmcSbBoZf/rekSo8AE7l0fNCkw=", | ||
83 | "path": "github.com/mattn/go-xmlrpc", | ||
84 | "revision": "6e944673e4c0cc6117326f69df5eb7b210a6362d", | ||
85 | "revisionTime": "2018-09-13T19:02:54Z" | ||
86 | }, | ||
87 | { | ||
88 | "checksumSHA1": "aodj/cITRyuaZSh84DDhrZjh76U=", | ||
89 | "path": "github.com/matttproud/golang_protobuf_extensions/pbutil", | ||
90 | "revision": "3247c84500bff8d9fb6d579d800f20b3e091582c", | ||
91 | "revisionTime": "2016-04-23T17:36:17Z", | ||
92 | "version": "v1.0.0", | ||
93 | "versionExact": "v1.0.0" | ||
94 | }, | ||
95 | { | ||
96 | "checksumSHA1": "mqiQh7IAod6wvRP14+5GcUyKNwo=", | ||
97 | "path": "github.com/mdlayher/genetlink", | ||
98 | "revision": "7615bc153978352e5f20442221cf606b624e5890", | ||
99 | "revisionTime": "2018-09-17T17:14:08Z" | ||
100 | }, | ||
101 | { | ||
102 | "checksumSHA1": "lB1YzfMg7EnumgpWRYSqmrH6S7Q=", | ||
103 | "path": "github.com/mdlayher/netlink", | ||
104 | "revision": "794849f2d5bf05e15f14bbae6bca4dfc94e7595e", | ||
105 | "revisionTime": "2018-09-20T20:24:05Z" | ||
106 | }, | ||
107 | { | ||
108 | "checksumSHA1": "P7eEo2V7/kQEkt2ihW+26S39eEw=", | ||
109 | "path": "github.com/mdlayher/netlink/nlenc", | ||
110 | "revision": "794849f2d5bf05e15f14bbae6bca4dfc94e7595e", | ||
111 | "revisionTime": "2018-09-20T20:24:05Z" | ||
112 | }, | ||
113 | { | ||
114 | "checksumSHA1": "Y7cjrOeOvA/ic+B8WCp2JyLEuvs=", | ||
115 | "path": "github.com/mdlayher/wifi", | ||
116 | "revision": "efdf3f4195d9fc8b73013b3706fe626b7fb807d8", | ||
117 | "revisionTime": "2018-07-27T16:38:19Z" | ||
118 | }, | ||
119 | { | ||
120 | "checksumSHA1": "VzutdH69PUqRqhrDVv6F91ebQd4=", | ||
121 | "path": "github.com/mdlayher/wifi/internal/nl80211", | ||
122 | "revision": "efdf3f4195d9fc8b73013b3706fe626b7fb807d8", | ||
123 | "revisionTime": "2018-07-27T16:38:19Z" | ||
124 | }, | ||
125 | { | ||
126 | "checksumSHA1": "frS661rlSEZWE9CezHhnFioQK/I=", | ||
127 | "path": "github.com/prometheus/client_golang/prometheus", | ||
128 | "revision": "1cafe34db7fdec6022e17e00e1c1ea501022f3e4", | ||
129 | "revisionTime": "2018-10-15T14:52:39Z", | ||
130 | "version": "v0.9", | ||
131 | "versionExact": "v0.9.0" | ||
132 | }, | ||
133 | { | ||
134 | "checksumSHA1": "UBqhkyjCz47+S19MVTigxJ2VjVQ=", | ||
135 | "path": "github.com/prometheus/client_golang/prometheus/internal", | ||
136 | "revision": "1cafe34db7fdec6022e17e00e1c1ea501022f3e4", | ||
137 | "revisionTime": "2018-10-15T14:52:39Z", | ||
138 | "version": "v0.9", | ||
139 | "versionExact": "v0.9.0" | ||
140 | }, | ||
141 | { | ||
142 | "checksumSHA1": "d5BiEvD8MrgpWQ6PQJUvawJsMak=", | ||
143 | "path": "github.com/prometheus/client_golang/prometheus/promhttp", | ||
144 | "revision": "1cafe34db7fdec6022e17e00e1c1ea501022f3e4", | ||
145 | "revisionTime": "2018-10-15T14:52:39Z", | ||
146 | "version": "v0.9", | ||
147 | "versionExact": "v0.9.0" | ||
148 | }, | ||
149 | { | ||
150 | "checksumSHA1": "V8xkqgmP66sq2ZW4QO5wi9a4oZE=", | ||
151 | "path": "github.com/prometheus/client_model/go", | ||
152 | "revision": "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f", | ||
153 | "revisionTime": "2018-07-12T10:51:10Z" | ||
154 | }, | ||
155 | { | ||
156 | "checksumSHA1": "hGf3xT6gRaJh2zAEbWj9YnV+K+0=", | ||
157 | "path": "github.com/prometheus/common/expfmt", | ||
158 | "revision": "bcb74de08d37a417cb6789eec1d6c810040f0470", | ||
159 | "revisionTime": "2018-10-15T12:42:27Z" | ||
160 | }, | ||
161 | { | ||
162 | "checksumSHA1": "GWlM3d2vPYyNATtTFgftS10/A9w=", | ||
163 | "path": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg", | ||
164 | "revision": "bcb74de08d37a417cb6789eec1d6c810040f0470", | ||
165 | "revisionTime": "2018-10-15T12:42:27Z" | ||
166 | }, | ||
167 | { | ||
168 | "checksumSHA1": "MGnqHnmEqc1fjnYiWReSiW8C27A=", | ||
169 | "path": "github.com/prometheus/common/log", | ||
170 | "revision": "bcb74de08d37a417cb6789eec1d6c810040f0470", | ||
171 | "revisionTime": "2018-10-15T12:42:27Z" | ||
172 | }, | ||
173 | { | ||
174 | "checksumSHA1": "EXTRY7DL9gFW8c341Dk6LDXCBn8=", | ||
175 | "path": "github.com/prometheus/common/model", | ||
176 | "revision": "bcb74de08d37a417cb6789eec1d6c810040f0470", | ||
177 | "revisionTime": "2018-10-15T12:42:27Z" | ||
178 | }, | ||
179 | { | ||
180 | "checksumSHA1": "91KYK0SpvkaMJJA2+BcxbVnyRO0=", | ||
181 | "path": "github.com/prometheus/common/version", | ||
182 | "revision": "bcb74de08d37a417cb6789eec1d6c810040f0470", | ||
183 | "revisionTime": "2018-10-15T12:42:27Z" | ||
184 | }, | ||
185 | { | ||
186 | "checksumSHA1": "4zOdjJcskuocAzI+i6rcRzYjSlI=", | ||
187 | "path": "github.com/prometheus/procfs", | ||
188 | "revision": "185b4288413d2a0dd0806f78c90dde719829e5ae", | ||
189 | "revisionTime": "2018-10-05T14:02:18Z" | ||
190 | }, | ||
191 | { | ||
192 | "checksumSHA1": "O64FotgWPYIpl3m2gvTEPIem+xg=", | ||
193 | "path": "github.com/prometheus/procfs/bcache", | ||
194 | "revision": "185b4288413d2a0dd0806f78c90dde719829e5ae", | ||
195 | "revisionTime": "2018-10-05T14:02:18Z" | ||
196 | }, | ||
197 | { | ||
198 | "checksumSHA1": "8E1IbrgtLBee7J404VKPyoI+qsk=", | ||
199 | "path": "github.com/prometheus/procfs/internal/util", | ||
200 | "revision": "185b4288413d2a0dd0806f78c90dde719829e5ae", | ||
201 | "revisionTime": "2018-10-05T14:02:18Z" | ||
202 | }, | ||
203 | { | ||
204 | "checksumSHA1": "HSP5hVT0CNMRa8+Xtz4z2Ic5U0E=", | ||
205 | "path": "github.com/prometheus/procfs/nfs", | ||
206 | "revision": "185b4288413d2a0dd0806f78c90dde719829e5ae", | ||
207 | "revisionTime": "2018-10-05T14:02:18Z" | ||
208 | }, | ||
209 | { | ||
210 | "checksumSHA1": "ORMPtgUo5XBWikhal+l0GE7+3ps=", | ||
211 | "path": "github.com/prometheus/procfs/sysfs", | ||
212 | "revision": "185b4288413d2a0dd0806f78c90dde719829e5ae", | ||
213 | "revisionTime": "2018-10-05T14:02:18Z" | ||
214 | }, | ||
215 | { | ||
216 | "checksumSHA1": "yItvTQLUVqm/ArLEbvEhqG0T5a0=", | ||
217 | "path": "github.com/prometheus/procfs/xfs", | ||
218 | "revision": "185b4288413d2a0dd0806f78c90dde719829e5ae", | ||
219 | "revisionTime": "2018-10-05T14:02:18Z" | ||
220 | }, | ||
221 | { | ||
222 | "checksumSHA1": "YjhDOmq6sEghGST0PAiyA+8EAT4=", | ||
223 | "path": "github.com/sirupsen/logrus", | ||
224 | "revision": "ad15b42461921f1fb3529b058c6786c6a45d5162", | ||
225 | "revisionTime": "2018-10-08T20:30:39Z", | ||
226 | "version": "v1.1.1", | ||
227 | "versionExact": "v1.1.1" | ||
228 | }, | ||
229 | { | ||
230 | "checksumSHA1": "uozMgPjB4AggpuuJkGq3FgAs4CA=", | ||
231 | "path": "github.com/soundcloud/go-runit/runit", | ||
232 | "revision": "06ad41a06c4a586951fb8040a697ecd39729640b", | ||
233 | "revisionTime": "2015-06-30T19:56:10Z" | ||
234 | }, | ||
235 | { | ||
236 | "checksumSHA1": "BGm8lKZmvJbf/YOJLeL1rw2WVjA=", | ||
237 | "path": "golang.org/x/crypto/ssh/terminal", | ||
238 | "revision": "7c1a557ab941a71c619514f229f0b27ccb0c27cf", | ||
239 | "revisionTime": "2018-10-02T14:18:56Z" | ||
240 | }, | ||
241 | { | ||
242 | "checksumSHA1": "NjyXtXsaf0ulRJn6HQSP1FqGL4A=", | ||
243 | "path": "golang.org/x/net/bpf", | ||
244 | "revision": "146acd28ed5894421fb5aac80ca93bc1b1f46f87", | ||
245 | "revisionTime": "2018-10-04T22:16:49Z" | ||
246 | }, | ||
247 | { | ||
248 | "checksumSHA1": "8oJoT8rfokzpkJ19eNhRs2JgRxI=", | ||
249 | "path": "golang.org/x/net/internal/iana", | ||
250 | "revision": "146acd28ed5894421fb5aac80ca93bc1b1f46f87", | ||
251 | "revisionTime": "2018-10-04T22:16:49Z" | ||
252 | }, | ||
253 | { | ||
254 | "checksumSHA1": "YsXlbexuTtUXHyhSv927ILOkf6A=", | ||
255 | "path": "golang.org/x/net/internal/socket", | ||
256 | "revision": "146acd28ed5894421fb5aac80ca93bc1b1f46f87", | ||
257 | "revisionTime": "2018-10-04T22:16:49Z" | ||
258 | }, | ||
259 | { | ||
260 | "checksumSHA1": "K4XNY0c60IPBpv5sO6aiCuB8o/0=", | ||
261 | "path": "golang.org/x/net/ipv4", | ||
262 | "revision": "146acd28ed5894421fb5aac80ca93bc1b1f46f87", | ||
263 | "revisionTime": "2018-10-04T22:16:49Z" | ||
264 | }, | ||
265 | { | ||
266 | "checksumSHA1": "ko2jS+S73n4qhQpABo/AnQaSQfo=", | ||
267 | "path": "golang.org/x/sys/unix", | ||
268 | "revision": "4497e2df6f9e69048a54498c7affbbec3294ad47", | ||
269 | "revisionTime": "2018-10-05T07:04:52Z" | ||
270 | }, | ||
271 | { | ||
272 | "checksumSHA1": "Y7nctMxT58lRM78VtElPerhcnEs=", | ||
273 | "path": "golang.org/x/sys/windows", | ||
274 | "revision": "4497e2df6f9e69048a54498c7affbbec3294ad47", | ||
275 | "revisionTime": "2018-10-05T07:04:52Z" | ||
276 | }, | ||
277 | { | ||
278 | "checksumSHA1": "P9OIhD26uWlIST/me4TYnvseCoY=", | ||
279 | "path": "golang.org/x/sys/windows/registry", | ||
280 | "revision": "4497e2df6f9e69048a54498c7affbbec3294ad47", | ||
281 | "revisionTime": "2018-10-05T07:04:52Z" | ||
282 | }, | ||
283 | { | ||
284 | "checksumSHA1": "uVlUSSKplihZG7N+QJ6fzDZ4Kh8=", | ||
285 | "path": "golang.org/x/sys/windows/svc/eventlog", | ||
286 | "revision": "4497e2df6f9e69048a54498c7affbbec3294ad47", | ||
287 | "revisionTime": "2018-10-05T07:04:52Z" | ||
288 | }, | ||
289 | { | ||
290 | "checksumSHA1": "sToCp8GThnMnsBzsHv+L/tBYQrQ=", | ||
291 | "path": "gopkg.in/alecthomas/kingpin.v2", | ||
292 | "revision": "947dcec5ba9c011838740e680966fd7087a71d0d", | ||
293 | "revisionTime": "2017-12-17T18:08:21Z" | ||
294 | } | ||
295 | ], | ||
296 | "rootPath": "github.com/prometheus/node_exporter" | ||
297 | } | ||