You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2014/03/27 16:08:27 UTC

[13/51] [partial] CB-6346 - Add node_modules to source control

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/index.js b/blackberry10/node_modules/net-ping/index.js
new file mode 100644
index 0000000..16d6ebc
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/index.js
@@ -0,0 +1,526 @@
+
+var events = require ("events");
+var net = require ("net");
+var raw = require ("raw-socket");
+var util = require ("util");
+
+function _expandConstantObject (object) {
+	var keys = [];
+	for (key in object)
+		keys.push (key);
+	for (var i = 0; i < keys.length; i++)
+		object[object[keys[i]]] = parseInt (keys[i]);
+}
+
+var NetworkProtocol = {
+	1: "IPv4",
+	2: "IPv6"
+};
+
+_expandConstantObject (NetworkProtocol);
+
+function DestinationUnreachableError (source) {
+	this.name = "DestinationUnreachableError";
+	this.message = "Destination unreachable (source=" + source + ")";
+	this.source = source;
+}
+util.inherits (DestinationUnreachableError, Error);
+
+function PacketTooBigError (source) {
+	this.name = "PacketTooBigError";
+	this.message = "Packet too big (source=" + source + ")";
+	this.source = source;
+}
+util.inherits (PacketTooBigError, Error);
+
+function ParameterProblemError (source) {
+	this.name = "ParameterProblemError";
+	this.message = "Parameter problem (source=" + source + ")";
+	this.source = source;
+}
+util.inherits (ParameterProblemError, Error);
+
+function RedirectReceivedError (source) {
+	this.name = "RedirectReceivedError";
+	this.message = "Redireect received (source=" + source + ")";
+	this.source = source;
+}
+util.inherits (RedirectReceivedError, Error);
+
+function RequestTimedOutError () {
+	this.name = "RequestTimedOutError";
+	this.message = "Request timed out";
+}
+util.inherits (RequestTimedOutError, Error);
+
+function SourceQuenchError (source) {
+	this.name = "SourceQuenchError";
+	this.message = "Source quench (source=" + source + ")";
+	this.source = source;
+}
+util.inherits (SourceQuenchError, Error);
+
+function TimeExceededError (source) {
+	this.name = "TimeExceededError";
+	this.message = "Time exceeded (source=" + source + ")";
+	this.source = source;
+}
+util.inherits (TimeExceededError, Error);
+
+function Session (options) {
+	this.retries = (options && options.retries) ? options.retries : 1;
+	this.timeout = (options && options.timeout) ? options.timeout : 2000;
+
+	this.packetSize = (options && options.packetSize) ? options.packetSize : 16;
+
+	if (this.packetSize < 12)
+		this.packetSize = 12;
+
+	this.addressFamily = (options && options.networkProtocol
+				&& options.networkProtocol == NetworkProtocol.IPv6)
+			? raw.AddressFamily.IPv6
+			: raw.AddressFamily.IPv4;
+
+	this._debug = (options && options._debug) ? true : false;
+	
+	this.defaultTTL = (options && options.ttl) ? options.ttl : 128;
+	
+	this.sessionId = (options && options.sessionId)
+			? options.sessionId
+			: process.pid;
+	
+	this.sessionId = this.sessionId % 65535;
+	
+	this.nextId = 1;
+
+	this.socket = null;
+
+	this.reqs = {};
+	this.reqsPending = 0;
+
+	this.getSocket ();
+};
+
+util.inherits (Session, events.EventEmitter);
+
+Session.prototype.close = function () {
+	if (this.socket)
+		this.socket.close ();
+	this.flush (new Error ("Socket forcibly closed"));
+	delete this.socket;
+	return this;
+};
+
+Session.prototype._debugRequest = function (target, req) {
+	console.log ("request: addressFamily=" + this.addressFamily + " target="
+			+ req.target + " id=" + req.id + " buffer="
+			+ req.buffer.toString ("hex"));
+}
+
+Session.prototype._debugResponse = function (source, buffer) {
+	console.log ("response: addressFamily=" + this.addressFamily + " source="
+			+ source + " buffer=" + buffer.toString ("hex"));
+}
+
+Session.prototype.flush = function (error) {
+	for (id in this.reqs) {
+		var req = this.reqRemove (id);
+		var sent = req.sent ? req.sent : new Date ();
+		req.callback (error, req.target, sent, new Date ());
+	}
+};
+
+Session.prototype.getSocket = function () {
+	if (this.socket)
+		return this.socket;
+
+	var protocol = this.addressFamily == raw.AddressFamily.IPv6
+			? raw.Protocol.ICMPv6
+			: raw.Protocol.ICMP;
+
+	var me = this;
+	var options = {
+		addressFamily: this.addressFamily,
+		protocol: protocol
+	};
+
+	this.socket = raw.createSocket (options);
+	this.socket.on ("error", this.onSocketError.bind (me));
+	this.socket.on ("close", this.onSocketClose.bind (me));
+	this.socket.on ("message", this.onSocketMessage.bind (me));
+	
+	this.ttl = null;
+	this.setTTL (this.defaultTTL);
+	
+	return this.socket;
+};
+
+Session.prototype.fromBuffer = function (buffer) {
+	var offset, type, code;
+
+	if (this.addressFamily == raw.AddressFamily.IPv6) {
+		// IPv6 raw sockets don't pass the IPv6 header back to us
+		offset = 0;
+
+		if (buffer.length - offset < 8)
+			return;
+		
+		// We don't believe any IPv6 options will be passed back to us so we
+		// don't attempt to pass them here.
+
+		type = buffer.readUInt8 (offset);
+		code = buffer.readUInt8 (offset + 1);
+	} else {
+		// Need at least 20 bytes for an IP header, and it should be IPv4
+		if (buffer.length < 20 || (buffer[0] & 0xf0) != 0x40)
+			return;
+
+		// The length of the IPv4 header is in mulitples of double words
+		var ip_length = (buffer[0] & 0x0f) * 4;
+
+		// ICMP header is 8 bytes, we don't care about the data for now
+		if (buffer.length - ip_length < 8)
+			return;
+
+		var ip_icmp_offset = ip_length;
+
+		// ICMP message too short
+		if (buffer.length - ip_icmp_offset < 8)
+			return;
+
+		type = buffer.readUInt8 (ip_icmp_offset);
+		code = buffer.readUInt8 (ip_icmp_offset + 1);
+
+		// For error type responses the sequence and identifier cannot be
+		// extracted in the same way as echo responses, the data part contains
+		// the IP header from our request, followed with at least 8 bytes from
+		// the echo request that generated the error, so we first go to the IP
+		// header, then skip that to get to the ICMP packet which contains the
+		// sequence and identifier.
+		if (type == 3 || type == 4 || type == 5 || type == 11) {
+			var ip_icmp_ip_offset = ip_icmp_offset + 8;
+
+			// Need at least 20 bytes for an IP header, and it should be IPv4
+			if (buffer.length - ip_icmp_ip_offset  < 20
+					|| (buffer[ip_icmp_ip_offset] & 0xf0) != 0x40)
+				return;
+
+			// The length of the IPv4 header is in mulitples of double words
+			var ip_icmp_ip_length = (buffer[ip_icmp_ip_offset] & 0x0f) * 4;
+
+			// ICMP message too short
+			if (buffer.length - ip_icmp_ip_offset - ip_icmp_ip_length < 8)
+				return;
+
+			offset = ip_icmp_ip_offset + ip_icmp_ip_length;
+		} else {
+			offset = ip_icmp_offset
+		}
+	}
+
+	// Response is not for a request we generated
+	if (buffer.readUInt16BE (offset + 4) != this.sessionId)
+		return;
+
+	buffer[offset + 4] = 0;
+	
+	var id = buffer.readUInt16BE (offset + 6);
+	var req = this.reqs[id];
+
+	if (req) {
+		req.type = type;
+		req.code = code;
+		return req;
+	} else {
+		return null;
+	}
+};
+
+Session.prototype.onBeforeSocketSend = function (req) {
+	this.setTTL (req.ttl ? req.ttl : this.defaultTTL);
+}
+
+Session.prototype.onSocketClose = function () {
+	this.emit ("close");
+	this.flush (new Error ("Socket closed"));
+};
+
+Session.prototype.onSocketError = function (error) {
+	this.emit ("error", error);
+};
+
+Session.prototype.onSocketMessage = function (buffer, source) {
+	if (this._debug)
+		this._debugResponse (source, buffer);
+
+	var req = this.fromBuffer (buffer);
+	if (req) {
+		this.reqRemove (req.id);
+		
+		if (this.addressFamily == raw.AddressFamily.IPv6) {
+			if (req.type == 1) {
+				req.callback (new DestinationUnreachableError (source), req.target,
+						req.sent, new Date ());
+			} else if (req.type == 2) {
+				req.callback (new PacketTooBigError (source), req.target,
+						req.sent, new Date ());
+			} else if (req.type == 3) {
+				req.callback (new TimeExceededError (source), req.target,
+						req.sent, new Date ());
+			} else if (req.type == 4) {
+				req.callback (new ParameterProblemError (source), req.target,
+						req.sent, new Date ());
+			} else if (req.type == 129) {
+				req.callback (null, req.target,
+						req.sent, new Date ());
+			} else {
+				req.callback (new Error ("Unknown response type '" + req.type
+						+ "' (source=" + source + ")"), req.target,
+						req.sent, new Date ());
+			}
+		} else {
+			if (req.type == 0) {
+				req.callback (null, req.target,
+						req.sent, new Date ());
+			} else if (req.type == 3) {
+				req.callback (new DestinationUnreachableError (source), req.target,
+						req.sent, new Date ());
+			} else if (req.type == 4) {
+				req.callback (new SourceQuenchError (source), req.target,
+						req.sent, new Date ());
+			} else if (req.type == 5) {
+				req.callback (new RedirectReceivedError (source), req.target,
+						req.sent, new Date ());
+			} else if (req.type == 11) {
+				req.callback (new TimeExceededError (source), req.target,
+						req.sent, new Date ());
+			} else {
+				req.callback (new Error ("Unknown response type '" + req.type
+						+ "' (source=" + source + ")"), req.target,
+						req.sent, new Date ());
+			}
+		}
+	}
+};
+
+Session.prototype.onSocketSend = function (req, error, bytes) {
+	if (! req.sent)
+		req.sent = new Date ();
+	if (error) {
+		this.reqRemove (req.id);
+		req.callback (error, req.target, req.sent, req.sent);
+	} else {
+		var me = this;
+		req.timer = setTimeout (this.onTimeout.bind (me, req), req.timeout);
+	}
+};
+
+Session.prototype.onTimeout = function (req) {
+	if (req.retries > 0) {
+		req.retries--;
+		this.send (req);
+	} else {
+		this.reqRemove (req.id);
+		req.callback (new RequestTimedOutError ("Request timed out"),
+				req.target, req.sent, new Date ());
+	}
+};
+
+// Keep searching for an ID which is not in use
+Session.prototype._generateId = function () {
+	var startId = this.nextId++;
+	while (1) {
+		if (this.nextId > 65535)
+			this.nextId = 1;
+		if (this.reqs[this.nextId]) {
+			this.nextId++;
+		} else {
+			return this.nextId;
+		}
+		// No free request IDs
+		if (this.nextId == startId)
+			return;
+	}
+}
+
+Session.prototype.pingHost = function (target, callback) {
+	var id = this._generateId ();
+	if (! id) {
+		callback (new Error ("Too many requests outstanding"), target);
+		return this;
+	}
+
+	var req = {
+		id: id,
+		retries: this.retries,
+		timeout: this.timeout,
+		callback: callback,
+		target: target
+	};
+
+	this.reqQueue (req);
+
+	return this;
+};
+
+Session.prototype.reqQueue = function (req) {
+	req.buffer = this.toBuffer (req);
+
+	if (this._debug)
+		this._debugRequest (req.target, req);
+
+	this.reqs[req.id] = req;
+	this.reqsPending++;
+	this.send (req);
+	
+	return this;
+}
+
+Session.prototype.reqRemove = function (id) {
+	var req = this.reqs[id];
+	if (req) {
+		clearTimeout (req.timer);
+		delete req.timer;
+		delete this.reqs[req.id];
+		this.reqsPending--;
+	}
+	// If we have no more outstanding requests pause readable events
+	if (this.reqsPending <= 0)
+		if (! this.getSocket ().recvPaused)
+			this.getSocket ().pauseRecv ();
+	return req;
+};
+
+Session.prototype.send = function (req) {
+	var buffer = req.buffer;
+	var me = this;
+	// Resume readable events if the raw socket is paused
+	if (this.getSocket ().recvPaused)
+		this.getSocket ().resumeRecv ();
+	this.getSocket ().send (buffer, 0, buffer.length, req.target,
+			this.onBeforeSocketSend.bind (me, req),
+			this.onSocketSend.bind (me, req));
+};
+
+Session.prototype.setTTL = function (ttl) {
+	if (this.ttl && this.ttl == ttl)
+		return;
+
+	var level = this.addressFamily == raw.AddressFamily.IPv6
+			? raw.SocketLevel.IPPROTO_IPV6
+			: raw.SocketLevel.IPPROTO_IP;
+	this.getSocket ().setOption (level, raw.SocketOption.IP_TTL, ttl);
+	this.ttl = ttl;
+}
+
+Session.prototype.toBuffer = function (req) {
+	var buffer = new Buffer (this.packetSize);
+
+	// Since our buffer represents real memory we should initialise it to
+	// prevent its previous contents from leaking to the network.
+	for (var i = 8; i < this.packetSize; i++)
+		buffer[i] = 0;
+
+	var type = this.addressFamily == raw.AddressFamily.IPv6 ? 128 : 8;
+
+	buffer.writeUInt8 (type, 0);
+	buffer.writeUInt8 (0, 1);
+	buffer.writeUInt16BE (0, 2);
+	buffer.writeUInt16BE (this.sessionId, 4);
+	buffer.writeUInt16BE (req.id, 6);
+
+	raw.writeChecksum (buffer, 2, raw.createChecksum (buffer));
+
+	return buffer;
+};
+
+Session.prototype.traceRouteCallback = function (trace, req, error, target,
+		sent, rcvd) {
+	if (trace.feedCallback (error, target, req.ttl, sent, rcvd)) {
+		trace.doneCallback (new Error ("Trace forcibly stopped"), target);
+		return;
+	}
+
+	if (error) {
+		if (req.ttl >= trace.ttl) {
+			trace.doneCallback (error, target);
+			return;
+		}
+		
+		if ((error instanceof RequestTimedOutError) && ++trace.timeouts >= 3) {
+			trace.doneCallback (new Error ("Too many timeouts"), target);
+			return;
+		}
+
+		var id = this._generateId ();
+		if (! id) {
+			trace.doneCallback (new Error ("Too many requests outstanding"),
+					target);
+			return;
+		}
+
+		req.ttl++;
+		req.id = id;
+		var me = this;
+		req.retries = this.retries;
+		req.sent = null;
+		this.reqQueue (req);
+	} else {
+		trace.doneCallback (null, target);
+	}
+}
+
+Session.prototype.traceRoute = function (target, ttl, feedCallback,
+		doneCallback) {
+	if (! doneCallback) {
+		doneCallback = feedCallback;
+		feedCallback = ttl;
+		ttl = this.ttl;
+	}
+
+	var id = this._generateId ();
+	if (! id) {
+		var sent = new Date ();
+		callback (new Error ("Too many requests outstanding"), target,
+				sent, sent);
+		return this;
+	}
+
+	var trace = {
+		feedCallback: feedCallback,
+		doneCallback: doneCallback,
+		ttl: ttl,
+		timeouts: 0
+	};
+	
+	var me = this;
+
+	var req = {
+		id: id,
+		retries: this.retries,
+		timeout: this.timeout,
+		ttl: 1,
+		target: target
+	};
+	req.callback = me.traceRouteCallback.bind (me, trace, req);
+	
+	this.reqQueue (req);
+
+	return this;
+};
+
+exports.createSession = function (options) {
+	return new Session (options || {});
+};
+
+exports.NetworkProtocol = NetworkProtocol;
+
+exports.Session = Session;
+
+exports.DestinationUnreachableError = DestinationUnreachableError;
+exports.PacketTooBigError = PacketTooBigError;
+exports.ParameterProblemError = ParameterProblemError;
+exports.RedirectReceivedError = RedirectReceivedError;
+exports.RequestTimedOutError = RequestTimedOutError;
+exports.SourceQuenchError = SourceQuenchError;
+exports.TimeExceededError = TimeExceededError;

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore b/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore
new file mode 100644
index 0000000..4331a44
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore
@@ -0,0 +1,5 @@
+TODO
+build
+.hgignore
+.hgtags
+node_modules

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md b/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md
new file mode 100644
index 0000000..c9ec276
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md
@@ -0,0 +1,651 @@
+
+# raw-socket - [homepage][homepage]
+
+This module implements raw sockets for [Node.js][nodejs].
+
+*This module has been created primarily to facilitate implementation of the
+[net-ping][net-ping] module.*
+
+This module is installed using [node package manager (npm)][npm]:
+
+    # This module contains C++ source code which will be compiled
+    # during installation using node-gyp.  A suitable build chain
+    # must be configured before installation.
+    
+    npm install raw-socket
+
+It is loaded using the `require()` function:
+
+    var raw = require ("raw-socket");
+
+Raw sockets can then be created, and data sent using [Node.js][nodejs]
+`Buffer` objects:
+
+    var socket = raw.createSocket ({protocol: raw.Protocol.None});
+
+    socket.on ("message", function (buffer, source) {
+        console.log ("received " + buffer.length + " bytes from " + source);
+    });
+    
+    socket.send (buffer, 0, buffer.length, "1.1.1.1", function (error, bytes) {
+        if (error)
+            console.log (error.toString ());
+    });
+
+[homepage]: http://re-tool.org "Homepage"
+[nodejs]: http://nodejs.org "Node.js"
+[net-ping]: https://npmjs.org/package/net-ping "net-ping"
+[npm]: https://npmjs.org/ "npm"
+
+# Network Protocol Support
+
+The raw sockets exposed by this module support IPv4 and IPv6.
+
+Raw sockets are created using the operating systems `socket()` function, and
+the socket type `SOCK_RAW` specified.
+
+# Raw Socket Behaviour
+
+Raw sockets behave in different ways depending on operating system and
+version, and may support different socket options.
+
+Some operating system versions may restrict the use of raw sockets to
+privileged users.  If this is the case an exception will be thrown on socket
+creation using a message similar to `Operation not permitted` (this message
+is likely to be different depending on operating system version).
+
+The appropriate operating system documentation should be consulted to
+understand how raw sockets will behave before attempting to use this module.
+
+# Keeping The [Node.js][nodejs] Event Loop Alive
+
+This module uses the `libuv` library to integrate into the [Node.js][nodejs]
+event loop - this library is also used by [Node.js][nodejs].  An underlying
+ `libuv` library `poll_handle_t` event watcher is used to monitor the
+underlying operating system raw socket used by a socket object.
+
+All the while a socket object exists, and the sockets `close()` method has not
+been called, the raw socket will keep the [Node.js][nodejs] event loop alive
+which will prevent a program from exiting.
+
+This module exports four methods which a program can use to control this
+behaviour.
+
+The `pauseRecv()` and `pauseSend()` methods stop the underlying `poll_handle_t`
+event watcher used by a socket from monitoring for readable and writeable
+events.  While the `resumeRecv()` and `resumeSend()` methods start the
+underlying `poll_handle_t` event watcher used by a socket allowing it to
+monitor for readable and writeable events.
+
+Each socket object also exports the `recvPaused` and `sendPaused` boolean
+attributes to determine the state of the underlying `poll_handle_t` event
+watcher used by a socket.
+
+Socket creation can be expensive on some platforms, and the above methods offer
+an alternative to closing and deleting a socket to prevent it from keeping the
+[Node.js][nodejs] event loop alive.
+
+The [Node.js][nodejs] [net-ping][net-ping] module offers a concrete example
+of using these methods.  Since [Node.js][nodejs] offers no raw socket support
+this module is used to implement ICMP echo (ping) support.  Once all ping
+requests have been processed by the [net-ping][net-ping] module the
+`pauseRecv()` and `pauseSend()` methods are used to allow a program to exit if
+required.
+
+The following example stops the underlying `poll_handle_t` event watcher used
+by a socket from generating writeable events, however since readable events
+will still be watched for the program will not exit immediately:
+
+    if (! socket.recvPaused)
+        socket.pauseRecv ();
+
+The following can the be used to resume readable events:
+
+    if (socket.recvPaused)
+        socket.resumeRecv ();
+
+The following example stops the underlying `poll_handle_t` event watcher used
+by a socket from generating both readable and writeable events, if no other
+event watchers have been setup (e.g. `setTimeout()`) the program will exit.
+
+    if (! socket.recvPaused)
+        socket.pauseRecv ();
+    if (! socket.sendPaused)
+        socket.pauseSend ();
+
+The following can the be used to resume both readable and writeable events:
+
+    if (socket.recvPaused)
+        socket.resumeRecv ();
+    if (socket.sendPaused)
+        socket.resumeSend ();
+
+When data is sent using a sockets `send()` method the `resumeSend()` method
+will be called if the sockets `sendPaused` attribute is `true`, however the
+`resumeRecv()` method will not be called regardless of whether the sockets
+`recvPaused` attribute is `true` or `false`.
+
+[nodejs]: http://nodejs.org "Node.js"
+[net-ping]: http://npmjs.org/package/net-ping "net-ping"
+
+# Constants
+
+The following sections describe constants exported and used by this module.
+
+## raw.AddressFamily
+
+This object contains constants which can be used for the `addressFamily`
+option to the `createSocket()` function exposed by this module.  This option
+specifies the IP protocol version to use when creating the raw socket.
+
+The following constants are defined in this object:
+
+ * `IPv4` - IPv4 protocol
+ * `IPv6` - IPv6 protocol
+
+## raw.Protocol
+
+This object contains constants which can be used for the `protocol` option to
+the `createSocket()` function exposed by this module.  This option specifies
+the protocol number to place in the protocol field of IP headers generated by
+the operating system.
+
+The following constants are defined in this object:
+
+ * `None` - protocol number 0
+ * `ICMP` - protocol number 1
+ * `TCP` - protocol number 6
+ * `UDP` - protocol number 17
+ * `ICMPv6` - protocol number 58
+
+## raw.SocketLevel
+
+This object contains constants which can be used for the `level` parameter to
+the `getOption()` and `setOption()` methods exposed by this module.
+
+The following constants are defined in this object:
+
+ * `SOL_SOCKET`
+ * `IPPROTO_IP`
+ * `IPPROTO_IPV6`
+
+## raw.SocketOption
+
+This object contains constants which can be used for the `option` parameter to
+the `getOption()` and `setOption()` methods exposed by this module.
+
+The following constants are defined in this object:
+
+ * `SO_RCVBUF`
+ * `SO_RCVTIMEO`
+ * `SO_SNDBUF`
+ * `SO_SNDTIMEO`
+ * `IP_HDRINCL`
+ * `IP_OPTIONS`
+ * `IP_TOS`
+ * `IP_TTL`
+ * `IPV6_TTL`
+ * `IPV6_UNICAST_HOPS`
+ * `IPV6_V6ONLY`
+
+*The `IPV6_TTL` socket option is not known to be defined by any operating
+system, it is provided in convenience to be synonymous with IPv4*
+
+For Windows platforms the following constant is also defined:
+
+ * `IPV6_HDRINCL`
+
+# Using This Module
+
+Raw sockets are represented by an instance of the `Socket` class.  This
+module exports the `createSocket()` function which is used to create
+instances of the `Socket` class.
+
+The module also exports a number of stubs which call through to a number of
+functions provided by the operating system, i.e. `htonl()`.
+
+This module also exports a function to generate protocol checksums.
+
+## raw.createChecksum (bufferOrObject, [bufferOrObject, ...])
+
+The `createChecksum()` function creates and returns a 16 bit one's complement
+of the one's complement sum for all the data specified in one or more
+[Node.js][nodejs] `Buffer` objects.  This is useful for creating checksums for
+protocols such as IP, TCP, UDP and ICMP.
+
+The `bufferOrObject` parameter can be one of two types.  The first is a
+[Node.js][nodejs] `Buffer` object.  In this case a checksum is calculated from
+all the data it contains.  The `bufferOrObject` parameter can also be an
+object which must contain the following attributes:
+
+ * `buffer` - A [Node.js][nodejs] `Buffer` object which contains data which
+   to generate a checksum for
+ * `offset` - Skip this number of bytes from the beginning of `buffer`
+ * `length` - Only generate a checksum for this number of bytes in `buffer`
+   from `offset`
+
+The second parameter type provides control over how much of the data in a
+[Node.js][nodejs] `Buffer` object a checksum should be generated for.
+
+When more than one parameter is passed a single checksum is calculated as if
+the data in in all parameters were in a single buffer.  This is useful for
+when calulating checksums for TCP and UDP for example - where a psuedo header
+must be created and used for checksum calculation.
+
+In this case two buffers can be passed, the first containing the psuedo header
+and the second containing the real TCP packet, and the offset and length
+parameters used to specify the bounds of the TCP packet payload.
+
+The following example generates a checksum for a TCP packet and its psuedo
+header:
+
+    var sum = raw.createChecksum (pseudo_header, {buffer: tcp_packet,
+            offset: 20, length: tcp_packet.length - 20});
+
+Both buffers will be treated as one, i.e. as if the data at offset `20` in
+`tcp_packet` had followed all data in `pseudo_header` - as if they were one
+buffer.
+
+## raw.writeChecksum (buffer, offset, checksum)
+
+The `writeChecksum()` function writes a checksum created by the
+`raw.createChecksum()` function to the [Node.js][nodejs] `Buffer` object 
+`buffer` at offsets `offset` and `offset` + 1.
+
+The following example generates and writes a checksum at offset `2` in a
+[Node.js][nodejs] `Buffer` object:
+
+    raw.writeChecksum (buffer, 2, raw.createChecksum (buffer));
+
+## raw.htonl (uint32)
+
+The `htonl()` function converts a 32 bit unsigned integer from host byte
+order to network byte order and returns the result.  This function is simply
+a stub through to the operating systems `htonl()` function.
+
+## raw.htons (uint16)
+
+The `htons()` function converts a 16 bit unsigned integer from host byte
+order to network byte order and returns the result.  This function is simply
+a stub through to the operating systems `htons()` function.
+
+## raw.ntohl (uint32)
+
+The `ntohl()` function converts a 32 bit unsigned integer from network byte
+order to host byte order and returns the result.  This function is simply
+a stub through to the operating systems `ntohl()` function.
+
+## raw.ntohs (uint16)
+
+The `ntohs()` function converts a 16 bit unsigned integer from network byte
+order to host byte order and returns the result.  This function is simply
+a stub through to the operating systems `ntohs()` function.
+
+## raw.createSocket ([options])
+
+The `createSocket()` function instantiates and returns an instance of the
+`Socket` class:
+
+    // Default options
+    var options = {
+        addressFamily: raw.AddressFamily.IPv4,
+        protocol: raw.Protocol.None,
+        bufferSize: 4096,
+        generateChecksums: false,
+        checksumOffset: 0
+    };
+    
+    var socket = raw.createSocket (options);
+
+The optional `options` parameter is an object, and can contain the following
+items:
+
+ * `addressFamily` - Either the constant `raw.AddressFamily.IPv4` or the
+   constant `raw.AddressFamily.IPv6`, defaults to the constant
+   `raw.AddressFamily.IPv4`
+ * `protocol` - Either one of the constants defined in the `raw.Protocol`
+   object or the protocol number to use for the socket, defaults to the
+   consant `raw.Protocol.None`
+ * `bufferSize` - Size, in bytes, of the sockets internal receive buffer,
+   defaults to 4096
+ * `generateChecksums` - Either `true` or `false` to enable or disable the
+   automatic checksum generation feature, defaults to `false`
+ * `checksumOffset` - When `generateChecksums` is `true` specifies how many
+   bytes to index into the send buffer to write automatically generated
+   checksums, defaults to `0`
+
+An exception will be thrown if the underlying raw socket could not be created.
+The error will be an instance of the `Error` class.
+
+The `protocol` parameter, or its default value of the constant
+`raw.Protocol.None`, will be specified in the protocol field of each IP
+header.
+
+## socket.on ("close", callback)
+
+The `close` event is emitted by the socket when the underlying raw socket
+is closed.
+
+No arguments are passed to the callback.
+
+The following example prints a message to the console when the socket is
+closed:
+
+    socket.on ("close", function () {
+        console.log ("socket closed");
+    });
+
+## socket.on ("error", callback)
+
+The `error` event is emitted by the socket when an error occurs sending or
+receiving data.
+
+The following arguments will be passed to the `callback` function:
+
+ * `error` - An instance of the `Error` class, the exposed `message` attribute
+   will contain a detailed error message.
+
+The following example prints a message to the console when an error occurs,
+after which the socket is closed:
+
+    socket.on ("error", function (error) {
+        console.log (error.toString ());
+        socket.close ();
+    });
+
+## socket.on ("message", callback)
+
+The `message` event is emitted by the socket when data has been received.
+
+The following arguments will be passed to the `callback` function:
+
+ * `buffer` - A [Node.js][nodejs] `Buffer` object containing the data
+   received, the buffer will be sized to fit the data received, that is the
+   `length` attribute of buffer will specify how many bytes were received
+ * `address` - For IPv4 raw sockets the dotted quad formatted source IP
+   address of the message, e.g `192.168.1.254`, for IPv6 raw sockets the
+   compressed formatted source IP address of the message, e.g.
+   `fe80::a00:27ff:fe2a:3427`
+
+The following example prints received messages in hexadecimal to the console:
+
+    socket.on ("message", function (buffer, address) {
+        console.log ("received " + buffer.length + " bytes from " + address
+                + ": " + buffer.toString ("hex"));
+    });
+
+## socket.generateChecksums (generate, offset)
+
+The `generateChecksums()` method is used to specify whether automatic checksum
+generation should be performed by the socket.
+
+The `generate` parameter is either `true` or `false` to enable or disable the
+feature.  The optional `offset` parameter specifies how many bytes to index
+into the send buffer when writing the generated checksum to the send buffer.
+
+The following example enables automatic checksum generation at offset 2
+resulting in checksums being written to byte 3 and 4 of the send buffer
+(offsets start from 0, meaning byte 1):
+
+    socket.generateChecksums (true, 2);
+
+## socket.getOption (level, option, buffer, length)
+
+The `getOption()` method gets a socket option using the operating systems
+`getsockopt()` function.
+
+The `level` parameter is one of the constants defined in the `raw.SocketLevel`
+object.  The `option` parameter is one of the constants defined in the
+`raw.SocketOption` object.  The `buffer` parameter is a [Node.js][nodejs]
+`Buffer` object where the socket option value will be written.  The `length`
+parameter specifies the size of the `buffer` parameter.
+
+If an error occurs an exception will be thrown, the exception will be an
+instance of the `Error` class.
+
+The number of bytes written into the `buffer` parameter is returned, and can
+differ from the amount of space available.
+
+The following example retrieves the current value of `IP_TTL` socket option:
+
+    var level = raw.SocketLevel.IPPROTO_IP;
+    var option = raw.SocketOption.IP_TTL;
+    
+    # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used
+    var buffer = new Buffer (4);
+    
+    var written = socket.getOption (level, option, buffer, buffer.length);
+    
+    console.log (buffer.toString ("hex"), 0, written);
+
+## socket.send (buffer, offset, length, address, beforeCallback, afterCallback)
+
+The `send()` method sends data to a remote host.
+
+The `buffer` parameter is a [Node.js][nodejs] `Buffer` object containing the
+data to be sent.  The `length` parameter specifies how many bytes from
+`buffer`, beginning at offset `offset`, to send.  For IPv4 raw sockets the
+`address` parameter contains the dotted quad formatted IP address of the
+remote host to send the data to, e.g `192.168.1.254`, for IPv6 raw sockets the
+`address` parameter contains the compressed formatted IP address of the remote
+host to send the data to, e.g. `fe80::a00:27ff:fe2a:3427`.  If provided the
+optional `beforeCallback` function is called right before the data is actually
+sent using the underlying raw socket, giving users the opportunity to perform
+pre-send actions such as setting a socket option, e.g. the IP header TTL.  No
+arguments are passed to the `beforeCallback` function.  The `afterCallback`
+function is called once the data has been sent.  The following arguments will
+be passed to the `afterCallback` function:
+
+ * `error` - Instance of the `Error` class, or `null` if no error occurred
+ * `bytes` - Number of bytes sent
+
+The following example sends a ICMP ping message to a remote host, before the
+request is actually sent the IP header TTL is modified, and modified again
+after the data has been sent:
+
+    // ICMP echo (ping) request, checksum should be ok
+    var buffer = new Buffer ([
+            0x08, 0x00, 0x43, 0x52, 0x00, 0x01, 0x0a, 0x09,
+            0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+            0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
+            0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x61,
+            0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69]);
+
+    var socketLevel = raw.SocketLevel.IPPROTO_IP
+    var socketOption = raw.SocketOption.IP_TTL;
+
+    function beforeSend () {
+        socket.setOption (socketLevel, socketOption, 1);
+    }
+    
+    function afterSend (error, bytes) {
+        if (error)
+            console.log (error.toString ());
+        else
+            console.log ("sent " + bytes + " bytes");
+        
+        socket.setOption (socketLevel, socketOption, 1);
+    }
+
+    socket.send (buffer, 0, buffer.length, target, beforeSend, afterSend);
+
+## socket.setOption (level, option, buffer, length)
+
+The `setOption()` method sets a socket option using the operating systems
+`setsockopt()` function.
+
+The `level` parameter is one of the constants defined in the `raw.SocketLevel`
+object.  The `option` parameter is one of the constants defined in the
+`raw.SocketOption` object.  The `buffer` parameter is a [Node.js][nodejs]
+`Buffer` object where the socket option value is specified.  The `length`
+parameter specifies how much space the option value occupies in the `buffer`
+parameter.
+
+If an error occurs an exception will be thrown, the exception will be an
+instance of the `Error` class.
+
+The following example sets the value of `IP_TTL` socket option to `1`:
+
+    var level = raw.SocketLevel.IPPROTO_IP;
+    var option = raw.SocketOption.IP_TTL;
+    
+    # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used,
+    # x86 computers use little-endian format so specify bytes reverse order
+    var buffer = new Buffer ([0x01, 0x00, 0x00, 0x00]);
+    
+    socket.setOption (level, option, buffer, buffer.length);
+
+To avoid dealing with endianess the `setOption()` method supports a three
+argument form which can be used for socket options requiring a 32bit unsigned
+integer value (for example the `IP_TTL` socket option used in the previous
+example).  Its signature is as follows:
+
+    socket.setOption (level, option, value)
+
+The previous example can be re-written to use this form:
+
+    var level = raw.SocketLevel.IPPROTO_IP;
+    var option = raw.SocketOption.IP_TTL;
+
+    socket.setOption (level, option, 1);
+
+# Example Programs
+
+Example programs are included under the modules `example` directory.
+
+# Bugs & Known Issues
+
+None, yet!
+
+Bug reports should be sent to <st...@gmail.com>.
+
+# Changes
+
+## Version 1.0.0 - 29/01/2013
+
+ * Initial release
+
+## Version 1.0.1 - 01/02/2013
+
+ * Move `SOCKET_ERRNO` define from `raw.cc` to `raw.h`
+ * Error in exception thrown by `SocketWrap::New` in `raw.cc` stated that two
+   arguments were required, this should be one
+ * Corrections to the README.md
+ * Missing includes causes compilation error on some systems (maybe Node
+   version dependant)
+
+## Version 1.0.2 - 02/02/2013
+
+ * Support automatic checksum generation
+
+## Version 1.1.0 - 13/02/2013
+
+ * The [net-ping][net-ping] module is now implemented so update the note about
+   it in the first section of the README.md
+ * Support IPv6
+ * Support the `IP_HDRINCL` socket option via the `noIpHeader` option to the
+   `createSocket()` function and the `noIpHeader()` method exposed by the
+   `Socket` class
+
+## Version 1.1.1 - 14/02/2013
+
+ * IP addresses not being validated
+
+## Version 1.1.2 - 15/02/2013
+
+ * Default protocol option to `createSession()` was incorrect in the README.md
+ * The `session.on("message")` example used `message` instead of `buffer` in
+   the README.md
+
+## Version 1.1.3 - 04/03/2013
+
+ * `raw.Socket.onSendReady()` emit's an error when `raw.SocketWrap.send()`
+   throws an exception when it should call the `req.callback` callback
+ * Added the `pauseRecv()`, `resumeRecv()`, `pauseSend()` and `resumeSend()`
+   methods
+
+[net-ping]: https://npmjs.org/package/net-ping "net-ping"
+
+## Version 1.1.4 - 05/03/2013
+
+ * Cleanup documentation for the `pauseSend()`, `pauseRecv()`, `resumeSend()`
+   and `resumeRecv()` methods in the README.md
+
+## Version 1.1.5 - 09/05/2013
+
+ * Reformated lines in the README.md file inline with the rest of the file
+ * Removed the `noIpHeader()` method (the `setOption()` method should be
+   used to configure the `IP_HDRINCL` socket option - and possibly
+   `IPV6_HDRINCL` on Windows platforms), and removed the `Automatic IP Header
+   Generation` section from the README.md file
+ * Added the `setOption()` and `getOption()` methods, and added the
+   `SocketLevel` and `SocketOption` constants
+ * Tidied up the example program `ping-no-ip-header.js` (now uses the
+   `setOption()` method to configure the `IP_HDRINCL` socket option)
+ * Tidied up the example program `ping6-no-ip-header.js` (now uses the
+   `setOption()` method to configure the `IPV6_HDRINCL` socket option)
+ * Added the example program `get-option.js`
+ * Added the example program `ping-set-option-ip-ttl.js`
+ * Use MIT license instead of GPL
+
+## Version 1.1.6 - 18/05/2013
+
+ * Added the `beforeCallback` parameter to the `send()` method, and renamed the
+   `callback` parameter to `afterCallback`
+ * Fixed a few typos in the README.md file
+ * Modified the example program `ping-set-option-ip-ttl.js` to use the
+   `beforeCallback` parameter to the `send()` method
+ * The example program `ping6-no-ip-header.js` was not passing the correct
+   arguments to the `setOption()` method
+
+## Version 1.1.7 - 23/06/2013
+
+ * Added the `htonl()`, `htons()`, `ntohl()`, and `ntohs()` functions, and
+   associated example programs
+ * Added the `createChecksum()` function, and associated example program
+
+## Version 1.1.8 - 01/07/2013
+
+ * Added the `writeChecksum()` function
+ * Removed the "Automated Checksum Generation" feature - this has been
+   replaced with the `createChecksum()` and `writeChecksum()` functions
+
+## Version 1.2.0 - 02/07/2013
+
+ * Up version number to 1.2.0 (we should have done this for 1.1.8 because it
+   introduced some API breaking changes)
+
+# Roadmap
+
+In no particular order:
+
+ * Enhance performance by moving the send queue into the C++ raw::SocketWrap
+   class
+
+Suggestions and requirements should be sent to <st...@gmail.com>.
+
+# License
+
+Copyright (c) 2013 Stephen Vickers
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+# Author
+
+Stephen Vickers <st...@gmail.com>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp b/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp
new file mode 100644
index 0000000..53b5e06
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp
@@ -0,0 +1,15 @@
+{
+  'targets': [
+    {
+      'target_name': 'raw',
+      'sources': [
+        'src/raw.cc'
+      ],
+      'conditions' : [
+        ['OS=="win"', {
+          'libraries' : ['ws2_32.lib']
+        }]
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js b/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js
new file mode 100644
index 0000000..211523e
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js
@@ -0,0 +1,216 @@
+
+var events = require ("events");
+var net = require ("net");
+var raw = require ("./build/Release/raw");
+var util = require ("util");
+
+function _expandConstantObject (object) {
+	var keys = [];
+	for (key in object)
+		keys.push (key);
+	for (var i = 0; i < keys.length; i++)
+		object[object[keys[i]]] = parseInt (keys[i]);
+}
+
+var AddressFamily = {
+	1: "IPv4",
+	2: "IPv6"
+};
+
+_expandConstantObject (AddressFamily);
+
+var Protocol = {
+	0: "None",
+	1: "ICMP",
+	6: "TCP",
+	17: "UDP",
+	58: "ICMPv6"
+};
+
+_expandConstantObject (Protocol);
+
+for (var key in events.EventEmitter.prototype) {
+  raw.SocketWrap.prototype[key] = events.EventEmitter.prototype[key];
+}
+
+function Socket (options) {
+	Socket.super_.call (this);
+
+	this.requests = [];
+	this.buffer = new Buffer ((options && options.bufferSize)
+			? options.bufferSize
+			: 4096);
+
+	this.recvPaused = false;
+	this.sendPaused = true;
+
+	this.wrap = new raw.SocketWrap (
+			((options && options.protocol)
+					? options.protocol
+					: 0),
+			((options && options.addressFamily)
+					? options.addressFamily
+					: AddressFamily.IPv4)
+		);
+
+	var me = this;
+	this.wrap.on ("sendReady", this.onSendReady.bind (me));
+	this.wrap.on ("recvReady", this.onRecvReady.bind (me));
+	this.wrap.on ("error", this.onError.bind (me));
+	this.wrap.on ("close", this.onClose.bind (me));
+};
+
+util.inherits (Socket, events.EventEmitter);
+
+Socket.prototype.close = function () {
+	this.wrap.close ();
+	return this;
+}
+
+Socket.prototype.getOption = function (level, option, value, length) {
+	return this.wrap.getOption (level, option, value, length);
+}
+
+Socket.prototype.onClose = function () {
+	this.emit ("close");
+}
+
+Socket.prototype.onError = function (error) {
+	this.emit ("error", error);
+	this.close ();
+}
+
+Socket.prototype.onRecvReady = function () {
+	var me = this;
+	try {
+		this.wrap.recv (this.buffer, function (buffer, bytes, source) {
+			var newBuffer = buffer.slice (0, bytes);
+			me.emit ("message", newBuffer, source);
+		});
+	} catch (error) {
+		me.emit ("error", error);
+	}
+}
+
+Socket.prototype.onSendReady = function () {
+	if (this.requests.length > 0) {
+		var me = this;
+		var req = this.requests.shift ();
+		try {
+			if (req.beforeCallback)
+				req.beforeCallback ();
+			this.wrap.send (req.buffer, req.offset, req.length,
+					req.address, function (bytes) {
+				req.afterCallback.call (me, null, bytes);
+			});
+		} catch (error) {
+			req.afterCallback.call (me, error, 0);
+		}
+	} else {
+		if (! this.sendPaused)
+			this.pauseSend ();
+	}
+}
+
+Socket.prototype.pauseRecv = function () {
+	this.recvPaused = true;
+	this.wrap.pause (this.recvPaused, this.sendPaused);
+	return this;
+}
+
+Socket.prototype.pauseSend = function () {
+	this.sendPaused = true;
+	this.wrap.pause (this.recvPaused, this.sendPaused);
+	return this;
+}
+
+Socket.prototype.resumeRecv = function () {
+	this.recvPaused = false;
+	this.wrap.pause (this.recvPaused, this.sendPaused);
+	return this;
+}
+
+Socket.prototype.resumeSend = function () {
+	this.sendPaused = false;
+	this.wrap.pause (this.recvPaused, this.sendPaused);
+	return this;
+}
+
+Socket.prototype.send = function (buffer, offset, length, address,
+		beforeCallback, afterCallback) {
+	if (! afterCallback) {
+		afterCallback = beforeCallback;
+		beforeCallback = null;
+	}
+
+	if (length + offset > buffer.length)  {
+		afterCallback.call (this, new Error ("Buffer length '" + buffer.length
+				+ "' is not large enough for the specified offset '" + offset
+				+ "' plus length '" + length + "'"));
+		return this;
+	}
+
+	if (! net.isIP (address)) {
+		afterCallback.call (this, new Error ("Invalid IP address '" + address + "'"));
+		return this;
+	}
+
+	var req = {
+		buffer: buffer,
+		offset: offset,
+		length: length,
+		address: address,
+		afterCallback: afterCallback,
+		beforeCallback: beforeCallback
+	};
+	this.requests.push (req);
+
+	if (this.sendPaused)
+		this.resumeSend ();
+
+	return this;
+}
+
+Socket.prototype.setOption = function (level, option, value, length) {
+	if (arguments.length > 3)
+		this.wrap.setOption (level, option, value, length);
+	else
+		this.wrap.setOption (level, option, value);
+}
+
+exports.createChecksum = function () {
+	var sum = 0;
+	for (var i = 0; i < arguments.length; i++) {
+		var object = arguments[i];
+		if (object instanceof Buffer) {
+			sum = raw.createChecksum (sum, object, 0, object.length);
+		} else {
+			sum = raw.createChecksum (sum, object.buffer, object.offset,
+					object.length);
+		}
+	}
+	return sum;
+}
+
+exports.writeChecksum = function (buffer, offset, checksum) {
+	buffer.writeUInt8 ((checksum & 0xff00) >> 8, offset);
+	buffer.writeUInt8 (checksum & 0xff, offset + 1);
+	return buffer;
+}
+
+exports.createSocket = function (options) {
+	return new Socket (options || {});
+};
+
+exports.AddressFamily = AddressFamily;
+exports.Protocol = Protocol;
+
+exports.Socket = Socket;
+
+exports.SocketLevel = raw.SocketLevel;
+exports.SocketOption = raw.SocketOption;
+
+exports.htonl = raw.htonl;
+exports.htons = raw.htons;
+exports.ntohl = raw.ntohl;
+exports.ntohs = raw.ntohs;

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json b/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json
new file mode 100644
index 0000000..2e9c16c
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json
@@ -0,0 +1,52 @@
+{
+  "name": "raw-socket",
+  "version": "1.2.0",
+  "description": "Raw sockets for Node.js.",
+  "main": "index.js",
+  "directories": {
+    "example": "example"
+  },
+  "dependencies": {},
+  "contributors": [
+    {
+      "name": "Stephen Vickers",
+      "email": "stephen.vickers.sv@gmail.com"
+    }
+  ],
+  "repository": {
+    "type": "mercurial",
+    "url": "https://bitbucket.org/stephenwvickers/node-raw-socket"
+  },
+  "keywords": [
+    "checksum",
+    "checksums",
+    "htonl",
+    "htons",
+    "net",
+    "network",
+    "ntohl",
+    "ntohs",
+    "raw",
+    "raw-socket",
+    "raw-sockets",
+    "socket",
+    "sockets"
+  ],
+  "author": {
+    "name": "Stephen Vickers",
+    "email": "stephen.vickers.sv@gmail.com"
+  },
+  "license": "MIT",
+  "scripts": {
+    "install": "node-gyp rebuild"
+  },
+  "gypfile": true,
+  "readme": "\n# raw-socket - [homepage][homepage]\n\nThis module implements raw sockets for [Node.js][nodejs].\n\n*This module has been created primarily to facilitate implementation of the\n[net-ping][net-ping] module.*\n\nThis module is installed using [node package manager (npm)][npm]:\n\n    # This module contains C++ source code which will be compiled\n    # during installation using node-gyp.  A suitable build chain\n    # must be configured before installation.\n    \n    npm install raw-socket\n\nIt is loaded using the `require()` function:\n\n    var raw = require (\"raw-socket\");\n\nRaw sockets can then be created, and data sent using [Node.js][nodejs]\n`Buffer` objects:\n\n    var socket = raw.createSocket ({protocol: raw.Protocol.None});\n\n    socket.on (\"message\", function (buffer, source) {\n        console.log (\"received \" + buffer.length + \" bytes from \" + source);\n    });\n    \n    socket.send (buffer, 0, buffer.length, \"1.1.1.1\", function (error, bytes
 ) {\n        if (error)\n            console.log (error.toString ());\n    });\n\n[homepage]: http://re-tool.org \"Homepage\"\n[nodejs]: http://nodejs.org \"Node.js\"\n[net-ping]: https://npmjs.org/package/net-ping \"net-ping\"\n[npm]: https://npmjs.org/ \"npm\"\n\n# Network Protocol Support\n\nThe raw sockets exposed by this module support IPv4 and IPv6.\n\nRaw sockets are created using the operating systems `socket()` function, and\nthe socket type `SOCK_RAW` specified.\n\n# Raw Socket Behaviour\n\nRaw sockets behave in different ways depending on operating system and\nversion, and may support different socket options.\n\nSome operating system versions may restrict the use of raw sockets to\nprivileged users.  If this is the case an exception will be thrown on socket\ncreation using a message similar to `Operation not permitted` (this message\nis likely to be different depending on operating system version).\n\nThe appropriate operating system documentation should be consulted to\
 nunderstand how raw sockets will behave before attempting to use this module.\n\n# Keeping The [Node.js][nodejs] Event Loop Alive\n\nThis module uses the `libuv` library to integrate into the [Node.js][nodejs]\nevent loop - this library is also used by [Node.js][nodejs].  An underlying\n `libuv` library `poll_handle_t` event watcher is used to monitor the\nunderlying operating system raw socket used by a socket object.\n\nAll the while a socket object exists, and the sockets `close()` method has not\nbeen called, the raw socket will keep the [Node.js][nodejs] event loop alive\nwhich will prevent a program from exiting.\n\nThis module exports four methods which a program can use to control this\nbehaviour.\n\nThe `pauseRecv()` and `pauseSend()` methods stop the underlying `poll_handle_t`\nevent watcher used by a socket from monitoring for readable and writeable\nevents.  While the `resumeRecv()` and `resumeSend()` methods start the\nunderlying `poll_handle_t` event watcher used by a 
 socket allowing it to\nmonitor for readable and writeable events.\n\nEach socket object also exports the `recvPaused` and `sendPaused` boolean\nattributes to determine the state of the underlying `poll_handle_t` event\nwatcher used by a socket.\n\nSocket creation can be expensive on some platforms, and the above methods offer\nan alternative to closing and deleting a socket to prevent it from keeping the\n[Node.js][nodejs] event loop alive.\n\nThe [Node.js][nodejs] [net-ping][net-ping] module offers a concrete example\nof using these methods.  Since [Node.js][nodejs] offers no raw socket support\nthis module is used to implement ICMP echo (ping) support.  Once all ping\nrequests have been processed by the [net-ping][net-ping] module the\n`pauseRecv()` and `pauseSend()` methods are used to allow a program to exit if\nrequired.\n\nThe following example stops the underlying `poll_handle_t` event watcher used\nby a socket from generating writeable events, however since readable events\n
 will still be watched for the program will not exit immediately:\n\n    if (! socket.recvPaused)\n        socket.pauseRecv ();\n\nThe following can the be used to resume readable events:\n\n    if (socket.recvPaused)\n        socket.resumeRecv ();\n\nThe following example stops the underlying `poll_handle_t` event watcher used\nby a socket from generating both readable and writeable events, if no other\nevent watchers have been setup (e.g. `setTimeout()`) the program will exit.\n\n    if (! socket.recvPaused)\n        socket.pauseRecv ();\n    if (! socket.sendPaused)\n        socket.pauseSend ();\n\nThe following can the be used to resume both readable and writeable events:\n\n    if (socket.recvPaused)\n        socket.resumeRecv ();\n    if (socket.sendPaused)\n        socket.resumeSend ();\n\nWhen data is sent using a sockets `send()` method the `resumeSend()` method\nwill be called if the sockets `sendPaused` attribute is `true`, however the\n`resumeRecv()` method will not be ca
 lled regardless of whether the sockets\n`recvPaused` attribute is `true` or `false`.\n\n[nodejs]: http://nodejs.org \"Node.js\"\n[net-ping]: http://npmjs.org/package/net-ping \"net-ping\"\n\n# Constants\n\nThe following sections describe constants exported and used by this module.\n\n## raw.AddressFamily\n\nThis object contains constants which can be used for the `addressFamily`\noption to the `createSocket()` function exposed by this module.  This option\nspecifies the IP protocol version to use when creating the raw socket.\n\nThe following constants are defined in this object:\n\n * `IPv4` - IPv4 protocol\n * `IPv6` - IPv6 protocol\n\n## raw.Protocol\n\nThis object contains constants which can be used for the `protocol` option to\nthe `createSocket()` function exposed by this module.  This option specifies\nthe protocol number to place in the protocol field of IP headers generated by\nthe operating system.\n\nThe following constants are defined in this object:\n\n * `None` - prot
 ocol number 0\n * `ICMP` - protocol number 1\n * `TCP` - protocol number 6\n * `UDP` - protocol number 17\n * `ICMPv6` - protocol number 58\n\n## raw.SocketLevel\n\nThis object contains constants which can be used for the `level` parameter to\nthe `getOption()` and `setOption()` methods exposed by this module.\n\nThe following constants are defined in this object:\n\n * `SOL_SOCKET`\n * `IPPROTO_IP`\n * `IPPROTO_IPV6`\n\n## raw.SocketOption\n\nThis object contains constants which can be used for the `option` parameter to\nthe `getOption()` and `setOption()` methods exposed by this module.\n\nThe following constants are defined in this object:\n\n * `SO_RCVBUF`\n * `SO_RCVTIMEO`\n * `SO_SNDBUF`\n * `SO_SNDTIMEO`\n * `IP_HDRINCL`\n * `IP_OPTIONS`\n * `IP_TOS`\n * `IP_TTL`\n * `IPV6_TTL`\n * `IPV6_UNICAST_HOPS`\n * `IPV6_V6ONLY`\n\n*The `IPV6_TTL` socket option is not known to be defined by any operating\nsystem, it is provided in convenience to be synonymous with IPv4*\n\nFor Windows 
 platforms the following constant is also defined:\n\n * `IPV6_HDRINCL`\n\n# Using This Module\n\nRaw sockets are represented by an instance of the `Socket` class.  This\nmodule exports the `createSocket()` function which is used to create\ninstances of the `Socket` class.\n\nThe module also exports a number of stubs which call through to a number of\nfunctions provided by the operating system, i.e. `htonl()`.\n\nThis module also exports a function to generate protocol checksums.\n\n## raw.createChecksum (bufferOrObject, [bufferOrObject, ...])\n\nThe `createChecksum()` function creates and returns a 16 bit one's complement\nof the one's complement sum for all the data specified in one or more\n[Node.js][nodejs] `Buffer` objects.  This is useful for creating checksums for\nprotocols such as IP, TCP, UDP and ICMP.\n\nThe `bufferOrObject` parameter can be one of two types.  The first is a\n[Node.js][nodejs] `Buffer` object.  In this case a checksum is calculated from\nall the data it co
 ntains.  The `bufferOrObject` parameter can also be an\nobject which must contain the following attributes:\n\n * `buffer` - A [Node.js][nodejs] `Buffer` object which contains data which\n   to generate a checksum for\n * `offset` - Skip this number of bytes from the beginning of `buffer`\n * `length` - Only generate a checksum for this number of bytes in `buffer`\n   from `offset`\n\nThe second parameter type provides control over how much of the data in a\n[Node.js][nodejs] `Buffer` object a checksum should be generated for.\n\nWhen more than one parameter is passed a single checksum is calculated as if\nthe data in in all parameters were in a single buffer.  This is useful for\nwhen calulating checksums for TCP and UDP for example - where a psuedo header\nmust be created and used for checksum calculation.\n\nIn this case two buffers can be passed, the first containing the psuedo header\nand the second containing the real TCP packet, and the offset and length\nparameters used to s
 pecify the bounds of the TCP packet payload.\n\nThe following example generates a checksum for a TCP packet and its psuedo\nheader:\n\n    var sum = raw.createChecksum (pseudo_header, {buffer: tcp_packet,\n            offset: 20, length: tcp_packet.length - 20});\n\nBoth buffers will be treated as one, i.e. as if the data at offset `20` in\n`tcp_packet` had followed all data in `pseudo_header` - as if they were one\nbuffer.\n\n## raw.writeChecksum (buffer, offset, checksum)\n\nThe `writeChecksum()` function writes a checksum created by the\n`raw.createChecksum()` function to the [Node.js][nodejs] `Buffer` object \n`buffer` at offsets `offset` and `offset` + 1.\n\nThe following example generates and writes a checksum at offset `2` in a\n[Node.js][nodejs] `Buffer` object:\n\n    raw.writeChecksum (buffer, 2, raw.createChecksum (buffer));\n\n## raw.htonl (uint32)\n\nThe `htonl()` function converts a 32 bit unsigned integer from host byte\norder to network byte order and returns the res
 ult.  This function is simply\na stub through to the operating systems `htonl()` function.\n\n## raw.htons (uint16)\n\nThe `htons()` function converts a 16 bit unsigned integer from host byte\norder to network byte order and returns the result.  This function is simply\na stub through to the operating systems `htons()` function.\n\n## raw.ntohl (uint32)\n\nThe `ntohl()` function converts a 32 bit unsigned integer from network byte\norder to host byte order and returns the result.  This function is simply\na stub through to the operating systems `ntohl()` function.\n\n## raw.ntohs (uint16)\n\nThe `ntohs()` function converts a 16 bit unsigned integer from network byte\norder to host byte order and returns the result.  This function is simply\na stub through to the operating systems `ntohs()` function.\n\n## raw.createSocket ([options])\n\nThe `createSocket()` function instantiates and returns an instance of the\n`Socket` class:\n\n    // Default options\n    var options = {\n        a
 ddressFamily: raw.AddressFamily.IPv4,\n        protocol: raw.Protocol.None,\n        bufferSize: 4096,\n        generateChecksums: false,\n        checksumOffset: 0\n    };\n    \n    var socket = raw.createSocket (options);\n\nThe optional `options` parameter is an object, and can contain the following\nitems:\n\n * `addressFamily` - Either the constant `raw.AddressFamily.IPv4` or the\n   constant `raw.AddressFamily.IPv6`, defaults to the constant\n   `raw.AddressFamily.IPv4`\n * `protocol` - Either one of the constants defined in the `raw.Protocol`\n   object or the protocol number to use for the socket, defaults to the\n   consant `raw.Protocol.None`\n * `bufferSize` - Size, in bytes, of the sockets internal receive buffer,\n   defaults to 4096\n * `generateChecksums` - Either `true` or `false` to enable or disable the\n   automatic checksum generation feature, defaults to `false`\n * `checksumOffset` - When `generateChecksums` is `true` specifies how many\n   bytes to index into
  the send buffer to write automatically generated\n   checksums, defaults to `0`\n\nAn exception will be thrown if the underlying raw socket could not be created.\nThe error will be an instance of the `Error` class.\n\nThe `protocol` parameter, or its default value of the constant\n`raw.Protocol.None`, will be specified in the protocol field of each IP\nheader.\n\n## socket.on (\"close\", callback)\n\nThe `close` event is emitted by the socket when the underlying raw socket\nis closed.\n\nNo arguments are passed to the callback.\n\nThe following example prints a message to the console when the socket is\nclosed:\n\n    socket.on (\"close\", function () {\n        console.log (\"socket closed\");\n    });\n\n## socket.on (\"error\", callback)\n\nThe `error` event is emitted by the socket when an error occurs sending or\nreceiving data.\n\nThe following arguments will be passed to the `callback` function:\n\n * `error` - An instance of the `Error` class, the exposed `message` attribut
 e\n   will contain a detailed error message.\n\nThe following example prints a message to the console when an error occurs,\nafter which the socket is closed:\n\n    socket.on (\"error\", function (error) {\n        console.log (error.toString ());\n        socket.close ();\n    });\n\n## socket.on (\"message\", callback)\n\nThe `message` event is emitted by the socket when data has been received.\n\nThe following arguments will be passed to the `callback` function:\n\n * `buffer` - A [Node.js][nodejs] `Buffer` object containing the data\n   received, the buffer will be sized to fit the data received, that is the\n   `length` attribute of buffer will specify how many bytes were received\n * `address` - For IPv4 raw sockets the dotted quad formatted source IP\n   address of the message, e.g `192.168.1.254`, for IPv6 raw sockets the\n   compressed formatted source IP address of the message, e.g.\n   `fe80::a00:27ff:fe2a:3427`\n\nThe following example prints received messages in hexade
 cimal to the console:\n\n    socket.on (\"message\", function (buffer, address) {\n        console.log (\"received \" + buffer.length + \" bytes from \" + address\n                + \": \" + buffer.toString (\"hex\"));\n    });\n\n## socket.generateChecksums (generate, offset)\n\nThe `generateChecksums()` method is used to specify whether automatic checksum\ngeneration should be performed by the socket.\n\nThe `generate` parameter is either `true` or `false` to enable or disable the\nfeature.  The optional `offset` parameter specifies how many bytes to index\ninto the send buffer when writing the generated checksum to the send buffer.\n\nThe following example enables automatic checksum generation at offset 2\nresulting in checksums being written to byte 3 and 4 of the send buffer\n(offsets start from 0, meaning byte 1):\n\n    socket.generateChecksums (true, 2);\n\n## socket.getOption (level, option, buffer, length)\n\nThe `getOption()` method gets a socket option using the operatin
 g systems\n`getsockopt()` function.\n\nThe `level` parameter is one of the constants defined in the `raw.SocketLevel`\nobject.  The `option` parameter is one of the constants defined in the\n`raw.SocketOption` object.  The `buffer` parameter is a [Node.js][nodejs]\n`Buffer` object where the socket option value will be written.  The `length`\nparameter specifies the size of the `buffer` parameter.\n\nIf an error occurs an exception will be thrown, the exception will be an\ninstance of the `Error` class.\n\nThe number of bytes written into the `buffer` parameter is returned, and can\ndiffer from the amount of space available.\n\nThe following example retrieves the current value of `IP_TTL` socket option:\n\n    var level = raw.SocketLevel.IPPROTO_IP;\n    var option = raw.SocketOption.IP_TTL;\n    \n    # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used\n    var buffer = new Buffer (4);\n    \n    var written = socket.getOption (level, option, buffer, buffer.len
 gth);\n    \n    console.log (buffer.toString (\"hex\"), 0, written);\n\n## socket.send (buffer, offset, length, address, beforeCallback, afterCallback)\n\nThe `send()` method sends data to a remote host.\n\nThe `buffer` parameter is a [Node.js][nodejs] `Buffer` object containing the\ndata to be sent.  The `length` parameter specifies how many bytes from\n`buffer`, beginning at offset `offset`, to send.  For IPv4 raw sockets the\n`address` parameter contains the dotted quad formatted IP address of the\nremote host to send the data to, e.g `192.168.1.254`, for IPv6 raw sockets the\n`address` parameter contains the compressed formatted IP address of the remote\nhost to send the data to, e.g. `fe80::a00:27ff:fe2a:3427`.  If provided the\noptional `beforeCallback` function is called right before the data is actually\nsent using the underlying raw socket, giving users the opportunity to perform\npre-send actions such as setting a socket option, e.g. the IP header TTL.  No\narguments are 
 passed to the `beforeCallback` function.  The `afterCallback`\nfunction is called once the data has been sent.  The following arguments will\nbe passed to the `afterCallback` function:\n\n * `error` - Instance of the `Error` class, or `null` if no error occurred\n * `bytes` - Number of bytes sent\n\nThe following example sends a ICMP ping message to a remote host, before the\nrequest is actually sent the IP header TTL is modified, and modified again\nafter the data has been sent:\n\n    // ICMP echo (ping) request, checksum should be ok\n    var buffer = new Buffer ([\n            0x08, 0x00, 0x43, 0x52, 0x00, 0x01, 0x0a, 0x09,\n            0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,\n            0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,\n            0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x61,\n            0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69]);\n\n    var socketLevel = raw.SocketLevel.IPPROTO_IP\n    var socketOption = raw.SocketOption.IP_TTL;\n\n    functio
 n beforeSend () {\n        socket.setOption (socketLevel, socketOption, 1);\n    }\n    \n    function afterSend (error, bytes) {\n        if (error)\n            console.log (error.toString ());\n        else\n            console.log (\"sent \" + bytes + \" bytes\");\n        \n        socket.setOption (socketLevel, socketOption, 1);\n    }\n\n    socket.send (buffer, 0, buffer.length, target, beforeSend, afterSend);\n\n## socket.setOption (level, option, buffer, length)\n\nThe `setOption()` method sets a socket option using the operating systems\n`setsockopt()` function.\n\nThe `level` parameter is one of the constants defined in the `raw.SocketLevel`\nobject.  The `option` parameter is one of the constants defined in the\n`raw.SocketOption` object.  The `buffer` parameter is a [Node.js][nodejs]\n`Buffer` object where the socket option value is specified.  The `length`\nparameter specifies how much space the option value occupies in the `buffer`\nparameter.\n\nIf an error occurs a
 n exception will be thrown, the exception will be an\ninstance of the `Error` class.\n\nThe following example sets the value of `IP_TTL` socket option to `1`:\n\n    var level = raw.SocketLevel.IPPROTO_IP;\n    var option = raw.SocketOption.IP_TTL;\n    \n    # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used,\n    # x86 computers use little-endian format so specify bytes reverse order\n    var buffer = new Buffer ([0x01, 0x00, 0x00, 0x00]);\n    \n    socket.setOption (level, option, buffer, buffer.length);\n\nTo avoid dealing with endianess the `setOption()` method supports a three\nargument form which can be used for socket options requiring a 32bit unsigned\ninteger value (for example the `IP_TTL` socket option used in the previous\nexample).  Its signature is as follows:\n\n    socket.setOption (level, option, value)\n\nThe previous example can be re-written to use this form:\n\n    var level = raw.SocketLevel.IPPROTO_IP;\n    var option = raw.SocketOptio
 n.IP_TTL;\n\n    socket.setOption (level, option, 1);\n\n# Example Programs\n\nExample programs are included under the modules `example` directory.\n\n# Bugs & Known Issues\n\nNone, yet!\n\nBug reports should be sent to <st...@gmail.com>.\n\n# Changes\n\n## Version 1.0.0 - 29/01/2013\n\n * Initial release\n\n## Version 1.0.1 - 01/02/2013\n\n * Move `SOCKET_ERRNO` define from `raw.cc` to `raw.h`\n * Error in exception thrown by `SocketWrap::New` in `raw.cc` stated that two\n   arguments were required, this should be one\n * Corrections to the README.md\n * Missing includes causes compilation error on some systems (maybe Node\n   version dependant)\n\n## Version 1.0.2 - 02/02/2013\n\n * Support automatic checksum generation\n\n## Version 1.1.0 - 13/02/2013\n\n * The [net-ping][net-ping] module is now implemented so update the note about\n   it in the first section of the README.md\n * Support IPv6\n * Support the `IP_HDRINCL` socket option via the `noIpHeader` option to t
 he\n   `createSocket()` function and the `noIpHeader()` method exposed by the\n   `Socket` class\n\n## Version 1.1.1 - 14/02/2013\n\n * IP addresses not being validated\n\n## Version 1.1.2 - 15/02/2013\n\n * Default protocol option to `createSession()` was incorrect in the README.md\n * The `session.on(\"message\")` example used `message` instead of `buffer` in\n   the README.md\n\n## Version 1.1.3 - 04/03/2013\n\n * `raw.Socket.onSendReady()` emit's an error when `raw.SocketWrap.send()`\n   throws an exception when it should call the `req.callback` callback\n * Added the `pauseRecv()`, `resumeRecv()`, `pauseSend()` and `resumeSend()`\n   methods\n\n[net-ping]: https://npmjs.org/package/net-ping \"net-ping\"\n\n## Version 1.1.4 - 05/03/2013\n\n * Cleanup documentation for the `pauseSend()`, `pauseRecv()`, `resumeSend()`\n   and `resumeRecv()` methods in the README.md\n\n## Version 1.1.5 - 09/05/2013\n\n * Reformated lines in the README.md file inline with the rest of the file\n * Re
 moved the `noIpHeader()` method (the `setOption()` method should be\n   used to configure the `IP_HDRINCL` socket option - and possibly\n   `IPV6_HDRINCL` on Windows platforms), and removed the `Automatic IP Header\n   Generation` section from the README.md file\n * Added the `setOption()` and `getOption()` methods, and added the\n   `SocketLevel` and `SocketOption` constants\n * Tidied up the example program `ping-no-ip-header.js` (now uses the\n   `setOption()` method to configure the `IP_HDRINCL` socket option)\n * Tidied up the example program `ping6-no-ip-header.js` (now uses the\n   `setOption()` method to configure the `IPV6_HDRINCL` socket option)\n * Added the example program `get-option.js`\n * Added the example program `ping-set-option-ip-ttl.js`\n * Use MIT license instead of GPL\n\n## Version 1.1.6 - 18/05/2013\n\n * Added the `beforeCallback` parameter to the `send()` method, and renamed the\n   `callback` parameter to `afterCallback`\n * Fixed a few typos in the READM
 E.md file\n * Modified the example program `ping-set-option-ip-ttl.js` to use the\n   `beforeCallback` parameter to the `send()` method\n * The example program `ping6-no-ip-header.js` was not passing the correct\n   arguments to the `setOption()` method\n\n## Version 1.1.7 - 23/06/2013\n\n * Added the `htonl()`, `htons()`, `ntohl()`, and `ntohs()` functions, and\n   associated example programs\n * Added the `createChecksum()` function, and associated example program\n\n## Version 1.1.8 - 01/07/2013\n\n * Added the `writeChecksum()` function\n * Removed the \"Automated Checksum Generation\" feature - this has been\n   replaced with the `createChecksum()` and `writeChecksum()` functions\n\n## Version 1.2.0 - 02/07/2013\n\n * Up version number to 1.2.0 (we should have done this for 1.1.8 because it\n   introduced some API breaking changes)\n\n# Roadmap\n\nIn no particular order:\n\n * Enhance performance by moving the send queue into the C++ raw::SocketWrap\n   class\n\nSuggestions and
  requirements should be sent to <st...@gmail.com>.\n\n# License\n\nCopyright (c) 2013 Stephen Vickers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIAB
 ILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n# Author\n\nStephen Vickers <st...@gmail.com>\n",
+  "readmeFilename": "README.md",
+  "_id": "raw-socket@1.2.0",
+  "dist": {
+    "shasum": "11c8512e44e98801bcd918956fc8905b60823c7e"
+  },
+  "_from": "raw-socket@*",
+  "_resolved": "https://registry.npmjs.org/raw-socket/-/raw-socket-1.2.0.tgz"
+}