ohai 15.3.1 → 15.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -6
  3. data/lib/ohai/mixin/{network_constants.rb → network_helper.rb} +8 -1
  4. data/lib/ohai/plugins/aix/network.rb +3 -8
  5. data/lib/ohai/plugins/darwin/network.rb +6 -4
  6. data/lib/ohai/plugins/filesystem.rb +166 -0
  7. data/lib/ohai/plugins/network.rb +5 -5
  8. data/lib/ohai/plugins/openstack.rb +2 -1
  9. data/lib/ohai/plugins/solaris2/network.rb +6 -4
  10. data/lib/ohai/version.rb +1 -1
  11. data/ohai.gemspec +1 -1
  12. metadata +3 -162
  13. data/Rakefile +0 -42
  14. data/lib/ohai/plugins/windows/filesystem.rb +0 -147
  15. data/spec/data/plugins/dpkg-query.output +0 -4
  16. data/spec/data/plugins/lslpp.output +0 -50
  17. data/spec/data/plugins/pacman.output +0 -51
  18. data/spec/data/plugins/pkg-query.output +0 -58
  19. data/spec/data/plugins/pkginfo.output +0 -50
  20. data/spec/data/plugins/pkglist.output +0 -24
  21. data/spec/data/plugins/rpmquery.output +0 -7
  22. data/spec/functional/application_spec.rb +0 -107
  23. data/spec/functional/loader_spec.rb +0 -53
  24. data/spec/functional/plugins/powershell_spec.rb +0 -88
  25. data/spec/functional/plugins/root_group_spec.rb +0 -41
  26. data/spec/functional/plugins/windows/uptime_spec.rb +0 -51
  27. data/spec/ohai_spec.rb +0 -27
  28. data/spec/rcov.opts +0 -2
  29. data/spec/spec.opts +0 -2
  30. data/spec/spec_helper.rb +0 -124
  31. data/spec/support/integration_helper.rb +0 -61
  32. data/spec/support/platform_helpers.rb +0 -38
  33. data/spec/unit/application_spec.rb +0 -96
  34. data/spec/unit/config_spec.rb +0 -57
  35. data/spec/unit/dsl/plugin_spec.rb +0 -634
  36. data/spec/unit/hints_spec.rb +0 -65
  37. data/spec/unit/loader_spec.rb +0 -195
  38. data/spec/unit/mixin/azure_metadata_spec.rb +0 -72
  39. data/spec/unit/mixin/command_spec.rb +0 -151
  40. data/spec/unit/mixin/dmi_decode.rb +0 -75
  41. data/spec/unit/mixin/ec2_metadata_spec.rb +0 -88
  42. data/spec/unit/mixin/softlayer_metadata_spec.rb +0 -72
  43. data/spec/unit/plugin_config_spec.rb +0 -117
  44. data/spec/unit/plugins/abort_spec.rb +0 -69
  45. data/spec/unit/plugins/aix/cpu_spec.rb +0 -127
  46. data/spec/unit/plugins/aix/filesystem_spec.rb +0 -238
  47. data/spec/unit/plugins/aix/hostname_spec.rb +0 -33
  48. data/spec/unit/plugins/aix/kernel_spec.rb +0 -61
  49. data/spec/unit/plugins/aix/memory_spec.rb +0 -49
  50. data/spec/unit/plugins/aix/network_spec.rb +0 -313
  51. data/spec/unit/plugins/aix/platform_spec.rb +0 -44
  52. data/spec/unit/plugins/aix/uptime_spec.rb +0 -42
  53. data/spec/unit/plugins/aix/virtualization_spec.rb +0 -319
  54. data/spec/unit/plugins/azure_spec.rb +0 -243
  55. data/spec/unit/plugins/bsd/filesystem_spec.rb +0 -138
  56. data/spec/unit/plugins/bsd/virtualization_spec.rb +0 -145
  57. data/spec/unit/plugins/c_spec.rb +0 -341
  58. data/spec/unit/plugins/chef_spec.rb +0 -44
  59. data/spec/unit/plugins/cloud_spec.rb +0 -484
  60. data/spec/unit/plugins/darwin/cpu_spec.rb +0 -124
  61. data/spec/unit/plugins/darwin/filesystem_spec.rb +0 -140
  62. data/spec/unit/plugins/darwin/hardware_spec.rb +0 -105
  63. data/spec/unit/plugins/darwin/hardware_system_profiler_output.rb +0 -1110
  64. data/spec/unit/plugins/darwin/hostname_spec.rb +0 -43
  65. data/spec/unit/plugins/darwin/kernel_spec.rb +0 -65
  66. data/spec/unit/plugins/darwin/memory_spec.rb +0 -64
  67. data/spec/unit/plugins/darwin/network_spec.rb +0 -849
  68. data/spec/unit/plugins/darwin/platform_spec.rb +0 -71
  69. data/spec/unit/plugins/darwin/virtualization_spec.rb +0 -156
  70. data/spec/unit/plugins/digital_ocean_spec.rb +0 -106
  71. data/spec/unit/plugins/dmi_spec.rb +0 -156
  72. data/spec/unit/plugins/docker_spec.rb +0 -100
  73. data/spec/unit/plugins/ec2_spec.rb +0 -452
  74. data/spec/unit/plugins/elixir_spec.rb +0 -55
  75. data/spec/unit/plugins/erlang_spec.rb +0 -71
  76. data/spec/unit/plugins/eucalyptus_spec.rb +0 -109
  77. data/spec/unit/plugins/fail_spec.rb +0 -260
  78. data/spec/unit/plugins/freebsd/cpu_spec.rb +0 -129
  79. data/spec/unit/plugins/freebsd/hostname_spec.rb +0 -35
  80. data/spec/unit/plugins/freebsd/kernel_spec.rb +0 -36
  81. data/spec/unit/plugins/freebsd/platform_spec.rb +0 -38
  82. data/spec/unit/plugins/gce_spec.rb +0 -81
  83. data/spec/unit/plugins/go_spec.rb +0 -48
  84. data/spec/unit/plugins/groovy_spec.rb +0 -66
  85. data/spec/unit/plugins/haskell_spec.rb +0 -231
  86. data/spec/unit/plugins/hostname_spec.rb +0 -162
  87. data/spec/unit/plugins/init_package_spec.rb +0 -60
  88. data/spec/unit/plugins/java_spec.rb +0 -230
  89. data/spec/unit/plugins/joyent_spec.rb +0 -100
  90. data/spec/unit/plugins/kernel_spec.rb +0 -38
  91. data/spec/unit/plugins/linode_spec.rb +0 -135
  92. data/spec/unit/plugins/linux/block_device_spec.rb +0 -75
  93. data/spec/unit/plugins/linux/cpu_spec.rb +0 -441
  94. data/spec/unit/plugins/linux/filesystem_spec.rb +0 -550
  95. data/spec/unit/plugins/linux/fips_spec.rb +0 -60
  96. data/spec/unit/plugins/linux/hostname_spec.rb +0 -52
  97. data/spec/unit/plugins/linux/hostnamectl_spec.rb +0 -59
  98. data/spec/unit/plugins/linux/kernel_spec.rb +0 -71
  99. data/spec/unit/plugins/linux/lsb_spec.rb +0 -147
  100. data/spec/unit/plugins/linux/lspci_spec.rb +0 -133
  101. data/spec/unit/plugins/linux/machineid_spec.rb +0 -46
  102. data/spec/unit/plugins/linux/mdadm_spec.rb +0 -170
  103. data/spec/unit/plugins/linux/memory_spec.rb +0 -256
  104. data/spec/unit/plugins/linux/network_spec.rb +0 -1392
  105. data/spec/unit/plugins/linux/platform_spec.rb +0 -812
  106. data/spec/unit/plugins/linux/sessions_spec.rb +0 -98
  107. data/spec/unit/plugins/linux/sysctl_spec.rb +0 -53
  108. data/spec/unit/plugins/linux/systemd_paths_spec.rb +0 -122
  109. data/spec/unit/plugins/linux/uptime_spec.rb +0 -48
  110. data/spec/unit/plugins/linux/virtualization_spec.rb +0 -650
  111. data/spec/unit/plugins/lua_spec.rb +0 -60
  112. data/spec/unit/plugins/mono_spec.rb +0 -67
  113. data/spec/unit/plugins/netbsd/hostname_spec.rb +0 -43
  114. data/spec/unit/plugins/netbsd/kernel_spec.rb +0 -35
  115. data/spec/unit/plugins/netbsd/platform_spec.rb +0 -38
  116. data/spec/unit/plugins/network_spec.rb +0 -1078
  117. data/spec/unit/plugins/nodejs_spec.rb +0 -55
  118. data/spec/unit/plugins/ohai_spec.rb +0 -32
  119. data/spec/unit/plugins/ohai_time_spec.rb +0 -44
  120. data/spec/unit/plugins/openbsd/hostname_spec.rb +0 -43
  121. data/spec/unit/plugins/openbsd/kernel_spec.rb +0 -36
  122. data/spec/unit/plugins/openbsd/platform_spec.rb +0 -33
  123. data/spec/unit/plugins/openstack_spec.rb +0 -311
  124. data/spec/unit/plugins/os_spec.rb +0 -115
  125. data/spec/unit/plugins/packages_spec.rb +0 -353
  126. data/spec/unit/plugins/passwd_spec.rb +0 -65
  127. data/spec/unit/plugins/perl_spec.rb +0 -62
  128. data/spec/unit/plugins/php_spec.rb +0 -97
  129. data/spec/unit/plugins/platform_spec.rb +0 -65
  130. data/spec/unit/plugins/powershell_spec.rb +0 -71
  131. data/spec/unit/plugins/python_spec.rb +0 -51
  132. data/spec/unit/plugins/rackspace_spec.rb +0 -350
  133. data/spec/unit/plugins/root_group_spec.rb +0 -90
  134. data/spec/unit/plugins/ruby_spec.rb +0 -60
  135. data/spec/unit/plugins/rust_spec.rb +0 -43
  136. data/spec/unit/plugins/scala_spec.rb +0 -58
  137. data/spec/unit/plugins/scaleway_spec.rb +0 -93
  138. data/spec/unit/plugins/scsi_spec.rb +0 -69
  139. data/spec/unit/plugins/shard_spec.rb +0 -121
  140. data/spec/unit/plugins/shells_spec.rb +0 -56
  141. data/spec/unit/plugins/softlayer_spec.rb +0 -60
  142. data/spec/unit/plugins/solaris2/cpu_spec.rb +0 -2926
  143. data/spec/unit/plugins/solaris2/dmi_spec.rb +0 -153
  144. data/spec/unit/plugins/solaris2/filesystem.rb +0 -407
  145. data/spec/unit/plugins/solaris2/hostname_spec.rb +0 -37
  146. data/spec/unit/plugins/solaris2/kernel_spec.rb +0 -183
  147. data/spec/unit/plugins/solaris2/memory_spec.rb +0 -43
  148. data/spec/unit/plugins/solaris2/network_spec.rb +0 -201
  149. data/spec/unit/plugins/solaris2/platform_spec.rb +0 -108
  150. data/spec/unit/plugins/solaris2/virtualization_spec.rb +0 -97
  151. data/spec/unit/plugins/ssh_host_keys_spec.rb +0 -116
  152. data/spec/unit/plugins/sysconf_spec.rb +0 -680
  153. data/spec/unit/plugins/timezone_spec.rb +0 -30
  154. data/spec/unit/plugins/vbox_host_spec.rb +0 -14
  155. data/spec/unit/plugins/virtualbox_spec.rb +0 -375
  156. data/spec/unit/plugins/vmware_spec.rb +0 -81
  157. data/spec/unit/plugins/windows/cpu_spec.rb +0 -118
  158. data/spec/unit/plugins/windows/filesystem_spec.rb +0 -226
  159. data/spec/unit/plugins/windows/fips_spec.rb +0 -60
  160. data/spec/unit/plugins/windows/kernel_spec.rb +0 -79
  161. data/spec/unit/plugins/windows/memory_spec.rb +0 -52
  162. data/spec/unit/plugins/windows/network_spec.rb +0 -137
  163. data/spec/unit/plugins/windows/system_enclosure_spec.rb +0 -45
  164. data/spec/unit/plugins/windows/uptime_spec.rb +0 -38
  165. data/spec/unit/plugins/windows/virtualization_spec.rb +0 -63
  166. data/spec/unit/plugins/zpools_spec.rb +0 -244
  167. data/spec/unit/provides_map_spec.rb +0 -208
  168. data/spec/unit/runner_spec.rb +0 -422
  169. data/spec/unit/system_spec.rb +0 -416
  170. data/spec/unit/util/file_helper_spec.rb +0 -47
  171. data/spec/unit/util/ip_helper_spec.rb +0 -128
