yajl-ruby 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yajl-ruby might be problematic. Click here for more details.

data/ext/yajl_ext.h CHANGED
@@ -1,11 +1,34 @@
1
+ /*
2
+ * Copyright (c) 2008-2009 Brian Lopez - http://github.com/brianmario
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining
5
+ * a copy of this software and associated documentation files (the
6
+ * "Software"), to deal in the Software without restriction, including
7
+ * without limitation the rights to use, copy, modify, merge, publish,
8
+ * distribute, sublicense, and/or sell copies of the Software, and to
9
+ * permit persons to whom the Software is furnished to do so, subject to
10
+ * the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be
13
+ * included in all copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ */
23
+
1
24
  #include "api/yajl_parse.h"
2
25
  #include "api/yajl_gen.h"
3
26
  #include <ruby.h>
4
27
 
5
- #define READ_BUFSIZE 8092
6
- #define WRITE_BUFSIZE 8092
28
+ #define READ_BUFSIZE 8192
29
+ #define WRITE_BUFSIZE 8192
7
30
 
8
- // Older versions of Ruby (< 1.8.6) need these
31
+ /* Older versions of Ruby (< 1.8.6) need these */
9
32
  #ifndef RSTRING_PTR
10
33
  #define RSTRING_PTR(s) (RSTRING(s)->ptr)
11
34
  #endif
@@ -24,8 +47,8 @@ static ID intern_io_read, intern_eof, intern_call, intern_keys, intern_to_s,
24
47
  intern_to_json, intern_has_key, intern_to_sym;
25
48
  static ID sym_allow_comments, sym_check_utf8, sym_pretty, sym_indent, sym_terminator, sym_symbolize_keys;
26
49
 
27
- #define GetParser(obj, sval) (sval = (struct yajl_parser_wrapper*)DATA_PTR(obj));
28
- #define GetEncoder(obj, sval) (sval = (struct yajl_encoder_wrapper*)DATA_PTR(obj));
50
+ #define GetParser(obj, sval) (sval = (yajl_parser_wrapper*)DATA_PTR(obj));
51
+ #define GetEncoder(obj, sval) (sval = (yajl_encoder_wrapper*)DATA_PTR(obj));
29
52
 
30
53
  inline void yajl_check_and_fire_callback(void * ctx);
31
54
  inline void yajl_set_static_value(void * ctx, VALUE val);
@@ -56,7 +79,7 @@ static yajl_callbacks callbacks = {
56
79
  yajl_found_end_array
57
80
  };
58
81
 
