Date: Mon, 10 Oct 2011 00:10:12 GMT From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= <olivier@cochard.me> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/161368: [netrate] IPv6 patches for netblast/netsend/netreceive Message-ID: <201110100010.p9A0ACHG065751@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/161368; it has been noted by GNATS. From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= <olivier@cochard.me> To: bug-followup@freebsd.org Cc: Subject: Re: bin/161368: [netrate] IPv6 patches for netblast/netsend/netreceive Date: Mon, 10 Oct 2011 02:03:38 +0200 --0016364ee56409ba9d04aee68777 Content-Type: text/plain; charset=ISO-8859-1 Here is a new improvement for netblast that use getaddrinfo in place of sockaddr_in. I will modify netsend for using getaddrinfo too, but it's more complex. Regards, Olivier --0016364ee56409ba9d04aee68777 Content-Type: text/plain; charset=US-ASCII; name="netblast.patch.diff.txt" Content-Disposition: attachment; filename="netblast.patch.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gtkp43850 LS0tIG5ldHJhdGUub3JpZy9uZXRibGFzdC9uZXRibGFzdC5jCTIwMTEtMTAtMDcgMTE6Mjg6NDMu MDAwMDAwMDAwICswMjAwCisrKyBuZXRyYXRlL25ldGJsYXN0L25ldGJsYXN0LmMJMjAxMS0xMC0x MCAwMTozNToxMS4wMDAwMDAwMDAgKzAyMDAKQEAgLTMyLDEzICszMiwxMyBAQAogI2luY2x1ZGUg PHN5cy90aW1lLmg+CiAKICNpbmNsdWRlIDxuZXRpbmV0L2luLmg+Ci0KLSNpbmNsdWRlIDxhcnBh L2luZXQuaD4KKyNpbmNsdWRlIDxuZXRkYi5oPgkJCS8qIGdldGFkZHJpbmZvICovCiAKICNpbmNs dWRlIDxzaWduYWwuaD4KICNpbmNsdWRlIDxzdGRpby5oPgogI2luY2x1ZGUgPHN0ZGxpYi5oPgog I2luY2x1ZGUgPHN0cmluZy5oPgorI2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ZHJpbmZvIik7CisJCXJl dHVybiAoLTEpOworCQkvKk5PVFJFQUNIRUQqLworCX0KKwlzID0gLTE7CisJZm9yIChyZXMgPSBy ZXMwOyByZXM7IHJlcyA9IHJlcy0+YWlfbmV4dCkgeworCQlzID0gc29ja2V0KHJlcy0+YWlfZmFt aWx5LCByZXMtPmFpX3NvY2t0eXBlLCAwKTsKKwkJaWYgKHMgPCAwKSB7CisJCQljYXVzZSA9ICJz b2NrZXQiOworCQkJY29udGludWU7CisJCX0KIAotCXMgPSBzb2NrZXQoUEZfSU5FVCwgU09DS19E R1JBTSwgMCk7Ci0JaWYgKHMgPT0gLTEpIHsKLQkJcGVycm9yKCJzb2NrZXQiKTsKLQkJcmV0dXJu ICgtMSk7Ci0JfQorCQlpZiAoY29ubmVjdChzLCByZXMtPmFpX2FkZHIsIHJlcy0+YWlfYWRkcmxl bikgPCAwKSB7CisJCQljYXVzZSA9ICJjb25uZWN0IjsKKwkJCWNsb3NlKHMpOworCQkJcyA9IC0x OworCQkJY29udGludWU7CisJCX0KIAotCWlmIChjb25uZWN0KHMsIChzdHJ1Y3Qgc29ja2FkZHIg Kikmc2luLCBzaXplb2Yoc2luKSkgPCAwKSB7Ci0JCXBlcnJvcigiY29ubmVjdCIpOworCQlicmVh azsgIC8qIG9rYXkgd2UgZ290IG9uZSAqLworCX0KKwlpZiAocyA8IDApIHsKKwkJcGVycm9yKGNh dXNlKTsKIAkJcmV0dXJuICgtMSk7CisJCS8qTk9UUkVBQ0hFRCovCiAJfQogCiAJcmV0dXJuIChi bGFzdF9sb29wKHMsIGR1cmF0aW9uLCBwYWNrZXQsIHBheWxvYWRzaXplKSk7CisKIH0KIAo= --0016364ee56409ba9d04aee68777--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110100010.p9A0ACHG065751>