Commits

Anonymous committed 7a19111

Use raw.Socket.createChecksum() instead of automatic checksum generation, Update version in package.json to 1.1.8, Added version 1.1.8 to README.md

Comments (0)

Files changed (3)

  * Response callback for `pingHost()` now includes two instances of the
    `Date` class to specify when a request was sent and a response received
 
+## Version 1.1.8 - 01/07/2013
+
+ * Use `raw.Socket.createChecksum()` instead of automatic checksum generation
+
 # Roadmap
 
 Suggestions and requirements should be sent to <stephen.vickers.sv@gmail.com>.
 		protocol: protocol
 	};
 
-	// For IPv6 the operating system will calculate checksums for us
-	if (this.addressFamily != raw.AddressFamily.IPv6) {
-		options.generateChecksums = true;
-		options.checksumOffset = 2;
-	}
-
 	this.socket = raw.createSocket (options);
 	this.socket.on ("error", this.onSocketError.bind (me));
 	this.socket.on ("close", this.onSocketClose.bind (me));
 	buffer.writeUInt16BE (this.sessionId, 4);
 	buffer.writeUInt16BE (req.id, 6);
 	
-	// Checksums are be generated by our raw.Socket instance
+	var checksum = raw.createChecksum (buffer);
+	buffer.writeUInt8 ((checksum & 0xff00) >> 8, 2);
+	buffer.writeUInt8 (checksum & 0xff, 3);
 
 	return buffer;
 };
 {
   "name": "net-ping",
-  "version": "1.1.7",
-  "description": "Ping many hosts at once.",
+  "version": "1.1.8",
+  "description": "Ping and trace route to many hosts at once.",
   "main": "index.js",
   "directories": {
     "example": "example"