@@ -1,43 +0,0 @@
1
- #
2
- # Author:: Adam Jacob (<adam@chef.io>)
3
- # Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
4
- # License:: Apache License, Version 2.0
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
- require "spec_helper"
20
-
21
- describe Ohai::System, "Darwin hostname plugin" do
22
- before do
23
- @plugin = get_plugin("hostname")
24
- allow(@plugin).to receive(:collect_os).and_return(:darwin)
25
- allow(@plugin).to receive(:shell_out).with("hostname -s").and_return(mock_shell_out(0, "katie", ""))
26
- allow(@plugin).to receive(:shell_out).with("hostname").and_return(mock_shell_out(0, "katie.local", ""))
27
- allow(@plugin).to receive(:resolve_fqdn).and_return("katie.bethell")
28
- end
29
-
30
- it_should_check_from("darwin::hostname", "hostname", "hostname -s", "katie")
31
-
32
- it_should_check_from("linux::hostname", "machinename", "hostname", "katie.local")
33
-
34
- it "uses #resolve_fqdn to find the fqdn" do
35
- @plugin.run
36
- expect(@plugin[:fqdn]).to eq("katie.bethell")
37
- end
38
-
39
- it "sets the domain to everything after the first dot of the fqdn" do
40
- @plugin.run
41
- expect(@plugin[:domain]).to eq("bethell")
42
- end
43
- end
@@ -1,65 +0,0 @@
1
- #
2
- # Author:: Adam Jacob (<adam@chef.io>)
3
- # Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
4
- # License:: Apache License, Version 2.0
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
- require "spec_helper"
20
-
21
- describe Ohai::System, "Darwin kernel plugin" do
22
- before do
23
- @plugin = get_plugin("kernel")
24
- allow(@plugin).to receive(:collect_os).and_return(:darwin)
25
- allow(@plugin).to receive(:init_kernel).and_return({})
26
- end
27
-
28
- it "populates kernel[:modules] from `kextstat -k -l`" do
29
- allow(@plugin).to receive(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "0", ""))
30
- allow(@plugin).to receive(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, <<EOF, ""))
31
- 8 0 0xffffff7f81aed000 0x41000 0x41000 com.apple.kec.corecrypto (1.0) <7 6 5 4 3 1>
32
- 9 22 0xffffff7f807f3000 0x9000 0x9000 com.apple.iokit.IOACPIFamily (1.4) <7 6 4 3>
33
- 10 30 0xffffff7f80875000 0x29000 0x29000 com.apple.iokit.IOPCIFamily (2.8) <7 6 5 4 3>
34
- EOF
35
-
36
- modules = {
37
- "com.apple.kec.corecrypto" => { "version" => "1.0", "size" => 266240, "index" => "8", "refcount" => "0" },
38
- "com.apple.iokit.IOACPIFamily" => { "version" => "1.4", "size" => 36864, "index" => "9", "refcount" => "22" },
39
- "com.apple.iokit.IOPCIFamily" => { "version" => "2.8", "size" => 167936, "index" => "10", "refcount" => "30" } }
40
-
41
- @plugin.run
42
- expect(@plugin[:kernel][:modules]).to eql(modules)
43
- end
44
-
45
- it "does not set kernel_machine to x86_64" do
46
- allow(@plugin).to receive(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "0", ""))
47
- allow(@plugin).to receive(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, "", ""))
48
- @plugin.run
49
- expect(@plugin[:kernel][:machine]).not_to eq("x86_64")
50
- end
51
-
52
- it "sets kernel_machine to x86_64" do
53
- allow(@plugin).to receive(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "1", ""))
54
- allow(@plugin).to receive(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, "", ""))
55
- @plugin.run
56
- expect(@plugin[:kernel][:machine]).to eq("x86_64")
57
- end
58
-
59
- it "sets the kernel_os to the kernel_name value" do
60
- allow(@plugin).to receive(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "1", ""))
61
- allow(@plugin).to receive(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, "", ""))
62
- @plugin.run
63
- expect(@plugin[:kernel][:os]).to eq(@plugin[:kernel][:name])
64
- end
65
- end
@@ -1,64 +0,0 @@
1
- #
2
- # Author:: Patrick Collins (<pat@burned.com>)
3
- # Copyright:: Copyright (c) 2013-2016 Chef Software, Inc.
4
- # License:: Apache License, Version 2.0
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
- require "spec_helper"
20
-
21
- describe Ohai::System, "Darwin Memory Plugin" do
22
- before do
23
- darwin_memsize = <<~DARWIN_MEMSIZE
24
- 17179869184
25
- DARWIN_MEMSIZE
26
- darwin_vm_stat = <<~DARWIN_VM_STAT
27
- Mach Virtual Memory Statistics: (page size of 4096 bytes)
28
- Pages free: 2155305.
29
- Pages active: 924164.
30
- Pages inactive: 189127.
31
- Pages speculative: 531321.
32
- Pages wired down: 391749.
33
- "Translation faults": 14107520.
34
- Pages copy-on-write: 810071.
35
- Pages zero filled: 6981505.
36
- Pages reactivated: 1397.
37
- Pageins: 630064.
38
- Pageouts: 0.
39
- Object cache: 12 hits of 139872 lookups (0% hit rate)
40
- DARWIN_VM_STAT
41
-
42
- @plugin = get_plugin("darwin/memory")
43
- allow(@plugin).to receive(:collect_os).and_return(:darwin)
44
- allow(@plugin).to receive(:shell_out).with("sysctl -n hw.memsize").and_return(mock_shell_out(0, darwin_memsize, ""))
45
- allow(@plugin).to receive(:shell_out).with("vm_stat").and_return(mock_shell_out(0, darwin_vm_stat, ""))
46
- @plugin.run
47
- end
48
-
49
- it "sets memory[:total] to 16384MB" do
50
- expect(@plugin[:memory][:total]).to eq("16384MB")
51
- end
52
-
53
- it "sets memory[:active] to 5140MB" do
54
- expect(@plugin[:memory][:active]).to eq("5140MB")
55
- end
56
-
57
- it "sets memory[:inactive] to 738MB" do
58
- expect(@plugin[:memory][:inactive]).to eq("738MB")
59
- end
60
-
61
- it "sets memory[:free] to 10504MB" do
62
- expect(@plugin[:memory][:free]).to eq("10504MB")
63
- end
64
- end
@@ -1,849 +0,0 @@
1
- #
2
- # Author:: Alan Harper <alan@aussiegeek.net>
3
- # Copyright:: Copyright (c) 2012-2016 Chef Software, Inc.
4
- # License:: Apache License, Version 2.0
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
- require "spec_helper"
20
-
21
- describe Ohai::System, "Darwin Network Plugin" do
22
- before do
23
- @darwin_ifconfig = <<~DARWIN_IFCONFIG
24
- lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
25
- options=3<RXCSUM,TXCSUM>
26
- inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
27
- inet 127.0.0.1 netmask 0xff000000
28
- inet6 ::1 prefixlen 128
29
- inet6 fd54:185f:37df:cad2:ba8d:12ff:fe3a:32de prefixlen 128
30
- gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
31
- stf0: flags=0<> mtu 1280
32
- en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
33
- ether b8:8d:12:3a:32:de
34
- inet6 fe80::ba8d:12ff:fe3a:32de%en1 prefixlen 64 scopeid 0x4
35
- inet 10.20.10.144 netmask 0xffffff00 broadcast 10.20.10.255
36
- inet6 2001:44b8:4186:1100:ba8d:12ff:fe3a:32de prefixlen 64 autoconf
37
- inet6 2001:44b8:4186:1100:7dba:7a60:97a:e14a prefixlen 64 autoconf temporary
38
- media: autoselect
39
- status: active
40
- p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
41
- ether 0a:8d:12:3a:32:de
42
- media: autoselect
43
- status: inactive
44
- en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
45
- options=2b<RXCSUM,TXCSUM,VLAN_HWTAGGING,TSO4>
46
- ether 3c:07:54:4e:0e:35
47
- media: autoselect (none)
48
- status: inactive
49
- fw0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 4078
50
- lladdr a4:b1:97:ff:fe:b9:3a:d4
51
- media: autoselect <full-duplex>
52
- status: inactive
53
- utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
54
- inet6 fe80::ba8d:12ff:fe3a:32de%utun0 prefixlen 64 scopeid 0x8
55
- inet6 fd00:6587:52d7:c87:ba8d:12ff:fe3a:32de prefixlen 64
56
- DARWIN_IFCONFIG
57
-
58
- @darwin_arp = <<~DARWIN_ARP
59
- ? (10.20.10.1) at 0:4:ed:de:41:bf on en1 ifscope [ethernet]
60
- ? (10.20.10.2) at 0:1e:c9:55:7e:ee on en1 ifscope [ethernet]
61
- ? (10.20.10.6) at 34:15:9e:18:a1:20 on en1 ifscope [ethernet]
62
- ? (10.20.10.57) at cc:8:e0:e0:8a:2 on en1 ifscope [ethernet]
63
- ? (10.20.10.61) at 28:37:37:12:5:77 on en1 ifscope [ethernet]
64
- ? (10.20.10.73) at e0:f8:47:8:86:2 on en1 ifscope [ethernet]
65
- ? (10.20.10.130) at 68:a8:6d:da:2b:24 on en1 ifscope [ethernet]
66
- ? (10.20.10.138) at 8:0:37:8c:d2:23 on en1 ifscope [ethernet]
67
- ? (10.20.10.141) at b8:8d:12:28:c5:90 on en1 ifscope [ethernet]
68
- ? (10.20.10.166) at 0:1b:63:a0:1:3a on en1 ifscope [ethernet]
69
- ? (10.20.10.174) at 98:d6:bb:bd:37:ad on en1 ifscope [ethernet]
70
- ? (10.20.10.178) at 24:ab:81:2d:a3:c5 on en1 ifscope [ethernet]
71
- ? (10.20.10.181) at 78:a3:e4:e4:16:32 on en1 ifscope [ethernet]
72
- ? (10.20.10.185) at 0:26:8:9a:e8:a3 on en1 ifscope [ethernet]
73
- ? (10.20.10.200) at b8:8d:12:55:7f:7f on en1 ifscope [ethernet]
74
- ? (10.20.10.255) at ff:ff:ff:ff:ff:ff on en1 ifscope [ethernet]
75
- DARWIN_ARP
76
-
77
- @darwin_route = <<~DARWIN_ROUTE
78
- route to: default
79
- destination: default
80
- mask: default
81
- gateway: 10.20.10.1
82
- interface: en1
83
- flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
84
- recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
85
- 0 0 0 0 0 0 1500 0
86
- DARWIN_ROUTE
87
-
88
- @darwin_netstat = <<~DARWIN_NETSTAT
89
- Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll Drop
90
- lo0 16384 <Link#1> 174982 0 25774844 174982 0 25774844 0
91
- lo0 16384 fe80::1%lo0 fe80:1::1 174982 - 25774844 174982 - 25774844 - -
92
- lo0 16384 127 127.0.0.1 174982 - 25774844 174982 - 25774844 - -
93
- lo0 16384 ::1/128 ::1 174982 - 25774844 174982 - 25774844 - -
94
- lo0 16384 fd54:185f:3 fd54:185f:37df:ca 174982 - 25774844 174982 - 25774844 - -
95
- gif0* 1280 <Link#2> 0 0 0 0 0 0 0
96
- stf0* 1280 <Link#3> 0 0 0 0 0 0 0
97
- en1 1500 <Link#4> b8:8d:12:3a:32:de 5921903 0 2530556736 14314573 0 18228234970 0
98
- en1 1500 fe80::ba8d: fe80:4::ba8d:12ff 5921903 - 2530556736 14314573 - 18228234970 - -
99
- en1 1500 10.20.10/24 10.20.10.144 5921903 - 2530556736 14314573 - 18228234970 - -
100
- en1 1500 2001:44b8:4 2001:44b8:4186:11 5921903 - 2530556736 14314573 - 18228234970 - -
101
- en1 1500 2001:44b8:4 2001:44b8:4186:11 5921903 - 2530556736 14314573 - 18228234970 - -
102
- p2p0 2304 <Link#5> 0a:8d:12:3a:32:de 0 0 0 0 0 0 0
103
- en0 1500 <Link#6> 3c:07:54:4e:0e:35 0 0 0 0 0 2394 0
104
- fw0* 4078 <Link#7> a4:b1:97:ff:fe:b9:3a:d4 0 0 0 0 0 1038 0
105
- utun0 1380 <Link#8> 5 0 324 13 0 740 0
106
- utun0 1380 fe80::ba8d: fe80:8::ba8d:12ff 5 - 324 13 - 740 - -
107
- utun0 1380 fd00:6587:5 fd00:6587:52d7:c8 5 - 324 13 - 740 - -
108
- DARWIN_NETSTAT
109
-
110
- @darwin_sysctl = <<~DARWIN_SYSCTL
111
- net.local.stream.sendspace: 8192
112
- net.local.stream.recvspace: 8192
113
- net.local.stream.tracemdns: 0
114
- net.local.dgram.maxdgram: 2048
115
- net.local.dgram.recvspace: 4096
116
- net.local.inflight: 0
117
- net.inet.ip.portrange.lowfirst: 1023
118
- net.inet.ip.portrange.lowlast: 600
119
- net.inet.ip.portrange.first: 49152
120
- net.inet.ip.portrange.last: 65535
121
- net.inet.ip.portrange.hifirst: 49152
122
- net.inet.ip.portrange.hilast: 65535
123
- net.inet.ip.forwarding: 1
124
- net.inet.ip.redirect: 1
125
- net.inet.ip.ttl: 64
126
- net.inet.ip.rtexpire: 12
127
- net.inet.ip.rtminexpire: 10
128
- net.inet.ip.rtmaxcache: 128
129
- net.inet.ip.sourceroute: 0
130
- net.inet.ip.intr_queue_maxlen: 50
131
- net.inet.ip.intr_queue_drops: 0
132
- net.inet.ip.accept_sourceroute: 0
133
- net.inet.ip.keepfaith: 0
134
- net.inet.ip.gifttl: 30
135
- net.inet.ip.subnets_are_local: 0
136
- net.inet.ip.mcast.maxgrpsrc: 512
137
- net.inet.ip.mcast.maxsocksrc: 128
138
- net.inet.ip.mcast.loop: 1
139
- net.inet.ip.check_route_selfref: 1
140
- net.inet.ip.use_route_genid: 1
141
- net.inet.ip.dummynet.hash_size: 64
142
- net.inet.ip.dummynet.curr_time: 0
143
- net.inet.ip.dummynet.ready_heap: 0
144
- net.inet.ip.dummynet.extract_heap: 0
145
- net.inet.ip.dummynet.searches: 0
146
- net.inet.ip.dummynet.search_steps: 0
147
- net.inet.ip.dummynet.expire: 1
148
- net.inet.ip.dummynet.max_chain_len: 16
149
- net.inet.ip.dummynet.red_lookup_depth: 256
150
- net.inet.ip.dummynet.red_avg_pkt_size: 512
151
- net.inet.ip.dummynet.red_max_pkt_size: 1500
152
- net.inet.ip.dummynet.debug: 0
153
- net.inet.ip.fw.enable: 1
154
- net.inet.ip.fw.autoinc_step: 100
155
- net.inet.ip.fw.one_pass: 0
156
- net.inet.ip.fw.debug: 0
157
- net.inet.ip.fw.verbose: 0
158
- net.inet.ip.fw.verbose_limit: 0
159
- net.inet.ip.fw.dyn_buckets: 256
160
- net.inet.ip.fw.curr_dyn_buckets: 256
161
- net.inet.ip.fw.dyn_count: 0
162
- net.inet.ip.fw.dyn_max: 4096
163
- net.inet.ip.fw.static_count: 2
164
- net.inet.ip.fw.dyn_ack_lifetime: 300
165
- net.inet.ip.fw.dyn_syn_lifetime: 20
166
- net.inet.ip.fw.dyn_fin_lifetime: 1
167
- net.inet.ip.fw.dyn_rst_lifetime: 1
168
- net.inet.ip.fw.dyn_udp_lifetime: 10
169
- net.inet.ip.fw.dyn_short_lifetime: 5
170
- net.inet.ip.fw.dyn_keepalive: 1
171
- net.inet.ip.maxfragpackets: 1536
172
- net.inet.ip.maxfragsperpacket: 128
173
- net.inet.ip.maxfrags: 3072
174
- net.inet.ip.scopedroute: 1
175
- net.inet.ip.check_interface: 0
176
- net.inet.ip.linklocal.in.allowbadttl: 1
177
- net.inet.ip.random_id: 1
178
- net.inet.ip.maxchainsent: 0
179
- net.inet.ip.select_srcif_debug: 0
180
- net.inet.icmp.maskrepl: 0
181
- net.inet.icmp.icmplim: 250
182
- net.inet.icmp.timestamp: 0
183
- net.inet.icmp.drop_redirect: 0
184
- net.inet.icmp.log_redirect: 0
185
- net.inet.icmp.bmcastecho: 1
186
- net.inet.igmp.recvifkludge: 1
187
- net.inet.igmp.sendra: 1
188
- net.inet.igmp.sendlocal: 1
189
- net.inet.igmp.v1enable: 1
190
- net.inet.igmp.v2enable: 1
191
- net.inet.igmp.legacysupp: 0
192
- net.inet.igmp.default_version: 3
193
- net.inet.igmp.gsrdelay: 10
194
- net.inet.igmp.debug: 0
195
- net.inet.tcp.rfc1323: 1
196
- net.inet.tcp.rfc1644: 0
197
- net.inet.tcp.mssdflt: 512
198
- net.inet.tcp.keepidle: 7200000
199
- net.inet.tcp.keepintvl: 75000
200
- net.inet.tcp.sendspace: 65536
201
- net.inet.tcp.recvspace: 65536
202
- net.inet.tcp.keepinit: 75000
203
- net.inet.tcp.v6mssdflt: 1024
204
- net.inet.tcp.log_in_vain: 0
205
- net.inet.tcp.blackhole: 0
206
- net.inet.tcp.delayed_ack: 3
207
- net.inet.tcp.tcp_lq_overflow: 1
208
- net.inet.tcp.recvbg: 0
209
- net.inet.tcp.drop_synfin: 1
210
- net.inet.tcp.reass.maxsegments: 3072
211
- net.inet.tcp.reass.cursegments: 0
212
- net.inet.tcp.reass.overflows: 0
213
- net.inet.tcp.slowlink_wsize: 8192
214
- net.inet.tcp.maxseg_unacked: 8
215
- net.inet.tcp.rfc3465: 1
216
- net.inet.tcp.rfc3465_lim2: 1
217
- net.inet.tcp.rtt_samples_per_slot: 20
218
- net.inet.tcp.recv_allowed_iaj: 5
219
- net.inet.tcp.acc_iaj_high_thresh: 100
220
- net.inet.tcp.rexmt_thresh: 2
221
- net.inet.tcp.path_mtu_discovery: 1
222
- net.inet.tcp.slowstart_flightsize: 1
223
- net.inet.tcp.local_slowstart_flightsize: 8
224
- net.inet.tcp.tso: 1
225
- net.inet.tcp.ecn_initiate_out: 0
226
- net.inet.tcp.ecn_negotiate_in: 0
227
- net.inet.tcp.packetchain: 50
228
- net.inet.tcp.socket_unlocked_on_output: 1
229
- net.inet.tcp.rfc3390: 1
230
- net.inet.tcp.min_iaj_win: 4
231
- net.inet.tcp.acc_iaj_react_limit: 200
232
- net.inet.tcp.sack: 1
233
- net.inet.tcp.sack_maxholes: 128
234
- net.inet.tcp.sack_globalmaxholes: 65536
235
- net.inet.tcp.sack_globalholes: 0
236
- net.inet.tcp.minmss: 216
237
- net.inet.tcp.minmssoverload: 0
238
- net.inet.tcp.do_tcpdrain: 0
239
- net.inet.tcp.pcbcount: 86
240
- net.inet.tcp.icmp_may_rst: 1
241
- net.inet.tcp.strict_rfc1948: 0
242
- net.inet.tcp.isn_reseed_interval: 0
243
- net.inet.tcp.background_io_enabled: 1
244
- net.inet.tcp.rtt_min: 100
245
- net.inet.tcp.rexmt_slop: 200
246
- net.inet.tcp.randomize_ports: 0
247
- net.inet.tcp.newreno_sockets: 81
248
- net.inet.tcp.background_sockets: -1
249
- net.inet.tcp.tcbhashsize: 4096
250
- net.inet.tcp.background_io_trigger: 5
251
- net.inet.tcp.msl: 15000
252
- net.inet.tcp.max_persist_timeout: 0
253
- net.inet.tcp.always_keepalive: 0
254
- net.inet.tcp.timer_fastmode_idlemax: 20
255
- net.inet.tcp.broken_peer_syn_rxmit_thres: 7
256
- net.inet.tcp.tcp_timer_advanced: 5
257
- net.inet.tcp.tcp_resched_timerlist: 12209
258
- net.inet.tcp.pmtud_blackhole_detection: 1
259
- net.inet.tcp.pmtud_blackhole_mss: 1200
260
- net.inet.tcp.timer_fastquantum: 100
261
- net.inet.tcp.timer_slowquantum: 500
262
- net.inet.tcp.win_scale_factor: 3
263
- net.inet.tcp.in_sw_cksum: 5658081
264
- net.inet.tcp.in_sw_cksum_bytes: 2198681467
265
- net.inet.tcp.out_sw_cksum: 14166053
266
- net.inet.tcp.out_sw_cksum_bytes: 17732561863
267
- net.inet.tcp.sockthreshold: 64
268
- net.inet.tcp.bg_target_qdelay: 100
269
- net.inet.tcp.bg_allowed_increase: 2
270
- net.inet.tcp.bg_tether_shift: 1
271
- net.inet.tcp.bg_ss_fltsz: 2
272
- net.inet.udp.checksum: 1
273
- net.inet.udp.maxdgram: 9216
274
- net.inet.udp.recvspace: 42080
275
- net.inet.udp.in_sw_cksum: 19639
276
- net.inet.udp.in_sw_cksum_bytes: 3928092
277
- net.inet.udp.out_sw_cksum: 17436
278
- net.inet.udp.out_sw_cksum_bytes: 2495444
279
- net.inet.udp.log_in_vain: 0
280
- net.inet.udp.blackhole: 0
281
- net.inet.udp.pcbcount: 72
282
- net.inet.udp.randomize_ports: 1
283
- net.inet.ipsec.def_policy: 1
284
- net.inet.ipsec.esp_trans_deflev: 1
285
- net.inet.ipsec.esp_net_deflev: 1
286
- net.inet.ipsec.ah_trans_deflev: 1
287
- net.inet.ipsec.ah_net_deflev: 1
288
- net.inet.ipsec.ah_cleartos: 1
289
- net.inet.ipsec.ah_offsetmask: 0
290
- net.inet.ipsec.dfbit: 0
291
- net.inet.ipsec.ecn: 0
292
- net.inet.ipsec.debug: 0
293
- net.inet.ipsec.esp_randpad: -1
294
- net.inet.ipsec.bypass: 0
295
- net.inet.ipsec.esp_port: 4500
296
- net.inet.raw.maxdgram: 8192
297
- net.inet.raw.recvspace: 8192
298
- net.link.generic.system.ifcount: 10
299
- net.link.generic.system.dlil_verbose: 0
300
- net.link.generic.system.multi_threaded_input: 1
301
- net.link.generic.system.dlil_input_sanity_check: 0
302
- net.link.ether.inet.prune_intvl: 300
303
- net.link.ether.inet.max_age: 1200
304
- net.link.ether.inet.host_down_time: 20
305
- net.link.ether.inet.apple_hwcksum_tx: 1
306
- net.link.ether.inet.apple_hwcksum_rx: 1
307
- net.link.ether.inet.arp_llreach_base: 30
308
- net.link.ether.inet.maxtries: 5
309
- net.link.ether.inet.useloopback: 1
310
- net.link.ether.inet.proxyall: 0
311
- net.link.ether.inet.sendllconflict: 0
312
- net.link.ether.inet.log_arp_warnings: 0
313
- net.link.ether.inet.keep_announcements: 1
314
- net.link.ether.inet.send_conflicting_probes: 1
315
- net.link.bridge.log_stp: 0
316
- net.link.bridge.debug: 0
317
- net.key.debug: 0
318
- net.key.spi_trycnt: 1000
319
- net.key.spi_minval: 256
320
- net.key.spi_maxval: 268435455
321
- net.key.int_random: 60
322
- net.key.larval_lifetime: 30
323
- net.key.blockacq_count: 10
324
- net.key.blockacq_lifetime: 20
325
- net.key.esp_keymin: 256
326
- net.key.esp_auth: 0
327
- net.key.ah_keymin: 128
328
- net.key.prefered_oldsa: 0
329
- net.key.natt_keepalive_interval: 20
330
- net.inet6.ip6.forwarding: 0
331
- net.inet6.ip6.redirect: 1
332
- net.inet6.ip6.hlim: 64
333
- net.inet6.ip6.maxfragpackets: 1536
334
- net.inet6.ip6.accept_rtadv: 0
335
- net.inet6.ip6.keepfaith: 0
336
- net.inet6.ip6.log_interval: 5
337
- net.inet6.ip6.hdrnestlimit: 15
338
- net.inet6.ip6.dad_count: 1
339
- net.inet6.ip6.auto_flowlabel: 1
340
- net.inet6.ip6.defmcasthlim: 1
341
- net.inet6.ip6.gifhlim: 0
342
- net.inet6.ip6.kame_version: 2009/apple-darwin
343
- net.inet6.ip6.use_deprecated: 1
344
- net.inet6.ip6.rr_prune: 5
345
- net.inet6.ip6.v6only: 0
346
- net.inet6.ip6.rtexpire: 3600
347
- net.inet6.ip6.rtminexpire: 10
348
- net.inet6.ip6.rtmaxcache: 128
349
- net.inet6.ip6.use_tempaddr: 1
350
- net.inet6.ip6.temppltime: 86400
351
- net.inet6.ip6.tempvltime: 604800
352
- net.inet6.ip6.auto_linklocal: 1
353
- net.inet6.ip6.prefer_tempaddr: 1
354
- net.inet6.ip6.use_defaultzone: 0
355
- net.inet6.ip6.maxfrags: 12288
356
- net.inet6.ip6.mcast_pmtu: 0
357
- net.inet6.ip6.neighborgcthresh: 1024
358
- net.inet6.ip6.maxifprefixes: 16
359
- net.inet6.ip6.maxifdefrouters: 16
360
- net.inet6.ip6.maxdynroutes: 1024
361
- net.inet6.ip6.fw.enable: 1
362
- net.inet6.ip6.fw.debug: 0
363
- net.inet6.ip6.fw.verbose: 0
364
- net.inet6.ip6.fw.verbose_limit: 0
365
- net.inet6.ip6.scopedroute: 1
366
- net.inet6.ip6.select_srcif_debug: 0
367
- net.inet6.ip6.mcast.maxgrpsrc: 512
368
- net.inet6.ip6.mcast.maxsocksrc: 128
369
- net.inet6.ip6.mcast.loop: 1
370
- net.inet6.ip6.only_allow_rfc4193_prefixes: 0
371
- net.inet6.ipsec6.def_policy: 1
372
- net.inet6.ipsec6.esp_trans_deflev: 1
373
- net.inet6.ipsec6.esp_net_deflev: 1
374
- net.inet6.ipsec6.ah_trans_deflev: 1
375
- net.inet6.ipsec6.ah_net_deflev: 1
376
- net.inet6.ipsec6.ecn: 0
377
- net.inet6.ipsec6.debug: 0
378
- net.inet6.ipsec6.esp_randpad: -1
379
- net.inet6.icmp6.rediraccept: 1
380
- net.inet6.icmp6.redirtimeout: 600
381
- net.inet6.icmp6.nd6_prune: 1
382
- net.inet6.icmp6.nd6_delay: 5
383
- net.inet6.icmp6.nd6_umaxtries: 3
384
- net.inet6.icmp6.nd6_mmaxtries: 3
385
- net.inet6.icmp6.nd6_useloopback: 1
386
- net.inet6.icmp6.nodeinfo: 3
387
- net.inet6.icmp6.errppslimit: 500
388
- net.inet6.icmp6.nd6_maxnudhint: 0
389
- net.inet6.icmp6.nd6_debug: 0
390
- net.inet6.icmp6.nd6_accept_6to4: 1
391
- net.inet6.icmp6.nd6_onlink_ns_rfc4861: 0
392
- net.inet6.icmp6.nd6_llreach_base: 30
393
- net.inet6.mld.gsrdelay: 10
394
- net.inet6.mld.v1enable: 1
395
- net.inet6.mld.use_allow: 1
396
- net.inet6.mld.debug: 0
397
- net.idle.route.expire_timeout: 30
398
- net.idle.route.drain_interval: 10
399
- net.statistics: 1
400
- net.alf.loglevel: 55
401
- net.alf.perm: 0
402
- net.alf.defaultaction: 1
403
- net.alf.mqcount: 0
404
- net.smb.fs.version: 107000
405
- net.smb.fs.loglevel: 0
406
- net.smb.fs.kern_ntlmssp: 0
407
- net.smb.fs.kern_deprecatePreXPServers: 1
408
- net.smb.fs.kern_deadtimer: 60
409
- net.smb.fs.kern_hard_deadtimer: 600
410
- net.smb.fs.kern_soft_deadtimer: 30
411
- net.smb.fs.tcpsndbuf: 261120
412
- net.smb.fs.tcprcvbuf: 261120
413
- DARWIN_SYSCTL
414
-
415
- @plugin = get_plugin("darwin/network")
416
- allow(@plugin).to receive(:collect_os).and_return(:darwin)
417
-
418
- # @stdin_ifconfig = StringIO.new
419
- # @stdin_arp = StringIO.new
420
- # @stdin_sysctl = StringIO.new
421
- # @stdin_netstat = StringIO.new
422
-
423
- # @ifconfig_lines = darwin_ifconfig.split("\n")
424
- # @arp_lines = darwin_arp.split("\n")
425
- # @netstat_lines = darwin_netstat.split("\n")
426
- # @sysctl_lines = darwin_sysctl.split("\n")
427
-
428
- allow(@plugin).to receive(:shell_out).with("route -n get default").and_return(mock_shell_out(0, @darwin_route, ""))
429
- allow(@plugin).to receive(:shell_out).with("netstat -i -d -l -b -n")
430
- end
431
-
432
- describe "gathering IP layer address info" do
433
- before do
434
- allow(@plugin).to receive(:shell_out).with("arp -an").and_return(mock_shell_out(0, @darwin_arp, ""))
435
- allow(@plugin).to receive(:shell_out).with("ifconfig -a").and_return(mock_shell_out(0, @darwin_ifconfig, ""))
436
- allow(@plugin).to receive(:shell_out).with("netstat -i -d -l -b -n").and_return(mock_shell_out(0, @darwin_netstat, ""))
437
- allow(@plugin).to receive(:shell_out).with("sysctl net").and_return(mock_shell_out(0, @darwin_sysctl, ""))
438
- @plugin.run
439
- end
440
-
441
- it "completes the run" do
442
- expect(@plugin["network"]).not_to be_nil
443
- end
444
-
445
- it "detects the interfaces" do
446
- expect(@plugin["network"]["interfaces"].keys.sort).to eq(%w{en0 en1 fw0 gif0 lo0 p2p0 stf0 utun0})
447
- end
448
-
449
- it "detects the ipv4 addresses of the ethernet interface" do
450
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"].keys).to include("10.20.10.144")
451
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["10.20.10.144"]["netmask"]).to eq("255.255.255.0")
452
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["10.20.10.144"]["broadcast"]).to eq("10.20.10.255")
453
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["10.20.10.144"]["family"]).to eq("inet")
454
- end
455
-
456
- it "detects the ipv6 addresses of the ethernet interface" do
457
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"].keys).to include("fe80::ba8d:12ff:fe3a:32de")
458
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["fe80::ba8d:12ff:fe3a:32de"]["scope"]).to eq("Link")
459
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["fe80::ba8d:12ff:fe3a:32de"]["prefixlen"]).to eq("64")
460
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["fe80::ba8d:12ff:fe3a:32de"]["family"]).to eq("inet6")
461
-
462
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"].keys).to include("2001:44b8:4186:1100:ba8d:12ff:fe3a:32de")
463
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["2001:44b8:4186:1100:ba8d:12ff:fe3a:32de"]["scope"]).to eq("Global")
464
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["2001:44b8:4186:1100:ba8d:12ff:fe3a:32de"]["prefixlen"]).to eq("64")
465
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["2001:44b8:4186:1100:ba8d:12ff:fe3a:32de"]["family"]).to eq("inet6")
466
- end
467
-
468
- it "detects the mac addresses of the ethernet interface" do
469
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"].keys).to include("b8:8d:12:3a:32:de")
470
- expect(@plugin["network"]["interfaces"]["en1"]["addresses"]["b8:8d:12:3a:32:de"]["family"]).to eq("lladdr")
471
- end
472
-
473
- it "detects the encapsulation type of the ethernet interface" do
474
- expect(@plugin["network"]["interfaces"]["en1"]["encapsulation"]).to eq("Ethernet")
475
- end
476
-
477
- it "detects the flags of the ethernet interface" do
478
- expect(@plugin["network"]["interfaces"]["en1"]["flags"].sort).to eq(%w{BROADCAST MULTICAST RUNNING SIMPLEX SMART UP})
479
- end
480
-
481
- it "detects the mtu of the ethernet interface" do
482
- expect(@plugin["network"]["interfaces"]["en1"]["mtu"]).to eq("1500")
483
- end
484
-
485
- it "detects the ipv4 addresses of the loopback interface" do
486
- expect(@plugin["network"]["interfaces"]["lo0"]["addresses"].keys).to include("127.0.0.1")
487
- expect(@plugin["network"]["interfaces"]["lo0"]["addresses"]["127.0.0.1"]["netmask"]).to eq("255.0.0.0")
488
- expect(@plugin["network"]["interfaces"]["lo0"]["addresses"]["127.0.0.1"]["family"]).to eq("inet")
489
- end
490
-
491
- it "detects the ipv6 addresses of the loopback interface" do
492
- expect(@plugin["network"]["interfaces"]["lo0"]["addresses"].keys).to include("::1")
493
- expect(@plugin["network"]["interfaces"]["lo0"]["addresses"]["::1"]["scope"]).to eq("Node")
494
- expect(@plugin["network"]["interfaces"]["lo0"]["addresses"]["::1"]["prefixlen"]).to eq("128")
495
- expect(@plugin["network"]["interfaces"]["lo0"]["addresses"]["::1"]["family"]).to eq("inet6")
496
- end
497
-
498
- it "detects the encapsulation type of the loopback interface" do
499
- expect(@plugin["network"]["interfaces"]["lo0"]["encapsulation"]).to eq("Loopback")
500
- end
501
-
502
- it "detects the flags of the ethernet interface" do
503
- expect(@plugin["network"]["interfaces"]["lo0"]["flags"].sort).to eq(%w{LOOPBACK MULTICAST RUNNING UP})
504
- end
505
-
506
- it "detects the mtu of the loopback interface" do
507
- expect(@plugin["network"]["interfaces"]["lo0"]["mtu"]).to eq("16384")
508
- end
509
-
510
- it "detects the arp entries" do
511
- expect(@plugin["network"]["interfaces"]["en1"]["arp"]["10.20.10.1"]).to eq("0:4:ed:de:41:bf")
512
- end
513
-
514
- it "detects the ethernet counters" do
515
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["tx"]["bytes"]).to eq("18228234970")
516
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["tx"]["packets"]).to eq("14314573")
517
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["tx"]["collisions"]).to eq("0")
518
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["tx"]["errors"]).to eq("0")
519
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["tx"]["carrier"]).to eq(0)
520
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["tx"]["drop"]).to eq(0)
521
-
522
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["rx"]["bytes"]).to eq("2530556736")
523
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["rx"]["packets"]).to eq("5921903")
524
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["rx"]["errors"]).to eq("0")
525
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["rx"]["overrun"]).to eq(0)
526
- expect(@plugin["counters"]["network"]["interfaces"]["en1"]["rx"]["drop"]).to eq(0)
527
- end
528
-
529
- it "detects the loopback counters" do
530
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["tx"]["bytes"]).to eq("25774844")
531
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["tx"]["packets"]).to eq("174982")
532
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["tx"]["collisions"]).to eq("0")
533
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["tx"]["errors"]).to eq("0")
534
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["tx"]["carrier"]).to eq(0)
535
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["tx"]["drop"]).to eq(0)
536
-
537
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["rx"]["bytes"]).to eq("25774844")
538
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["rx"]["packets"]).to eq("174982")
539
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["rx"]["errors"]).to eq("0")
540
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["rx"]["overrun"]).to eq(0)
541
- expect(@plugin["counters"]["network"]["interfaces"]["lo0"]["rx"]["drop"]).to eq(0)
542
- end
543
-
544
- it "finds the default interface by asking which iface has the default route" do
545
- expect(@plugin["network"][:default_interface]).to eq("en1")
546
- end
547
-
548
- it "finds the default interface by asking which iface has the default route" do
549
- expect(@plugin["network"][:default_gateway]).to eq("10.20.10.1")
550
- end
551
-
552
- it "detects network settings" do
553
- expect(@plugin["network"]["settings"]["net.local.stream.sendspace"]).to eq("8192")
554
- expect(@plugin["network"]["settings"]["net.local.stream.recvspace"]).to eq("8192")
555
- expect(@plugin["network"]["settings"]["net.local.stream.tracemdns"]).to eq("0")
556
- expect(@plugin["network"]["settings"]["net.local.dgram.maxdgram"]).to eq("2048")
557
- expect(@plugin["network"]["settings"]["net.local.dgram.recvspace"]).to eq("4096")
558
- expect(@plugin["network"]["settings"]["net.local.inflight"]).to eq("0")
559
- expect(@plugin["network"]["settings"]["net.inet.ip.portrange.lowfirst"]).to eq("1023")
560
- expect(@plugin["network"]["settings"]["net.inet.ip.portrange.lowlast"]).to eq("600")
561
- expect(@plugin["network"]["settings"]["net.inet.ip.portrange.first"]).to eq("49152")
562
- expect(@plugin["network"]["settings"]["net.inet.ip.portrange.last"]).to eq("65535")
563
- expect(@plugin["network"]["settings"]["net.inet.ip.portrange.hifirst"]).to eq("49152")
564
- expect(@plugin["network"]["settings"]["net.inet.ip.portrange.hilast"]).to eq("65535")
565
- expect(@plugin["network"]["settings"]["net.inet.ip.forwarding"]).to eq("1")
566
- expect(@plugin["network"]["settings"]["net.inet.ip.redirect"]).to eq("1")
567
- expect(@plugin["network"]["settings"]["net.inet.ip.ttl"]).to eq("64")
568
- expect(@plugin["network"]["settings"]["net.inet.ip.rtexpire"]).to eq("12")
569
- expect(@plugin["network"]["settings"]["net.inet.ip.rtminexpire"]).to eq("10")
570
- expect(@plugin["network"]["settings"]["net.inet.ip.rtmaxcache"]).to eq("128")
571
- expect(@plugin["network"]["settings"]["net.inet.ip.sourceroute"]).to eq("0")
572
- expect(@plugin["network"]["settings"]["net.inet.ip.intr_queue_maxlen"]).to eq("50")
573
- expect(@plugin["network"]["settings"]["net.inet.ip.intr_queue_drops"]).to eq("0")
574
- expect(@plugin["network"]["settings"]["net.inet.ip.accept_sourceroute"]).to eq("0")
575
- expect(@plugin["network"]["settings"]["net.inet.ip.keepfaith"]).to eq("0")
576
- expect(@plugin["network"]["settings"]["net.inet.ip.gifttl"]).to eq("30")
577
- expect(@plugin["network"]["settings"]["net.inet.ip.subnets_are_local"]).to eq("0")
578
- expect(@plugin["network"]["settings"]["net.inet.ip.mcast.maxgrpsrc"]).to eq("512")
579
- expect(@plugin["network"]["settings"]["net.inet.ip.mcast.maxsocksrc"]).to eq("128")
580
- expect(@plugin["network"]["settings"]["net.inet.ip.mcast.loop"]).to eq("1")
581
- expect(@plugin["network"]["settings"]["net.inet.ip.check_route_selfref"]).to eq("1")
582
- expect(@plugin["network"]["settings"]["net.inet.ip.use_route_genid"]).to eq("1")
583
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.hash_size"]).to eq("64")
584
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.curr_time"]).to eq("0")
585
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.ready_heap"]).to eq("0")
586
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.extract_heap"]).to eq("0")
587
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.searches"]).to eq("0")
588
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.search_steps"]).to eq("0")
589
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.expire"]).to eq("1")
590
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.max_chain_len"]).to eq("16")
591
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.red_lookup_depth"]).to eq("256")
592
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.red_avg_pkt_size"]).to eq("512")
593
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.red_max_pkt_size"]).to eq("1500")
594
- expect(@plugin["network"]["settings"]["net.inet.ip.dummynet.debug"]).to eq("0")
595
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.enable"]).to eq("1")
596
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.autoinc_step"]).to eq("100")
597
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.one_pass"]).to eq("0")
598
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.debug"]).to eq("0")
599
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.verbose"]).to eq("0")
600
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.verbose_limit"]).to eq("0")
601
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_buckets"]).to eq("256")
602
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.curr_dyn_buckets"]).to eq("256")
603
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_count"]).to eq("0")
604
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_max"]).to eq("4096")
605
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.static_count"]).to eq("2")
606
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_ack_lifetime"]).to eq("300")
607
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_syn_lifetime"]).to eq("20")
608
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_fin_lifetime"]).to eq("1")
609
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_rst_lifetime"]).to eq("1")
610
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_udp_lifetime"]).to eq("10")
611
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_short_lifetime"]).to eq("5")
612
- expect(@plugin["network"]["settings"]["net.inet.ip.fw.dyn_keepalive"]).to eq("1")
613
- expect(@plugin["network"]["settings"]["net.inet.ip.maxfragpackets"]).to eq("1536")
614
- expect(@plugin["network"]["settings"]["net.inet.ip.maxfragsperpacket"]).to eq("128")
615
- expect(@plugin["network"]["settings"]["net.inet.ip.maxfrags"]).to eq("3072")
616
- expect(@plugin["network"]["settings"]["net.inet.ip.scopedroute"]).to eq("1")
617
- expect(@plugin["network"]["settings"]["net.inet.ip.check_interface"]).to eq("0")
618
- expect(@plugin["network"]["settings"]["net.inet.ip.linklocal.in.allowbadttl"]).to eq("1")
619
- expect(@plugin["network"]["settings"]["net.inet.ip.random_id"]).to eq("1")
620
- expect(@plugin["network"]["settings"]["net.inet.ip.maxchainsent"]).to eq("0")
621
- expect(@plugin["network"]["settings"]["net.inet.ip.select_srcif_debug"]).to eq("0")
622
- expect(@plugin["network"]["settings"]["net.inet.icmp.maskrepl"]).to eq("0")
623
- expect(@plugin["network"]["settings"]["net.inet.icmp.icmplim"]).to eq("250")
624
- expect(@plugin["network"]["settings"]["net.inet.icmp.timestamp"]).to eq("0")
625
- expect(@plugin["network"]["settings"]["net.inet.icmp.drop_redirect"]).to eq("0")
626
- expect(@plugin["network"]["settings"]["net.inet.icmp.log_redirect"]).to eq("0")
627
- expect(@plugin["network"]["settings"]["net.inet.icmp.bmcastecho"]).to eq("1")
628
- expect(@plugin["network"]["settings"]["net.inet.igmp.recvifkludge"]).to eq("1")
629
- expect(@plugin["network"]["settings"]["net.inet.igmp.sendra"]).to eq("1")
630
- expect(@plugin["network"]["settings"]["net.inet.igmp.sendlocal"]).to eq("1")
631
- expect(@plugin["network"]["settings"]["net.inet.igmp.v1enable"]).to eq("1")
632
- expect(@plugin["network"]["settings"]["net.inet.igmp.v2enable"]).to eq("1")
633
- expect(@plugin["network"]["settings"]["net.inet.igmp.legacysupp"]).to eq("0")
634
- expect(@plugin["network"]["settings"]["net.inet.igmp.default_version"]).to eq("3")
635
- expect(@plugin["network"]["settings"]["net.inet.igmp.gsrdelay"]).to eq("10")
636
- expect(@plugin["network"]["settings"]["net.inet.igmp.debug"]).to eq("0")
637
- expect(@plugin["network"]["settings"]["net.inet.tcp.rfc1323"]).to eq("1")
638
- expect(@plugin["network"]["settings"]["net.inet.tcp.rfc1644"]).to eq("0")
639
- expect(@plugin["network"]["settings"]["net.inet.tcp.mssdflt"]).to eq("512")
640
- expect(@plugin["network"]["settings"]["net.inet.tcp.keepidle"]).to eq("7200000")
641
- expect(@plugin["network"]["settings"]["net.inet.tcp.keepintvl"]).to eq("75000")
642
- expect(@plugin["network"]["settings"]["net.inet.tcp.sendspace"]).to eq("65536")
643
- expect(@plugin["network"]["settings"]["net.inet.tcp.recvspace"]).to eq("65536")
644
- expect(@plugin["network"]["settings"]["net.inet.tcp.keepinit"]).to eq("75000")
645
- expect(@plugin["network"]["settings"]["net.inet.tcp.v6mssdflt"]).to eq("1024")
646
- expect(@plugin["network"]["settings"]["net.inet.tcp.log_in_vain"]).to eq("0")
647
- expect(@plugin["network"]["settings"]["net.inet.tcp.blackhole"]).to eq("0")
648
- expect(@plugin["network"]["settings"]["net.inet.tcp.delayed_ack"]).to eq("3")
649
- expect(@plugin["network"]["settings"]["net.inet.tcp.tcp_lq_overflow"]).to eq("1")
650
- expect(@plugin["network"]["settings"]["net.inet.tcp.recvbg"]).to eq("0")
651
- expect(@plugin["network"]["settings"]["net.inet.tcp.drop_synfin"]).to eq("1")
652
- expect(@plugin["network"]["settings"]["net.inet.tcp.reass.maxsegments"]).to eq("3072")
653
- expect(@plugin["network"]["settings"]["net.inet.tcp.reass.cursegments"]).to eq("0")
654
- expect(@plugin["network"]["settings"]["net.inet.tcp.reass.overflows"]).to eq("0")
655
- expect(@plugin["network"]["settings"]["net.inet.tcp.slowlink_wsize"]).to eq("8192")
656
- expect(@plugin["network"]["settings"]["net.inet.tcp.maxseg_unacked"]).to eq("8")
657
- expect(@plugin["network"]["settings"]["net.inet.tcp.rfc3465"]).to eq("1")
658
- expect(@plugin["network"]["settings"]["net.inet.tcp.rfc3465_lim2"]).to eq("1")
659
- expect(@plugin["network"]["settings"]["net.inet.tcp.rtt_samples_per_slot"]).to eq("20")
660
- expect(@plugin["network"]["settings"]["net.inet.tcp.recv_allowed_iaj"]).to eq("5")
661
- expect(@plugin["network"]["settings"]["net.inet.tcp.acc_iaj_high_thresh"]).to eq("100")
662
- expect(@plugin["network"]["settings"]["net.inet.tcp.rexmt_thresh"]).to eq("2")
663
- expect(@plugin["network"]["settings"]["net.inet.tcp.path_mtu_discovery"]).to eq("1")
664
- expect(@plugin["network"]["settings"]["net.inet.tcp.slowstart_flightsize"]).to eq("1")
665
- expect(@plugin["network"]["settings"]["net.inet.tcp.local_slowstart_flightsize"]).to eq("8")
666
- expect(@plugin["network"]["settings"]["net.inet.tcp.tso"]).to eq("1")
667
- expect(@plugin["network"]["settings"]["net.inet.tcp.ecn_initiate_out"]).to eq("0")
668
- expect(@plugin["network"]["settings"]["net.inet.tcp.ecn_negotiate_in"]).to eq("0")
669
- expect(@plugin["network"]["settings"]["net.inet.tcp.packetchain"]).to eq("50")
670
- expect(@plugin["network"]["settings"]["net.inet.tcp.socket_unlocked_on_output"]).to eq("1")
671
- expect(@plugin["network"]["settings"]["net.inet.tcp.rfc3390"]).to eq("1")
672
- expect(@plugin["network"]["settings"]["net.inet.tcp.min_iaj_win"]).to eq("4")
673
- expect(@plugin["network"]["settings"]["net.inet.tcp.acc_iaj_react_limit"]).to eq("200")
674
- expect(@plugin["network"]["settings"]["net.inet.tcp.sack"]).to eq("1")
675
- expect(@plugin["network"]["settings"]["net.inet.tcp.sack_maxholes"]).to eq("128")
676
- expect(@plugin["network"]["settings"]["net.inet.tcp.sack_globalmaxholes"]).to eq("65536")
677
- expect(@plugin["network"]["settings"]["net.inet.tcp.sack_globalholes"]).to eq("0")
678
- expect(@plugin["network"]["settings"]["net.inet.tcp.minmss"]).to eq("216")
679
- expect(@plugin["network"]["settings"]["net.inet.tcp.minmssoverload"]).to eq("0")
680
- expect(@plugin["network"]["settings"]["net.inet.tcp.do_tcpdrain"]).to eq("0")
681
- expect(@plugin["network"]["settings"]["net.inet.tcp.pcbcount"]).to eq("86")
682
- expect(@plugin["network"]["settings"]["net.inet.tcp.icmp_may_rst"]).to eq("1")
683
- expect(@plugin["network"]["settings"]["net.inet.tcp.strict_rfc1948"]).to eq("0")
684
- expect(@plugin["network"]["settings"]["net.inet.tcp.isn_reseed_interval"]).to eq("0")
685
- expect(@plugin["network"]["settings"]["net.inet.tcp.background_io_enabled"]).to eq("1")
686
- expect(@plugin["network"]["settings"]["net.inet.tcp.rtt_min"]).to eq("100")
687
- expect(@plugin["network"]["settings"]["net.inet.tcp.rexmt_slop"]).to eq("200")
688
- expect(@plugin["network"]["settings"]["net.inet.tcp.randomize_ports"]).to eq("0")
689
- expect(@plugin["network"]["settings"]["net.inet.tcp.newreno_sockets"]).to eq("81")
690
- expect(@plugin["network"]["settings"]["net.inet.tcp.background_sockets"]).to eq("-1")
691
- expect(@plugin["network"]["settings"]["net.inet.tcp.tcbhashsize"]).to eq("4096")
692
- expect(@plugin["network"]["settings"]["net.inet.tcp.background_io_trigger"]).to eq("5")
693
- expect(@plugin["network"]["settings"]["net.inet.tcp.msl"]).to eq("15000")
694
- expect(@plugin["network"]["settings"]["net.inet.tcp.max_persist_timeout"]).to eq("0")
695
- expect(@plugin["network"]["settings"]["net.inet.tcp.always_keepalive"]).to eq("0")
696
- expect(@plugin["network"]["settings"]["net.inet.tcp.timer_fastmode_idlemax"]).to eq("20")
697
- expect(@plugin["network"]["settings"]["net.inet.tcp.broken_peer_syn_rxmit_thres"]).to eq("7")
698
- expect(@plugin["network"]["settings"]["net.inet.tcp.tcp_timer_advanced"]).to eq("5")
699
- expect(@plugin["network"]["settings"]["net.inet.tcp.tcp_resched_timerlist"]).to eq("12209")
700
- expect(@plugin["network"]["settings"]["net.inet.tcp.pmtud_blackhole_detection"]).to eq("1")
701
- expect(@plugin["network"]["settings"]["net.inet.tcp.pmtud_blackhole_mss"]).to eq("1200")
702
- expect(@plugin["network"]["settings"]["net.inet.tcp.timer_fastquantum"]).to eq("100")
703
- expect(@plugin["network"]["settings"]["net.inet.tcp.timer_slowquantum"]).to eq("500")
704
- expect(@plugin["network"]["settings"]["net.inet.tcp.win_scale_factor"]).to eq("3")
705
- expect(@plugin["network"]["settings"]["net.inet.tcp.sockthreshold"]).to eq("64")
706
- expect(@plugin["network"]["settings"]["net.inet.tcp.bg_target_qdelay"]).to eq("100")
707
- expect(@plugin["network"]["settings"]["net.inet.tcp.bg_allowed_increase"]).to eq("2")
708
- expect(@plugin["network"]["settings"]["net.inet.tcp.bg_tether_shift"]).to eq("1")
709
- expect(@plugin["network"]["settings"]["net.inet.tcp.bg_ss_fltsz"]).to eq("2")
710
- expect(@plugin["network"]["settings"]["net.inet.udp.checksum"]).to eq("1")
711
- expect(@plugin["network"]["settings"]["net.inet.udp.maxdgram"]).to eq("9216")
712
- expect(@plugin["network"]["settings"]["net.inet.udp.recvspace"]).to eq("42080")
713
- expect(@plugin["network"]["settings"]["net.inet.udp.log_in_vain"]).to eq("0")
714
- expect(@plugin["network"]["settings"]["net.inet.udp.blackhole"]).to eq("0")
715
- expect(@plugin["network"]["settings"]["net.inet.udp.pcbcount"]).to eq("72")
716
- expect(@plugin["network"]["settings"]["net.inet.udp.randomize_ports"]).to eq("1")
717
- expect(@plugin["network"]["settings"]["net.inet.ipsec.def_policy"]).to eq("1")
718
- expect(@plugin["network"]["settings"]["net.inet.ipsec.esp_trans_deflev"]).to eq("1")
719
- expect(@plugin["network"]["settings"]["net.inet.ipsec.esp_net_deflev"]).to eq("1")
720
- expect(@plugin["network"]["settings"]["net.inet.ipsec.ah_trans_deflev"]).to eq("1")
721
- expect(@plugin["network"]["settings"]["net.inet.ipsec.ah_net_deflev"]).to eq("1")
722
- expect(@plugin["network"]["settings"]["net.inet.ipsec.ah_cleartos"]).to eq("1")
723
- expect(@plugin["network"]["settings"]["net.inet.ipsec.ah_offsetmask"]).to eq("0")
724
- expect(@plugin["network"]["settings"]["net.inet.ipsec.dfbit"]).to eq("0")
725
- expect(@plugin["network"]["settings"]["net.inet.ipsec.ecn"]).to eq("0")
726
- expect(@plugin["network"]["settings"]["net.inet.ipsec.debug"]).to eq("0")
727
- expect(@plugin["network"]["settings"]["net.inet.ipsec.esp_randpad"]).to eq("-1")
728
- expect(@plugin["network"]["settings"]["net.inet.ipsec.bypass"]).to eq("0")
729
- expect(@plugin["network"]["settings"]["net.inet.ipsec.esp_port"]).to eq("4500")
730
- expect(@plugin["network"]["settings"]["net.inet.raw.maxdgram"]).to eq("8192")
731
- expect(@plugin["network"]["settings"]["net.inet.raw.recvspace"]).to eq("8192")
732
- expect(@plugin["network"]["settings"]["net.link.generic.system.ifcount"]).to eq("10")
733
- expect(@plugin["network"]["settings"]["net.link.generic.system.dlil_verbose"]).to eq("0")
734
- expect(@plugin["network"]["settings"]["net.link.generic.system.multi_threaded_input"]).to eq("1")
735
- expect(@plugin["network"]["settings"]["net.link.generic.system.dlil_input_sanity_check"]).to eq("0")
736
- expect(@plugin["network"]["settings"]["net.link.ether.inet.prune_intvl"]).to eq("300")
737
- expect(@plugin["network"]["settings"]["net.link.ether.inet.max_age"]).to eq("1200")
738
- expect(@plugin["network"]["settings"]["net.link.ether.inet.host_down_time"]).to eq("20")
739
- expect(@plugin["network"]["settings"]["net.link.ether.inet.apple_hwcksum_tx"]).to eq("1")
740
- expect(@plugin["network"]["settings"]["net.link.ether.inet.apple_hwcksum_rx"]).to eq("1")
741
- expect(@plugin["network"]["settings"]["net.link.ether.inet.arp_llreach_base"]).to eq("30")
742
- expect(@plugin["network"]["settings"]["net.link.ether.inet.maxtries"]).to eq("5")
743
- expect(@plugin["network"]["settings"]["net.link.ether.inet.useloopback"]).to eq("1")
744
- expect(@plugin["network"]["settings"]["net.link.ether.inet.proxyall"]).to eq("0")
745
- expect(@plugin["network"]["settings"]["net.link.ether.inet.sendllconflict"]).to eq("0")
746
- expect(@plugin["network"]["settings"]["net.link.ether.inet.log_arp_warnings"]).to eq("0")
747
- expect(@plugin["network"]["settings"]["net.link.ether.inet.keep_announcements"]).to eq("1")
748
- expect(@plugin["network"]["settings"]["net.link.ether.inet.send_conflicting_probes"]).to eq("1")
749
- expect(@plugin["network"]["settings"]["net.link.bridge.log_stp"]).to eq("0")
750
- expect(@plugin["network"]["settings"]["net.link.bridge.debug"]).to eq("0")
751
- expect(@plugin["network"]["settings"]["net.key.debug"]).to eq("0")
752
- expect(@plugin["network"]["settings"]["net.key.spi_trycnt"]).to eq("1000")
753
- expect(@plugin["network"]["settings"]["net.key.spi_minval"]).to eq("256")
754
- expect(@plugin["network"]["settings"]["net.key.spi_maxval"]).to eq("268435455")
755
- expect(@plugin["network"]["settings"]["net.key.int_random"]).to eq("60")
756
- expect(@plugin["network"]["settings"]["net.key.larval_lifetime"]).to eq("30")
757
- expect(@plugin["network"]["settings"]["net.key.blockacq_count"]).to eq("10")
758
- expect(@plugin["network"]["settings"]["net.key.blockacq_lifetime"]).to eq("20")
759
- expect(@plugin["network"]["settings"]["net.key.esp_keymin"]).to eq("256")
760
- expect(@plugin["network"]["settings"]["net.key.esp_auth"]).to eq("0")
761
- expect(@plugin["network"]["settings"]["net.key.ah_keymin"]).to eq("128")
762
- expect(@plugin["network"]["settings"]["net.key.prefered_oldsa"]).to eq("0")
763
- expect(@plugin["network"]["settings"]["net.key.natt_keepalive_interval"]).to eq("20")
764
- expect(@plugin["network"]["settings"]["net.inet6.ip6.forwarding"]).to eq("0")
765
- expect(@plugin["network"]["settings"]["net.inet6.ip6.redirect"]).to eq("1")
766
- expect(@plugin["network"]["settings"]["net.inet6.ip6.hlim"]).to eq("64")
767
- expect(@plugin["network"]["settings"]["net.inet6.ip6.maxfragpackets"]).to eq("1536")
768
- expect(@plugin["network"]["settings"]["net.inet6.ip6.accept_rtadv"]).to eq("0")
769
- expect(@plugin["network"]["settings"]["net.inet6.ip6.keepfaith"]).to eq("0")
770
- expect(@plugin["network"]["settings"]["net.inet6.ip6.log_interval"]).to eq("5")
771
- expect(@plugin["network"]["settings"]["net.inet6.ip6.hdrnestlimit"]).to eq("15")
772
- expect(@plugin["network"]["settings"]["net.inet6.ip6.dad_count"]).to eq("1")
773
- expect(@plugin["network"]["settings"]["net.inet6.ip6.auto_flowlabel"]).to eq("1")
774
- expect(@plugin["network"]["settings"]["net.inet6.ip6.defmcasthlim"]).to eq("1")
775
- expect(@plugin["network"]["settings"]["net.inet6.ip6.gifhlim"]).to eq("0")
776
- expect(@plugin["network"]["settings"]["net.inet6.ip6.kame_version"]).to eq("2009/apple-darwin")
777
- expect(@plugin["network"]["settings"]["net.inet6.ip6.use_deprecated"]).to eq("1")
778
- expect(@plugin["network"]["settings"]["net.inet6.ip6.rr_prune"]).to eq("5")
779
- expect(@plugin["network"]["settings"]["net.inet6.ip6.v6only"]).to eq("0")
780
- expect(@plugin["network"]["settings"]["net.inet6.ip6.rtexpire"]).to eq("3600")
781
- expect(@plugin["network"]["settings"]["net.inet6.ip6.rtminexpire"]).to eq("10")
782
- expect(@plugin["network"]["settings"]["net.inet6.ip6.rtmaxcache"]).to eq("128")
783
- expect(@plugin["network"]["settings"]["net.inet6.ip6.use_tempaddr"]).to eq("1")
784
- expect(@plugin["network"]["settings"]["net.inet6.ip6.temppltime"]).to eq("86400")
785
- expect(@plugin["network"]["settings"]["net.inet6.ip6.tempvltime"]).to eq("604800")
786
- expect(@plugin["network"]["settings"]["net.inet6.ip6.auto_linklocal"]).to eq("1")
787
- expect(@plugin["network"]["settings"]["net.inet6.ip6.prefer_tempaddr"]).to eq("1")
788
- expect(@plugin["network"]["settings"]["net.inet6.ip6.use_defaultzone"]).to eq("0")
789
- expect(@plugin["network"]["settings"]["net.inet6.ip6.maxfrags"]).to eq("12288")
790
- expect(@plugin["network"]["settings"]["net.inet6.ip6.mcast_pmtu"]).to eq("0")
791
- expect(@plugin["network"]["settings"]["net.inet6.ip6.neighborgcthresh"]).to eq("1024")
792
- expect(@plugin["network"]["settings"]["net.inet6.ip6.maxifprefixes"]).to eq("16")
793
- expect(@plugin["network"]["settings"]["net.inet6.ip6.maxifdefrouters"]).to eq("16")
794
- expect(@plugin["network"]["settings"]["net.inet6.ip6.maxdynroutes"]).to eq("1024")
795
- expect(@plugin["network"]["settings"]["net.inet6.ip6.fw.enable"]).to eq("1")
796
- expect(@plugin["network"]["settings"]["net.inet6.ip6.fw.debug"]).to eq("0")
797
- expect(@plugin["network"]["settings"]["net.inet6.ip6.fw.verbose"]).to eq("0")
798
- expect(@plugin["network"]["settings"]["net.inet6.ip6.fw.verbose_limit"]).to eq("0")
799
- expect(@plugin["network"]["settings"]["net.inet6.ip6.scopedroute"]).to eq("1")
800
- expect(@plugin["network"]["settings"]["net.inet6.ip6.select_srcif_debug"]).to eq("0")
801
- expect(@plugin["network"]["settings"]["net.inet6.ip6.mcast.maxgrpsrc"]).to eq("512")
802
- expect(@plugin["network"]["settings"]["net.inet6.ip6.mcast.maxsocksrc"]).to eq("128")
803
- expect(@plugin["network"]["settings"]["net.inet6.ip6.mcast.loop"]).to eq("1")
804
- expect(@plugin["network"]["settings"]["net.inet6.ip6.only_allow_rfc4193_prefixes"]).to eq("0")
805
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.def_policy"]).to eq("1")
806
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.esp_trans_deflev"]).to eq("1")
807
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.esp_net_deflev"]).to eq("1")
808
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.ah_trans_deflev"]).to eq("1")
809
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.ah_net_deflev"]).to eq("1")
810
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.ecn"]).to eq("0")
811
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.debug"]).to eq("0")
812
- expect(@plugin["network"]["settings"]["net.inet6.ipsec6.esp_randpad"]).to eq("-1")
813
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.rediraccept"]).to eq("1")
814
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.redirtimeout"]).to eq("600")
815
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_prune"]).to eq("1")
816
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_delay"]).to eq("5")
817
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_umaxtries"]).to eq("3")
818
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_mmaxtries"]).to eq("3")
819
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_useloopback"]).to eq("1")
820
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nodeinfo"]).to eq("3")
821
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.errppslimit"]).to eq("500")
822
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_maxnudhint"]).to eq("0")
823
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_debug"]).to eq("0")
824
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_accept_6to4"]).to eq("1")
825
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_onlink_ns_rfc4861"]).to eq("0")
826
- expect(@plugin["network"]["settings"]["net.inet6.icmp6.nd6_llreach_base"]).to eq("30")
827
- expect(@plugin["network"]["settings"]["net.inet6.mld.gsrdelay"]).to eq("10")
828
- expect(@plugin["network"]["settings"]["net.inet6.mld.v1enable"]).to eq("1")
829
- expect(@plugin["network"]["settings"]["net.inet6.mld.use_allow"]).to eq("1")
830
- expect(@plugin["network"]["settings"]["net.inet6.mld.debug"]).to eq("0")
831
- expect(@plugin["network"]["settings"]["net.idle.route.expire_timeout"]).to eq("30")
832
- expect(@plugin["network"]["settings"]["net.idle.route.drain_interval"]).to eq("10")
833
- expect(@plugin["network"]["settings"]["net.statistics"]).to eq("1")
834
- expect(@plugin["network"]["settings"]["net.alf.loglevel"]).to eq("55")
835
- expect(@plugin["network"]["settings"]["net.alf.perm"]).to eq("0")
836
- expect(@plugin["network"]["settings"]["net.alf.defaultaction"]).to eq("1")
837
- expect(@plugin["network"]["settings"]["net.alf.mqcount"]).to eq("0")
838
- expect(@plugin["network"]["settings"]["net.smb.fs.version"]).to eq("107000")
839
- expect(@plugin["network"]["settings"]["net.smb.fs.loglevel"]).to eq("0")
840
- expect(@plugin["network"]["settings"]["net.smb.fs.kern_ntlmssp"]).to eq("0")
841
- expect(@plugin["network"]["settings"]["net.smb.fs.kern_deprecatePreXPServers"]).to eq("1")
842
- expect(@plugin["network"]["settings"]["net.smb.fs.kern_deadtimer"]).to eq("60")
843
- expect(@plugin["network"]["settings"]["net.smb.fs.kern_hard_deadtimer"]).to eq("600")
844
- expect(@plugin["network"]["settings"]["net.smb.fs.kern_soft_deadtimer"]).to eq("30")
845
- expect(@plugin["network"]["settings"]["net.smb.fs.tcpsndbuf"]).to eq("261120")
846
- expect(@plugin["network"]["settings"]["net.smb.fs.tcprcvbuf"]).to eq("261120")
847
- end
848
- end
849
- end