59
- struct yajl_parser_wrapper {
82
+ typedef struct {
60
83
  VALUE builderStack;
61
84
  VALUE parse_complete_callback;
62
85
  int nestedArrayLevel;
@@ -64,13 +87,13 @@ struct yajl_parser_wrapper {
64
87
  int objectsFound;
65
88
  int symbolizeKeys;
66
89
  yajl_handle parser;
67
- };
90
+ } yajl_parser_wrapper;
68
91
 
69
- struct yajl_encoder_wrapper {
92
+ typedef struct {
70
93
  VALUE on_progress_callback;
71
94
  VALUE terminator;
72
95
  yajl_gen encoder;
73
- };
96
+ } yajl_encoder_wrapper;
74
97
 
75
98
  static VALUE rb_yajl_parser_new(int argc, VALUE * argv, VALUE self);
76
99
  static VALUE rb_yajl_parser_init(int argc, VALUE * argv, VALUE self);
@@ -1,6 +1,7 @@
1
1
  # encoding: UTF-8
2
2
  require 'socket' unless defined?(Socket)
3
3
  require 'yajl' unless defined?(Yajl::Parser)
4
+ require 'uri' unless defined?(URI)
4
5
 
5
6
  module Yajl
6
7
  # This module is for making HTTP requests to which the response bodies (and possibly requests in the near future)
@@ -20,20 +21,58 @@ module Yajl
20
21
  request("GET", uri, opts, &block)
21
22
  end
22
23
 
24
+ # Makes a basic HTTP GET request to the URI provided allowing the user to terminate the connection
25
+ def get(uri, opts = {}, &block)
26
+ initialize_socket(uri, opts)
27
+ HttpStream::get(uri, opts, &block)
28
+ rescue IOError => e
29
+ raise e unless @intentional_termination
30
+ end
31
+
23
32
  # Makes a basic HTTP POST request to the URI provided
24
33
  def self.post(uri, body, opts = {}, &block)
25
34
  request("POST", uri, opts.merge({:body => body}), &block)
26
35
  end
27
36
 
37
+ # Makes a basic HTTP POST request to the URI provided allowing the user to terminate the connection
38
+ def post(uri, body, opts = {}, &block)
39
+ initialize_socket(uri, opts)
40
+ HttpStream::post(uri, body, opts, &block)
41
+ rescue IOError => e
42
+ raise e unless @intentional_termination
43
+ end
44
+
28
45
  # Makes a basic HTTP PUT request to the URI provided
29
46
  def self.put(uri, body, opts = {}, &block)
30
47
  request("PUT", uri, opts.merge({:body => body}), &block)
31
48
  end
32
49
 
50
+ # Makes a basic HTTP PUT request to the URI provided allowing the user to terminate the connection
51
+ def put(uri, body, opts = {}, &block)
52
+ initialize_socket(uri, opts)
53
+ HttpStream::put(uri, body, opts, &block)
54
+ rescue IOError => e
55
+ raise e unless @intentional_termination
56
+ end
57
+
33
58
  # Makes a basic HTTP DELETE request to the URI provided
34
59
  def self.delete(uri, opts = {}, &block)
35
60
  request("DELETE", uri, opts, &block)
36
61
  end
62
+
63
+ # Makes a basic HTTP DELETE request to the URI provided allowing the user to terminate the connection
64
+ def delete(uri, opts = {}, &block)
65
+ initialize_socket(uri, opts)
66
+ HttpStream::delete(uri, opts, &block)
67
+ rescue IOError => e
68
+ raise e unless @intentional_termination
69
+ end
70
+
71
+ # Terminate a running HTTPStream instance
72
+ def terminate
73
+ @intentional_termination = true
74
+ @socket.close
75
+ end
37
76
 
38
77
  protected
39
78
  def self.request(method, uri, opts = {}, &block)
@@ -41,9 +80,12 @@ module Yajl
41
80
  if method == "POST" || method == "PUT"
42
81
  content_type = opts.has_key?('Content-Type') ? opts.delete(['Content-Type']) : "application/x-www-form-urlencoded"
43
82
  body = opts.delete(:body)
83
+ if body.is_a?(Hash)
84
+ body = body.keys.collect {|param| "#{URI.escape(param.to_s)}=#{URI.escape(body[param].to_s)}"}.join('&')
85
+ end
44
86
  end
45
87
 
46
- socket = TCPSocket.new(uri.host, uri.port)
88
+ socket = opts.has_key?(:socket) ? opts.delete(:socket) : TCPSocket.new(uri.host, uri.port)
47
89
  request = "#{method} #{uri.path}#{uri.query ? "?"+uri.query : nil} HTTP/1.1\r\n"
48
90
  request << "Host: #{uri.host}\r\n"
49
91
  request << "Authorization: Basic #{[uri.userinfo].pack('m').strip!}\r\n" unless uri.userinfo.nil?
@@ -53,7 +95,6 @@ module Yajl
53
95
  request << "Content-Length: #{body.length}\r\n"
54
96
  request << "Content-Type: #{content_type}\r\n"
55
97
  end
56
- request << "Connection: close\r\n"
57
98
  encodings = []
58
99
  encodings << "bzip2" if defined?(Yajl::Bzip2)
59
100
  encodings << "gzip" if defined?(Yajl::Gzip)
@@ -121,7 +162,15 @@ module Yajl
121
162
  end
122
163
  end
123
164
  ensure
124
- socket.close
165
+ socket.close unless socket.closed?
125
166
  end
167
+
168
+ private
169
+ # Initialize socket and add it to the opts
170
+ def initialize_socket(uri, opts = {})
171
+ @socket = TCPSocket.new(uri.host, uri.port)
172
+ opts.merge!({:socket => @socket})
173
+ @intentional_termination = false
174
+ end
126
175
  end
127
176
  end
@@ -0,0 +1,11 @@
1
+ HTTP/1.1 200 OK
2
+ Content-Type: application/json
3
+ Transfer-Encoding: chunked
4
+
5
+ 12f
6
+ {"item": {"name": "generated", "cached_tag_list": "", "updated_at": "2009-03-24T05:25:09Z", "updated_by_id": null, "price": 1.99, "delta": false, "cost": 0.597, "account_id": 16, "unit": null, "import_tag": null, "taxable": true, "id": 1, "created_by_id": null, "description": null, "company_id": 0, "sk
7
+
8
+ 48
9
+ u": "06317-0306", "created_at": "2009-03-24T05:25:09Z", "active": true}}
10
+
11
+ 0
@@ -0,0 +1,1220 @@
1
+ HTTP/1.1 406 Not Acceptable
2
+ Content-Type: text/html; charset=iso-8859-1
3
+ Server: Jetty(6.1.17)
4
+
5
+ {
6
+ "command": {
7
+ "ps": "ps -ef"
8
+ },
9
+ "kernel": {
10
+ "modules": {
11
+ "org.virtualbox.kext.VBoxDrv": {
12
+ "size": 118784,
13
+ "version": "2.2.0",
14
+ "index": "114",
15
+ "refcount": "3"
16
+ },
17
+ "com.cisco.nke.ipsec": {
18
+ "size": 454656,
19
+ "version": "2.0.1",
20
+ "index": "111",
21
+ "refcount": "0"
22
+ },
23
+ "com.apple.driver.AppleAPIC": {
24
+ "size": 12288,
25
+ "version": "1.4",
26
+ "index": "26",
27
+ "refcount": "0"
28
+ },
29
+ "com.apple.driver.AirPort.Atheros": {
30
+ "size": 593920,
31
+ "version": "318.8.3",
32
+ "index": "88",
33
+ "refcount": "0"
34
+ },
35
+ "com.apple.driver.AppleIntelCPUPowerManagement": {
36
+ "size": 102400,
37
+ "version": "59.0.1",
38
+ "index": "22",
39
+ "refcount": "0"
40
+ },
41
+ "com.apple.iokit.IOStorageFamily": {
42
+ "size": 98304,
43
+ "version": "1.5.5",
44
+ "index": "44",
45
+ "refcount": "9"
46
+ },
47
+ "com.apple.iokit.IOATAPIProtocolTransport": {
48
+ "size": 16384,
49
+ "version": "1.5.2",
50
+ "index": "52",
51
+ "refcount": "0"
52
+ },
53
+ "com.apple.iokit.IOPCIFamily": {
54
+ "size": 65536,
55
+ "version": "2.5",
56
+ "index": "17",
57
+ "refcount": "18"
58
+ },
59
+ "com.apple.driver.AppleHPET": {
60
+ "size": 12288,
61
+ "version": "1.3",
62
+ "index": "33",
63
+ "refcount": "0"
64
+ },
65
+ "com.apple.driver.AppleUSBHub": {
66
+ "size": 49152,
67
+ "version": "3.2.7",
68
+ "index": "47",
69
+ "refcount": "0"
70
+ },
71
+ "com.apple.iokit.IOFireWireFamily": {
72
+ "size": 258048,
73
+ "version": "3.4.6",
74
+ "index": "49",
75
+ "refcount": "2"
76
+ },
77
+ "com.apple.driver.AppleUSBComposite": {
78
+ "size": 16384,
79
+ "version": "3.2.0",
80
+ "index": "60",
81
+ "refcount": "1"
82
+ },
83
+ "com.apple.driver.AppleIntelPIIXATA": {
84
+ "size": 36864,
85
+ "version": "2.0.0",
86
+ "index": "41",
87
+ "refcount": "0"
88
+ },
89
+ "com.apple.driver.AppleSmartBatteryManager": {
90
+ "size": 28672,
91
+ "version": "158.6.0",
92
+ "index": "32",
93
+ "refcount": "0"
94
+ },
95
+ "com.apple.filesystems.udf": {
96
+ "size": 233472,
97
+ "version": "2.0.2",
98
+ "index": "119",
99
+ "refcount": "0"
100
+ },
101
+ "com.apple.iokit.IOSMBusFamily": {
102
+ "size": 12288,
103
+ "version": "1.1",
104
+ "index": "27",
105
+ "refcount": "2"
106
+ },
107
+ "com.apple.iokit.IOACPIFamily": {
108
+ "size": 16384,
109
+ "version": "1.2.0",
110
+ "index": "18",
111
+ "refcount": "10"
112
+ },
113
+ "foo.tap": {
114
+ "size": 24576,
115
+ "version": "1.0",
116
+ "index": "113",
117
+ "refcount": "0"
118
+ },
119
+ "com.vmware.kext.vmx86": {
120
+ "size": 864256,
121
+ "version": "2.0.4",
122
+ "index": "104",
123
+ "refcount": "0"
124
+ },
125
+ "com.apple.iokit.CHUDUtils": {
126
+ "size": 28672,
127
+ "version": "200",
128
+ "index": "98",
129
+ "refcount": "0"
130
+ },
131
+ "org.virtualbox.kext.VBoxNetAdp": {
132
+ "size": 8192,
133
+ "version": "2.2.0",
134
+ "index": "117",
135
+ "refcount": "0"
136
+ },
137
+ "com.apple.filesystems.autofs": {
138
+ "size": 45056,
139
+ "version": "2.0.1",
140
+ "index": "109",
141
+ "refcount": "0"
142
+ },
143
+ "com.vmware.kext.vmnet": {
144
+ "size": 36864,
145
+ "version": "2.0.4",
146
+ "index": "108",
147
+ "refcount": "0"
148
+ },
149
+ "com.apple.driver.AppleACPIButtons": {
150
+ "size": 16384,
151
+ "version": "1.2.4",
152
+ "index": "30",
153
+ "refcount": "0"
154
+ },
155
+ "com.apple.driver.AppleFWOHCI": {
156
+ "size": 139264,
157
+ "version": "3.7.2",
158
+ "index": "50",
159
+ "refcount": "0"
160
+ },
161
+ "com.apple.iokit.IOSCSIArchitectureModelFamily": {
162
+ "size": 102400,
163
+ "version": "2.0.5",
164
+ "index": "51",
165
+ "refcount": "4"
166
+ },
167
+ "com.apple.iokit.IOSCSIBlockCommandsDevice": {
168
+ "size": 90112,
169
+ "version": "2.0.5",
170
+ "index": "57",
171
+ "refcount": "1"
172
+ },
173
+ "com.apple.driver.AppleACPIPCI": {
174
+ "size": 12288,
175
+ "version": "1.2.4",
176
+ "index": "31",
177
+ "refcount": "0"
178
+ },
179
+ "com.apple.security.seatbelt": {
180
+ "size": 98304,
181
+ "version": "107.10",
182
+ "index": "25",
183
+ "refcount": "0"
184
+ },
185
+ "com.apple.driver.AppleUpstreamUserClient": {
186
+ "size": 16384,
187
+ "version": "2.7.2",
188
+ "index": "100",
189
+ "refcount": "0"
190
+ },
191
+ "com.apple.kext.OSvKernDSPLib": {
192
+ "size": 12288,
193
+ "version": "1.1",
194
+ "index": "79",
195
+ "refcount": "1"
196
+ },
197
+ "com.apple.iokit.IOBDStorageFamily": {
198
+ "size": 20480,
199
+ "version": "1.5",
200
+ "index": "58",
201
+ "refcount": "1"
202
+ },
203
+ "com.apple.iokit.IOGraphicsFamily": {
204
+ "size": 118784,
205
+ "version": "1.7.1",
206
+ "index": "70",
207
+ "refcount": "5"
208
+ },
209
+ "com.apple.iokit.IONetworkingFamily": {
210
+ "size": 90112,
211
+ "version": "1.6.1",
212
+ "index": "82",
213
+ "refcount": "4"
214
+ },
215
+ "com.apple.iokit.IOATAFamily": {
216
+ "size": 53248,
217
+ "version": "2.0.0",
218
+ "index": "40",
219
+ "refcount": "2"
220
+ },
221
+ "com.apple.iokit.IOUSBHIDDriver": {
222
+ "size": 20480,
223
+ "version": "3.2.2",
224
+ "index": "63",
225
+ "refcount": "2"
226
+ },
227
+ "org.virtualbox.kext.VBoxUSB": {
228
+ "size": 28672,
229
+ "version": "2.2.0",
230
+ "index": "115",
231
+ "refcount": "0"
232
+ },
233
+ "com.vmware.kext.vmioplug": {
234
+ "size": 24576,
235
+ "version": "2.0.4",
236
+ "index": "107",
237
+ "refcount": "0"
238
+ },
239
+ "com.apple.security.TMSafetyNet": {
240
+ "size": 12288,
241
+ "version": "3",
242
+ "index": "23",
243
+ "refcount": "0"
244
+ },
245
+ "com.apple.iokit.IONDRVSupport": {
246
+ "size": 57344,
247
+ "version": "1.7.1",
248
+ "index": "71",
249
+ "refcount": "3"
250
+ },
251
+ "com.apple.BootCache": {
252
+ "size": 20480,
253
+ "version": "30.3",
254
+ "index": "20",
255
+ "refcount": "0"
256
+ },
257
+ "com.apple.iokit.IOUSBUserClient": {
258
+ "size": 8192,
259
+ "version": "3.2.4",
260
+ "index": "46",
261
+ "refcount": "1"
262
+ },
263
+ "com.apple.iokit.IOSCSIMultimediaCommandsDevice": {
264
+ "size": 90112,
265
+ "version": "2.0.5",
266
+ "index": "59",
267
+ "refcount": "0"
268
+ },
269
+ "com.apple.driver.AppleIRController": {
270
+ "size": 20480,
271
+ "version": "110",
272
+ "index": "78",
273
+ "refcount": "0"
274
+ },
275
+ "com.apple.driver.AudioIPCDriver": {
276
+ "size": 16384,
277
+ "version": "1.0.5",
278
+ "index": "81",
279
+ "refcount": "0"
280
+ },
281
+ "org.virtualbox.kext.VBoxNetFlt": {
282
+ "size": 16384,
283
+ "version": "2.2.0",
284
+ "index": "116",
285
+ "refcount": "0"
286
+ },
287
+ "com.apple.driver.AppleLPC": {
288
+ "size": 12288,
289
+ "version": "1.2.11",
290
+ "index": "73",
291
+ "refcount": "0"
292
+ },
293
+ "com.apple.iokit.CHUDKernLib": {
294
+ "size": 20480,
295
+ "version": "196",
296
+ "index": "93",
297
+ "refcount": "2"
298
+ },
299
+ "com.apple.iokit.CHUDProf": {
300
+ "size": 49152,
301
+ "version": "207",
302
+ "index": "97",
303
+ "refcount": "0"
304
+ },
305
+ "com.apple.NVDAResman": {
306
+ "size": 2478080,
307
+ "version": "5.3.6",
308
+ "index": "90",
309
+ "refcount": "2"
310
+ },
311
+ "com.apple.driver.AppleACPIEC": {
312
+ "size": 20480,
313
+ "version": "1.2.4",
314
+ "index": "28",
315
+ "refcount": "0"
316
+ },
317
+ "foo.tun": {
318
+ "size": 24576,
319
+ "version": "1.0",
320
+ "index": "118",
321
+ "refcount": "0"
322
+ },
323
+ "com.apple.iokit.IOSerialFamily": {
324
+ "size": 36864,
325
+ "version": "9.3",
326
+ "index": "102",
327
+ "refcount": "1"
328
+ },
329
+ "com.apple.GeForce": {
330
+ "size": 622592,
331
+ "version": "5.3.6",
332
+ "index": "96",
333
+ "refcount": "0"
334
+ },
335
+ "com.apple.iokit.IOCDStorageFamily": {
336
+ "size": 32768,
337
+ "version": "1.5",
338
+ "index": "55",
339
+ "refcount": "3"
340
+ },
341
+ "com.apple.driver.AppleUSBEHCI": {
342
+ "size": 73728,
343
+ "version": "3.2.5",
344
+ "index": "39",
345
+ "refcount": "0"
346
+ },
347
+ "com.apple.nvidia.nv50hal": {
348
+ "size": 2445312,
349
+ "version": "5.3.6",
350
+ "index": "91",
351
+ "refcount": "0"
352
+ },
353
+ "com.apple.driver.AppleSMBIOS": {
354
+ "size": 16384,
355
+ "version": "1.1.1",
356
+ "index": "29",
357
+ "refcount": "0"
358
+ },
359
+ "com.apple.driver.AppleBacklight": {
360
+ "size": 16384,
361
+ "version": "1.4.4",
362
+ "index": "72",
363
+ "refcount": "0"
364
+ },
365
+ "com.apple.driver.AppleACPIPlatform": {
366
+ "size": 253952,
367
+ "version": "1.2.4",
368
+ "index": "19",
369
+ "refcount": "3"
370
+ },
371
+ "com.apple.iokit.SCSITaskUserClient": {
372
+ "size": 24576,
373
+ "version": "2.0.5",
374
+ "index": "54",
375
+ "refcount": "0"
376
+ },
377
+ "com.apple.iokit.IOHIDFamily": {
378
+ "size": 233472,
379
+ "version": "1.5.3",
380
+ "index": "21",
381
+ "refcount": "7"
382
+ },
383
+ "com.apple.driver.DiskImages": {
384
+ "size": 65536,
385
+ "version": "195.2.2",
386
+ "index": "101",
387
+ "refcount": "0"
388
+ },
389
+ "com.apple.iokit.IODVDStorageFamily": {
390
+ "size": 24576,
391
+ "version": "1.5",
392
+ "index": "56",
393
+ "refcount": "2"
394
+ },
395
+ "com.apple.driver.XsanFilter": {
396
+ "size": 20480,
397
+ "version": "2.7.91",
398
+ "index": "53",
399
+ "refcount": "0"
400
+ },
401
+ "com.apple.driver.AppleEFIRuntime": {
402
+ "size": 12288,
403
+ "version": "1.2.0",
404
+ "index": "35",
405
+ "refcount": "1"
406
+ },
407
+ "com.apple.driver.AppleRTC": {
408
+ "size": 20480,
409
+ "version": "1.2.3",
410
+ "index": "34",
411
+ "refcount": "0"
412
+ },
413
+ "com.apple.iokit.IOFireWireIP": {
414
+ "size": 36864,
415
+ "version": "1.7.6",
416
+ "index": "83",
417
+ "refcount": "0"
418
+ },
419
+ "com.vmware.kext.vmci": {
420
+ "size": 45056,
421
+ "version": "2.0.4",
422
+ "index": "106",
423
+ "refcount": "0"
424
+ },
425
+ "com.apple.iokit.IO80211Family": {
426
+ "size": 126976,
427
+ "version": "215.1",
428
+ "index": "87",
429
+ "refcount": "1"
430
+ },
431
+ "com.apple.nke.applicationfirewall": {
432
+ "size": 32768,
433
+ "version": "1.0.77",
434
+ "index": "24",
435
+ "refcount": "0"
436
+ },
437
+ "com.apple.iokit.IOAHCIBlockStorage": {
438
+ "size": 69632,
439
+ "version": "1.2.0",
440
+ "index": "48",
441
+ "refcount": "0"
442
+ },
443
+ "com.apple.driver.AppleUSBUHCI": {
444
+ "size": 57344,
445
+ "version": "3.2.5",
446
+ "index": "38",
447
+ "refcount": "0"
448
+ },
449
+ "com.apple.iokit.IOAHCIFamily": {
450
+ "size": 24576,
451
+ "version": "1.5.0",
452
+ "index": "42",
453
+ "refcount": "2"
454
+ },
455
+ "com.apple.driver.AppleAHCIPort": {
456
+ "size": 53248,
457
+ "version": "1.5.2",
458
+ "index": "43",
459
+ "refcount": "0"
460
+ },
461
+ "com.apple.driver.AppleEFINVRAM": {
462
+ "size": 24576,
463
+ "version": "1.2.0",
464
+ "index": "36",
465
+ "refcount": "0"
466
+ },
467
+ "com.apple.iokit.IOUSBFamily": {
468
+ "size": 167936,
469
+ "version": "3.2.7",
470
+ "index": "37",
471
+ "refcount": "13"
472
+ },
473
+ "com.apple.driver.AppleUSBMergeNub": {
474
+ "size": 12288,
475
+ "version": "3.2.4",
476
+ "index": "61",
477
+ "refcount": "0"
478
+ }
479
+ },
480
+ "machine": "i386",
481
+ "name": "Darwin",
482
+ "os": "Darwin",
483
+ "version": "Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1\/RELEASE_I386",
484
+ "release": "9.6.0"
485
+ },
486
+ "platform_version": "10.5.6",
487
+ "platform": "mac_os_x",
488
+ "ipaddress": "192.168.88.1",
489
+ "keys": {
490
+ "ssh": {
491
+ "host_dsa_public": "private",
492
+ "host_rsa_public": "private"
493
+ }
494
+ },
495
+ "network": {
496
+ "settings": {
497
+ "net.inet6.ip6.forwarding": "0",
498
+ "net.inet.ip.dummynet.debug": "0",
499
+ "net.inet.ip.rtexpire": "10",
500
+ "net.inet6.ipsec6.esp_trans_deflev": "1",
501
+ "net.inet.tcp.tcbhashsize": "4096",
502
+ "net.key.esp_auth": "0",
503
+ "net.inet6.ip6.hlim": "64",
504
+ "net.inet.ip.fw.dyn_fin_lifetime": "1",
505
+ "net.inet.ip.fw.dyn_udp_lifetime": "10",
506
+ "net.inet.icmp.bmcastecho": "1",
507
+ "net.athforceBias": "2 2",
508
+ "net.athbgscan": "1 1",
509
+ "net.inet.tcp.reass.maxsegments": "2048",
510
+ "net.inet6.ip6.auto_flowlabel": "1",
511
+ "net.inet6.ip6.rtmaxcache": "128",
512
+ "net.inet.tcp.sendspace": "131072",
513
+ "net.inet.tcp.keepinit": "75000",
514
+ "net.inet.ip.dummynet.max_chain_len": "16",
515
+ "net.inet.tcp.rfc1644": "0",
516
+ "net.inet.ip.fw.curr_dyn_buckets": "256",
517
+ "net.inet.ip.dummynet.ready_heap": "0",
518
+ "net.inet.ip.portrange.first": "49152",
519
+ "net.inet.tcp.background_io_trigger": "5",
520
+ "net.link.ether.inet.host_down_time": "20",
521
+ "net.inet6.ipsec6.def_policy": "1",
522
+ "net.inet6.ipsec6.ecn": "0",
523
+ "net.inet.ip.fastforwarding": "0",
524
+ "net.athaddbaignore": "0 0",
525
+ "net.inet6.ip6.v6only": "0",
526
+ "net.inet.tcp.sack": "1",
527
+ "net.inet6.ip6.rtexpire": "3600",
528
+ "net.link.ether.inet.proxyall": "0",
529
+ "net.inet6.ip6.keepfaith": "0",
530
+ "net.key.spi_trycnt": "1000",
531
+ "net.link.ether.inet.prune_intvl": "300",
532
+ "net.inet.tcp.ecn_initiate_out": "0",
533
+ "net.inet.ip.fw.dyn_rst_lifetime": "1",
534
+ "net.local.stream.sendspace": "8192",
535
+ "net.inet.tcp.socket_unlocked_on_output": "1",
536
+ "net.inet.ip.fw.verbose_limit": "0",
537
+ "net.local.dgram.recvspace": "4096",
538
+ "net.inet.ipsec.debug": "0",
539
+ "net.link.ether.inet.log_arp_warnings": "0",
540
+ "net.inet.tcp.ecn_negotiate_in": "0",
541
+ "net.inet.tcp.rfc3465": "1",
542
+ "net.inet.tcp.icmp_may_rst": "1",
543
+ "net.link.ether.inet.sendllconflict": "0",
544
+ "net.inet.ipsec.ah_offsetmask": "0",
545
+ "net.key.blockacq_count": "10",
546
+ "net.inet.tcp.delayed_ack": "3",
547
+ "net.inet.ip.fw.verbose": "2",
548
+ "net.inet.ip.fw.dyn_count": "0",
549
+ "net.inet.tcp.slowlink_wsize": "8192",
550
+ "net.inet6.ip6.fw.enable": "1",
551
+ "net.inet.ip.portrange.hilast": "65535",
552
+ "net.inet.icmp.maskrepl": "0",
553
+ "net.link.ether.inet.apple_hwcksum_rx": "1",
554
+ "net.inet.tcp.drop_synfin": "1",
555
+ "net.key.spi_maxval": "268435455",
556
+ "net.inet.ipsec.ecn": "0",
557
+ "net.inet.ip.fw.dyn_keepalive": "1",
558
+ "net.key.int_random": "60",
559
+ "net.key.debug": "0",
560
+ "net.inet.ip.dummynet.curr_time": "0",
561
+ "net.inet.udp.blackhole": "0",
562
+ "net.athaggrqmin": "1 1",
563
+ "net.athppmenable": "1 1",
564
+ "net.inet.ip.fw.dyn_syn_lifetime": "20",
565
+ "net.inet.tcp.keepidle": "7200000",
566
+ "net.inet6.ip6.tempvltime": "604800",
567
+ "net.inet.tcp.recvspace": "358400",
568
+ "net.inet.tcp.keepintvl": "75000",
569
+ "net.inet.udp.maxdgram": "9216",
570
+ "net.inet.ip.maxchainsent": "0",
571
+ "net.inet.ipsec.esp_net_deflev": "1",
572
+ "net.inet6.icmp6.nd6_useloopback": "1",
573
+ "net.inet.tcp.slowstart_flightsize": "1",
574
+ "net.inet.ip.fw.debug": "0",
575
+ "net.inet.ip.linklocal.in.allowbadttl": "1",
576
+ "net.key.spi_minval": "256",
577
+ "net.inet.ip.forwarding": "0",
578
+ "net.inet.tcp.v6mssdflt": "1024",
579
+ "net.key.larval_lifetime": "30",
580
+ "net.inet6.ip6.fw.verbose_limit": "0",
581
+ "net.inet.ip.dummynet.red_lookup_depth": "256",
582
+ "net.inet.tcp.pcbcount": "36",
583
+ "net.inet.ip.fw.dyn_ack_lifetime": "300",
584
+ "net.inet.ip.portrange.lowlast": "600",
585
+ "net.athCCAThreshold": "28 28",
586
+ "net.link.ether.inet.useloopback": "1",
587
+ "net.athqdepth": "0 0",
588
+ "net.inet.ip.ttl": "64",
589
+ "net.inet.ip.rtmaxcache": "128",
590
+ "net.inet.ipsec.bypass": "0",
591
+ "net.inet6.icmp6.nd6_debug": "0",
592
+ "net.inet.ip.use_route_genid": "1",
593
+ "net.inet6.icmp6.rediraccept": "1",
594
+ "net.inet.ip.fw.static_count": "1",
595
+ "net.inet6.ip6.fw.debug": "0",
596
+ "net.inet.udp.pcbcount": "104",
597
+ "net.inet.ipsec.esp_randpad": "-1",
598
+ "net.inet6.icmp6.nd6_maxnudhint": "0",
599
+ "net.inet.tcp.always_keepalive": "0",
600
+ "net.inet.udp.checksum": "1",
601
+ "net.link.ether.inet.keep_announcements": "1",
602
+ "net.athfixedDropThresh": "150 150",
603
+ "net.inet6.ip6.kame_version": "20010528\/apple-darwin",
604
+ "net.inet.ip.fw.dyn_max": "4096",
605
+ "net.inet.udp.log_in_vain": "0",
606
+ "net.inet6.icmp6.nd6_mmaxtries": "3",
607
+ "net.inet.ip.rtminexpire": "10",
608
+ "net.inet.ip.fw.dyn_buckets": "256",
609
+ "net.inet6.ip6.accept_rtadv": "0",
610
+ "net.inet6.ip6.rr_prune": "5",
611
+ "net.key.ah_keymin": "128",
612
+ "net.inet.ip.redirect": "1",
613
+ "net.inet.tcp.sack_globalmaxholes": "65536",
614
+ "net.inet.ip.keepfaith": "0",
615
+ "net.inet.ip.dummynet.expire": "1",
616
+ "net.inet.ip.gifttl": "30",
617
+ "net.inet.ip.portrange.last": "65535",
618
+ "net.inet.ipsec.ah_net_deflev": "1",
619
+ "net.inet6.icmp6.nd6_delay": "5",
620
+ "net.inet.tcp.packetchain": "50",
621
+ "net.inet6.ip6.hdrnestlimit": "50",
622
+ "net.inet.tcp.newreno": "0",
623
+ "net.inet6.ip6.dad_count": "1",
624
+ "net.inet6.ip6.auto_linklocal": "1",
625
+ "net.inet6.ip6.temppltime": "86400",
626
+ "net.inet.tcp.strict_rfc1948": "0",
627
+ "net.athdupie": "1 1",
628
+ "net.inet.ip.dummynet.red_max_pkt_size": "1500",
629
+ "net.inet.ip.maxfrags": "2048",
630
+ "net.inet.tcp.log_in_vain": "0",
631
+ "net.inet.tcp.rfc1323": "1",
632
+ "net.inet.ip.subnets_are_local": "0",
633
+ "net.inet.ip.dummynet.search_steps": "0",
634
+ "net.inet.icmp.icmplim": "250",
635
+ "net.link.ether.inet.apple_hwcksum_tx": "1",
636
+ "net.inet6.icmp6.redirtimeout": "600",
637
+ "net.inet.ipsec.ah_cleartos": "1",
638
+ "net.inet6.ip6.log_interval": "5",
639
+ "net.link.ether.inet.max_age": "1200",
640
+ "net.inet.ip.fw.enable": "1",
641
+ "net.inet6.ip6.redirect": "1",
642
+ "net.athaggrfmax": "28 28",
643
+ "net.inet.ip.maxfragsperpacket": "128",
644
+ "net.inet6.ip6.use_deprecated": "1",
645
+ "net.link.generic.system.dlil_input_sanity_check": "0",
646
+ "net.inet.tcp.sack_globalholes": "0",
647
+ "net.inet.tcp.reass.cursegments": "0",
648
+ "net.inet6.icmp6.nodeinfo": "3",
649
+ "net.local.inflight": "0",
650
+ "net.inet.ip.dummynet.hash_size": "64",
651
+ "net.inet.ip.dummynet.red_avg_pkt_size": "512",
652
+ "net.inet.ipsec.dfbit": "0",
653
+ "net.inet.tcp.reass.overflows": "0",
654
+ "net.inet.tcp.rexmt_thresh": "2",
655
+ "net.inet6.ip6.maxfrags": "8192",
656
+ "net.inet6.ip6.rtminexpire": "10",
657
+ "net.inet6.ipsec6.esp_net_deflev": "1",
658
+ "net.inet.tcp.blackhole": "0",
659
+ "net.key.esp_keymin": "256",
660
+ "net.inet.ip.check_interface": "0",
661
+ "net.inet.tcp.minmssoverload": "0",
662
+ "net.link.ether.inet.maxtries": "5",
663
+ "net.inet.tcp.do_tcpdrain": "0",
664
+ "net.inet.ipsec.esp_port": "4500",
665
+ "net.inet6.ipsec6.ah_net_deflev": "1",
666
+ "net.inet.ip.dummynet.extract_heap": "0",
667
+ "net.inet.tcp.path_mtu_discovery": "1",
668
+ "net.inet.ip.intr_queue_maxlen": "50",
669
+ "net.inet.ipsec.def_policy": "1",
670
+ "net.inet.ip.fw.autoinc_step": "100",
671
+ "net.inet.ip.accept_sourceroute": "0",
672
+ "net.inet.raw.maxdgram": "8192",
673
+ "net.inet.ip.maxfragpackets": "1024",
674
+ "net.inet.ip.fw.one_pass": "0",
675
+ "net.appletalk.routermix": "2000",
676
+ "net.inet.tcp.tcp_lq_overflow": "1",
677
+ "net.link.generic.system.ifcount": "9",
678
+ "net.link.ether.inet.send_conflicting_probes": "1",
679
+ "net.inet.tcp.background_io_enabled": "1",
680
+ "net.inet6.ipsec6.debug": "0",
681
+ "net.inet.tcp.win_scale_factor": "3",
682
+ "net.key.natt_keepalive_interval": "20",
683
+ "net.inet.tcp.msl": "15000",
684
+ "net.inet.ip.portrange.hifirst": "49152",
685
+ "net.inet.ipsec.ah_trans_deflev": "1",
686
+ "net.inet.tcp.rtt_min": "1",
687
+ "net.inet6.ip6.defmcasthlim": "1",
688
+ "net.inet6.icmp6.nd6_prune": "1",
689
+ "net.inet6.ip6.fw.verbose": "0",
690
+ "net.inet.ip.portrange.lowfirst": "1023",
691
+ "net.inet.tcp.maxseg_unacked": "8",
692
+ "net.local.dgram.maxdgram": "2048",
693
+ "net.key.blockacq_lifetime": "20",
694
+ "net.inet.tcp.sack_maxholes": "128",
695
+ "net.inet6.ip6.maxfragpackets": "1024",
696
+ "net.inet6.ip6.use_tempaddr": "0",
697
+ "net.athpowermode": "0 0",
698
+ "net.inet.udp.recvspace": "73728",
699
+ "net.inet.tcp.isn_reseed_interval": "0",
700
+ "net.inet.tcp.local_slowstart_flightsize": "8",
701
+ "net.inet.ip.dummynet.searches": "0",
702
+ "net.inet.ip.intr_queue_drops": "0",
703
+ "net.link.generic.system.multi_threaded_input": "1",
704
+ "net.inet.raw.recvspace": "8192",
705
+ "net.inet.ipsec.esp_trans_deflev": "1",
706
+ "net.key.prefered_oldsa": "0",
707
+ "net.local.stream.recvspace": "8192",
708
+ "net.inet.tcp.sockthreshold": "64",
709
+ "net.inet6.icmp6.nd6_umaxtries": "3",
710
+ "net.pstimeout": "20 20",
711
+ "net.inet.ip.sourceroute": "0",
712
+ "net.inet.ip.fw.dyn_short_lifetime": "5",
713
+ "net.inet.tcp.minmss": "216",
714
+ "net.inet6.ip6.gifhlim": "0",
715
+ "net.athvendorie": "1 1",
716
+ "net.inet.ip.check_route_selfref": "1",
717
+ "net.inet6.icmp6.errppslimit": "100",
718
+ "net.inet.tcp.mssdflt": "512",
719
+ "net.inet.icmp.log_redirect": "0",
720
+ "net.inet6.ipsec6.ah_trans_deflev": "1",
721
+ "net.inet6.ipsec6.esp_randpad": "-1",
722
+ "net.inet.icmp.drop_redirect": "0",
723
+ "net.inet.icmp.timestamp": "0",
724
+ "net.inet.ip.random_id": "1"
725
+ },
726
+ "interfaces": {
727
+ "vmnet1": {
728
+ "flags": [
729
+ "UP",
730
+ "BROADCAST",
731
+ "SMART",
732
+ "RUNNING",
733
+ "SIMPLEX",
734
+ "MULTICAST"
735
+ ],
736
+ "addresses": [
737
+ {
738
+ "broadcast": "192.168.88.255",
739
+ "netmask": "255.255.255.0",
740
+ "family": "inet",
741
+ "address": "192.168.88.1"
742
+ },
743
+ {
744
+ "family": "lladdr",
745
+ "address": "private"
746
+ }
747
+ ],
748
+ "number": "1",
749
+ "mtu": "1500",
750
+ "type": "vmnet",
751
+ "encapsulation": "Ethernet"
752
+ },
753
+ "stf0": {
754
+ "flags": [
755
+
756
+ ],
757
+ "number": "0",
758
+ "mtu": "1280",
759
+ "type": "stf",
760
+ "encapsulation": "6to4"
761
+ },
762
+ "vboxnet0": {
763
+ "flags": [
764
+ "BROADCAST",
765
+ "RUNNING",
766
+ "SIMPLEX",
767
+ "MULTICAST"
768
+ ],
769
+ "addresses": [
770
+ {
771
+ "family": "lladdr",
772
+ "address": "private"
773
+ }
774
+ ],
775
+ "number": "0",
776
+ "mtu": "1500",
777
+ "type": "vboxnet",
778
+ "encapsulation": "Ethernet"
779
+ },
780
+ "lo0": {
781
+ "flags": [
782
+ "UP",
783
+ "LOOPBACK",
784
+ "RUNNING",
785
+ "MULTICAST"
786
+ ],
787
+ "addresses": [
788
+ {
789
+ "scope": "Link",
790
+ "prefixlen": "64",
791
+ "family": "inet6",
792
+ "address": "fe80::1"
793
+ },
794
+ {
795
+ "netmask": "255.0.0.0",
796
+ "family": "inet",
797
+ "address": "127.0.0.1"
798
+ },
799
+ {
800
+ "scope": "Node",
801
+ "prefixlen": "128",
802
+ "family": "inet6",
803
+ "address": "::1"
804
+ },
805
+ {
806
+ "scope": "Node",
807
+ "prefixlen": "128",
808
+ "family": "inet6",
809
+ "address": "private"
810
+ }
811
+ ],
812
+ "number": "0",
813
+ "mtu": "16384",
814
+ "type": "lo",
815
+ "encapsulation": "Loopback"
816
+ },
817
+ "vboxn": {
818
+ "counters": {
819
+ "tx": {
820
+ "bytes": "0",
821
+ "packets": "0",
822
+ "collisions": "0",
823
+ "compressed": 0,
824
+ "carrier": 0,
825
+ "drop": 0,
826
+ "errors": "0",
827
+ "overrun": 0
828
+ },
829
+ "rx": {
830
+ "bytes": "0",
831
+ "packets": "0",
832
+ "compressed": 0,
833
+ "drop": 0,
834
+ "errors": "0",
835
+ "overrun": 0,
836
+ "frame": 0,
837
+ "multicast": 0
838
+ }
839
+ }
840
+ },
841
+ "gif0": {
842
+ "flags": [
843
+ "POINTOPOINT",
844
+ "MULTICAST"
845
+ ],
846
+ "number": "0",
847
+ "mtu": "1280",
848
+ "type": "gif",
849
+ "encapsulation": "IPIP"
850
+ },
851
+ "vmnet": {
852
+ "counters": {
853
+ "tx": {
854
+ "bytes": "0",
855
+ "packets": "0",
856
+ "collisions": "0",
857
+ "compressed": 0,
858
+ "carrier": 0,
859
+ "drop": 0,
860
+ "errors": "0",
861
+ "overrun": 0
862
+ },
863
+ "rx": {
864
+ "bytes": "0",
865
+ "packets": "0",
866
+ "compressed": 0,
867
+ "drop": 0,
868
+ "errors": "0",
869
+ "overrun": 0,
870
+ "frame": 0,
871
+ "multicast": 0
872
+ }
873
+ }
874
+ },
875
+ "vmnet8": {
876
+ "flags": [
877
+ "UP",
878
+ "BROADCAST",
879
+ "SMART",
880
+ "RUNNING",
881
+ "SIMPLEX",
882
+ "MULTICAST"
883
+ ],
884
+ "addresses": [
885
+ {
886
+ "broadcast": "192.168.237.255",
887
+ "netmask": "255.255.255.0",
888
+ "family": "inet",
889
+ "address": "192.168.237.1"
890
+ },
891
+ {
892
+ "family": "lladdr",
893
+ "address": "private"
894
+ }
895
+ ],
896
+ "number": "8",
897
+ "mtu": "1500",
898
+ "type": "vmnet",
899
+ "encapsulation": "Ethernet"
900
+ },
901
+ "en0": {
902
+ "status": "inactive",
903
+ "flags": [
904
+ "UP",
905
+ "BROADCAST",
906
+ "SMART",
907
+ "RUNNING",
908
+ "SIMPLEX",
909
+ "MULTICAST"
910
+ ],
911
+ "addresses": [
912
+ {
913
+ "family": "lladdr",
914
+ "address": "private"
915
+ }
916
+ ],
917
+ "number": "0",
918
+ "mtu": "1500",
919
+ "media": {
920
+ "supported": [
921
+ {
922
+ "autoselect": {
923
+ "options": [
924
+
925
+ ]
926
+ }
927
+ },
928
+ {
929
+ "10baseT\/UTP": {
930
+ "options": [
931
+ "half-duplex"
932
+ ]
933
+ }
934
+ },
935
+ {
936
+ "10baseT\/UTP": {
937
+ "options": [
938
+ "full-duplex"
939
+ ]
940
+ }
941
+ },
942
+ {
943
+ "10baseT\/UTP": {
944
+ "options": [
945
+ "full-duplex",
946
+ "hw-loopback"
947
+ ]
948
+ }
949
+ },
950
+ {
951
+ "10baseT\/UTP": {
952
+ "options": [
953
+ "full-duplex",
954
+ "flow-control"
955
+ ]
956
+ }
957
+ },
958
+ {
959
+ "100baseTX": {
960
+ "options": [
961
+ "half-duplex"
962
+ ]
963
+ }
964
+ },
965
+ {
966
+ "100baseTX": {
967
+ "options": [
968
+ "full-duplex"
969
+ ]
970
+ }
971
+ },
972
+ {
973
+ "100baseTX": {
974
+ "options": [
975
+ "full-duplex",
976
+ "hw-loopback"
977
+ ]
978
+ }
979
+ },
980
+ {
981
+ "100baseTX": {
982
+ "options": [
983
+ "full-duplex",
984
+ "flow-control"
985
+ ]
986
+ }
987
+ },
988
+ {
989
+ "1000baseT": {
990
+ "options": [
991
+ "full-duplex"
992
+ ]
993
+ }
994
+ },
995
+ {
996
+ "1000baseT": {
997
+ "options": [
998
+ "full-duplex",
999
+ "hw-loopback"
1000
+ ]
1001
+ }
1002
+ },
1003
+ {
1004
+ "1000baseT": {
1005
+ "options": [
1006
+ "full-duplex",
1007
+ "flow-control"
1008
+ ]
1009
+ }
1010
+ },
1011
+ {
1012
+ "none": {
1013
+ "options": [
1014
+
1015
+ ]
1016
+ }
1017
+ }
1018
+ ],
1019
+ "selected": [
1020
+ {
1021
+ "autoselect": {
1022
+ "options": [
1023
+
1024
+ ]
1025
+ }
1026
+ }
1027
+ ]
1028
+ },
1029
+ "type": "en",
1030
+ "counters": {
1031
+ "tx": {
1032
+ "bytes": "342",
1033
+ "packets": "0",
1034
+ "collisions": "0",
1035
+ "compressed": 0,
1036
+ "carrier": 0,
1037
+ "drop": 0,
1038
+ "errors": "0",
1039
+ "overrun": 0
1040
+ },
1041
+ "rx": {
1042
+ "bytes": "0",
1043
+ "packets": "0",
1044
+ "compressed": 0,
1045
+ "drop": 0,
1046
+ "errors": "0",
1047
+ "overrun": 0,
1048
+ "frame": 0,
1049
+ "multicast": 0
1050
+ }
1051
+ },
1052
+ "encapsulation": "Ethernet"
1053
+ },
1054
+ "en1": {
1055
+ "status": "active",
1056
+ "flags": [
1057
+ "UP",
1058
+ "BROADCAST",
1059
+ "SMART",
1060
+ "RUNNING",
1061
+ "SIMPLEX",
1062
+ "MULTICAST"
1063
+ ],
1064
+ "addresses": [
1065
+ {
1066
+ "scope": "Link",
1067
+ "prefixlen": "64",
1068
+ "family": "inet6",
1069
+ "address": "private"
1070
+ },
1071
+ {
1072
+ "broadcast": "192.168.1.255",
1073
+ "netmask": "255.255.255.0",
1074
+ "family": "inet",
1075
+ "address": "192.168.1.4"
1076
+ },
1077
+ {
1078
+ "family": "lladdr",
1079
+ "address": "private"
1080
+ }
1081
+ ],
1082
+ "number": "1",
1083
+ "mtu": "1500",
1084
+ "media": {
1085
+ "supported": [
1086
+ {
1087
+ "autoselect": {
1088
+ "options": [
1089
+
1090
+ ]
1091
+ }
1092
+ }
1093
+ ],
1094
+ "selected": [
1095
+ {
1096
+ "autoselect": {
1097
+ "options": [
1098
+
1099
+ ]
1100
+ }
1101
+ }
1102
+ ]
1103
+ },
1104
+ "type": "en",
1105
+ "counters": {
1106
+ "tx": {
1107
+ "bytes": "449206298",
1108
+ "packets": "7041789",
1109
+ "collisions": "0",
1110
+ "compressed": 0,
1111
+ "carrier": 0,
1112
+ "drop": 0,
1113
+ "errors": "95",
1114
+ "overrun": 0
1115
+ },
1116
+ "rx": {
1117
+ "bytes": "13673879120",
1118
+ "packets": "19966002",
1119
+ "compressed": 0,
1120
+ "drop": 0,
1121
+ "errors": "1655893",
1122
+ "overrun": 0,
1123
+ "frame": 0,
1124
+ "multicast": 0
1125
+ }
1126
+ },
1127
+ "arp": {
1128
+ "192.168.1.7": "private"
1129
+ },
1130
+ "encapsulation": "Ethernet"
1131
+ },
1132
+ "fw0": {
1133
+ "status": "inactive",
1134
+ "flags": [
1135
+ "UP",
1136
+ "BROADCAST",
1137
+ "SMART",
1138
+ "RUNNING",
1139
+ "SIMPLEX",
1140
+ "MULTICAST"
1141
+ ],
1142
+ "addresses": [
1143
+ {
1144
+ "family": "lladdr",
1145
+ "address": "private"
1146
+ }
1147
+ ],
1148
+ "number": "0",
1149
+ "mtu": "4078",
1150
+ "media": {
1151
+ "supported": [
1152
+ {
1153
+ "autoselect": {
1154
+ "options": [
1155
+ "full-duplex"
1156
+ ]
1157
+ }
1158
+ }
1159
+ ],
1160
+ "selected": [
1161
+ {
1162
+ "autoselect": {
1163
+ "options": [
1164
+ "full-duplex"
1165
+ ]
1166
+ }
1167
+ }
1168
+ ]
1169
+ },
1170
+ "type": "fw",
1171
+ "counters": {
1172
+ "tx": {
1173
+ "bytes": "346",
1174
+ "packets": "0",
1175
+ "collisions": "0",
1176
+ "compressed": 0,
1177
+ "carrier": 0,
1178
+ "drop": 0,
1179
+ "errors": "0",
1180
+ "overrun": 0
1181
+ },
1182
+ "rx": {
1183
+ "bytes": "0",
1184
+ "packets": "0",
1185
+ "compressed": 0,
1186
+ "drop": 0,
1187
+ "errors": "0",
1188
+ "overrun": 0,
1189
+ "frame": 0,
1190
+ "multicast": 0
1191
+ }
1192
+ },
1193
+ "encapsulation": "1394"
1194
+ }
1195
+ }
1196
+ },
1197
+ "fqdn": "local.local",
1198
+ "ohai_time": 1240624355.08575,
1199
+ "domain": "local",
1200
+ "os": "darwin",
1201
+ "platform_build": "9G55",
1202
+ "os_version": "9.6.0",
1203
+ "hostname": "local",
1204
+ "macaddress": "private",
1205
+ "languages": {
1206
+ "ruby": {
1207
+ "target_os": "darwin9.0",
1208
+ "platform": "universal-darwin9.0",
1209
+ "host_vendor": "apple",
1210
+ "target_vendor": "apple",
1211
+ "target_cpu": "i686",
1212
+ "host_os": "darwin9.0",
1213
+ "host_cpu": "i686",
1214
+ "version": "1.8.6",
1215
+ "host": "i686-apple-darwin9.0",
1216
+ "target": "i686-apple-darwin9.0",
1217
+ "release_date": "2008-03-03"
1218
+ }
1219
+ }
1220
+ }