diff options
author | Matt Layher <mdlayher@gmail.com> | 2017-03-17 15:24:24 -0400 |
---|---|---|
committer | Matt Layher <mdlayher@gmail.com> | 2017-03-17 15:24:24 -0400 |
commit | c0cc85716ac31401045b3079a509b4013c72e251 (patch) | |
tree | 42c71b27b4850153b910d056ef9251a44106a16c /vendor | |
parent | 38a4292360bde9502dd5ba152ee0b3a7944e87f4 (diff) | |
download | prometheus_node_collector-c0cc85716ac31401045b3079a509b4013c72e251.tar.bz2 prometheus_node_collector-c0cc85716ac31401045b3079a509b4013c72e251.tar.xz prometheus_node_collector-c0cc85716ac31401045b3079a509b4013c72e251.zip |
Bump github.com/mdlayher/wifi to relax station info restrictions
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/mdlayher/wifi/client.go | 12 | ||||
-rw-r--r-- | vendor/github.com/mdlayher/wifi/wifi.go | 32 | ||||
-rw-r--r-- | vendor/vendor.json | 6 |
3 files changed, 36 insertions, 14 deletions
diff --git a/vendor/github.com/mdlayher/wifi/client.go b/vendor/github.com/mdlayher/wifi/client.go index 3de6dac..735843d 100644 --- a/vendor/github.com/mdlayher/wifi/client.go +++ b/vendor/github.com/mdlayher/wifi/client.go | |||
@@ -1,16 +1,11 @@ | |||
1 | package wifi | 1 | package wifi |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "errors" | ||
5 | "fmt" | 4 | "fmt" |
6 | "runtime" | 5 | "runtime" |
7 | ) | 6 | ) |
8 | 7 | ||
9 | var ( | 8 | var ( |
10 | // errNotStation is returned when attempting to query station info for | ||
11 | // an interface which is not a station. | ||
12 | errNotStation = errors.New("interface is not a station") | ||
13 | |||
14 | // errUnimplemented is returned by all functions on platforms that | 9 | // errUnimplemented is returned by all functions on platforms that |
15 | // do not have package wifi implemented. | 10 | // do not have package wifi implemented. |
16 | errUnimplemented = fmt.Errorf("package wifi not implemented on %s/%s", | 11 | errUnimplemented = fmt.Errorf("package wifi not implemented on %s/%s", |
@@ -50,13 +45,8 @@ func (c *Client) BSS(ifi *Interface) (*BSS, error) { | |||
50 | return c.c.BSS(ifi) | 45 | return c.c.BSS(ifi) |
51 | } | 46 | } |
52 | 47 | ||
53 | // StationInfo retrieves statistics about a WiFi interface operating in | 48 | // StationInfo retrieves station statistics about a WiFi interface. |
54 | // station mode. | ||
55 | func (c *Client) StationInfo(ifi *Interface) (*StationInfo, error) { | 49 | func (c *Client) StationInfo(ifi *Interface) (*StationInfo, error) { |
56 | if ifi.Type != InterfaceTypeStation { | ||
57 | return nil, errNotStation | ||
58 | } | ||
59 | |||
60 | return c.c.StationInfo(ifi) | 50 | return c.c.StationInfo(ifi) |
61 | } | 51 | } |
62 | 52 | ||
diff --git a/vendor/github.com/mdlayher/wifi/wifi.go b/vendor/github.com/mdlayher/wifi/wifi.go index 4eabec1..e16bcc4 100644 --- a/vendor/github.com/mdlayher/wifi/wifi.go +++ b/vendor/github.com/mdlayher/wifi/wifi.go | |||
@@ -69,6 +69,38 @@ const ( | |||
69 | InterfaceTypeNAN | 69 | InterfaceTypeNAN |
70 | ) | 70 | ) |
71 | 71 | ||
72 | // String returns the string representation of an InterfaceType. | ||
73 | func (t InterfaceType) String() string { | ||
74 | switch t { | ||
75 | case InterfaceTypeUnspecified: | ||
76 | return "unspecified" | ||
77 | case InterfaceTypeAdHoc: | ||
78 | return "ad-hoc" | ||
79 | case InterfaceTypeStation: | ||
80 | return "station" | ||
81 | case InterfaceTypeAP: | ||
82 | return "access point" | ||
83 | case InterfaceTypeWDS: | ||
84 | return "wireless distribution" | ||
85 | case InterfaceTypeMonitor: | ||
86 | return "monitor" | ||
87 | case InterfaceTypeMeshPoint: | ||
88 | return "mesh point" | ||
89 | case InterfaceTypeP2PClient: | ||
90 | return "P2P client" | ||
91 | case InterfaceTypeP2PGroupOwner: | ||
92 | return "P2P group owner" | ||
93 | case InterfaceTypeP2PDevice: | ||
94 | return "P2P device" | ||
95 | case InterfaceTypeOCB: | ||
96 | return "outside context of BSS" | ||
97 | case InterfaceTypeNAN: | ||
98 | return "near-me area network" | ||
99 | default: | ||
100 | return fmt.Sprintf("unknown(%d)", t) | ||
101 | } | ||
102 | } | ||
103 | |||
72 | // An Interface is a WiFi network interface. | 104 | // An Interface is a WiFi network interface. |
73 | type Interface struct { | 105 | type Interface struct { |
74 | // The index of the interface. | 106 | // The index of the interface. |
diff --git a/vendor/vendor.json b/vendor/vendor.json index 007f43d..cce2597 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json | |||
@@ -69,10 +69,10 @@ | |||
69 | "revisionTime": "2017-01-04T04:59:06Z" | 69 | "revisionTime": "2017-01-04T04:59:06Z" |
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | "checksumSHA1": "XG73RxoI99JeNkxyMStXnlCpXXM=", | 72 | "checksumSHA1": "FdmT9kyPtsLxk+sgxJmKqcbOCR4=", |
73 | "path": "github.com/mdlayher/wifi", | 73 | "path": "github.com/mdlayher/wifi", |
74 | "revision": "1ccab08abb10805297916157a270d05f562e2647", | 74 | "revision": "567082929344b0af8eb8a2ad6fe4725c0b3c8702", |
75 | "revisionTime": "2017-03-01T22:08:15Z" | 75 | "revisionTime": "2017-03-17T19:22:46Z" |
76 | }, | 76 | }, |
77 | { | 77 | { |
78 | "checksumSHA1": "VzutdH69PUqRqhrDVv6F91ebQd4=", | 78 | "checksumSHA1": "VzutdH69PUqRqhrDVv6F91ebQd4=", |