Re: in_cksum() for ip packets with multiple mbufs
From: Simon 'corecode' Schubert (corecode_at_fs.ei.tum.de)
Date: 10/24/05
- Previous message: Simon 'corecode' Schubert: "Re: nvi for serious hacking"
- In reply to: kamal kc: "Re: in_cksum() for ip packets with multiple mbufs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 24 Oct 2005 11:51:01 +0200 To: kamal kc <kamal_ckk@yahoo.com>
kamal kc wrote:
> - final thing does this makes any difference
> (calling the htons() twice):
>
> ip->ip_id=htons(ip->ip_id);
> ip->ip_id=htons(ip->ip_id);
on little endian machines: yes. on big endian machines: no. So don't
do it. :)
freebsd has several fields of the ip headerin host byte order to speed
up access. they get converted to network byte order at a very late
stage of the ip output path.
cheers
simon
-- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low $$$ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \ _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Simon 'corecode' Schubert: "Re: nvi for serious hacking"
- In reply to: kamal kc: "Re: in_cksum() for ip packets with multiple mbufs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|