Date: Tue, 26 Apr 2005 21:12:53 +0200 From: Jose M Rodriguez <josemi@freebsd.jazztel.es> To: freebsd-current@freebsd.org Cc: Christian Weisgerber <naddy@mips.inka.de> Subject: Re: rigth crc32 implementation Message-ID: <200504262112.54889.josemi@redesjm.local> In-Reply-To: <d4m2di$2849$2@kemoauc.mips.inka.de> References: <200504261143.55195.josemi@redesjm.local> <d4m2di$2849$2@kemoauc.mips.inka.de>
next in thread | previous in thread | raw e-mail | index | archive | help
El Martes, 26 de Abril de 2005 20:48, Christian Weisgerber escribi=F3: > Jose M Rodriguez <josemi@freebsd.jazztel.es> wrote: > > Working on usb_adslsubr{.c,.h} > > > > About how to implement crc32 > > > > My first think was use the libkern based one, but I found: > > sys/linkern/crc32.c > > Not sure what's required for usb_adsl, but just about all the > ethernet drivers use ether_crc32_be() or ether_crc32_le() from > sys/net/if_ethersubr.c. =46or what I Know, this is used for unicast masking calculations. I think using sys/kern/crc32.c is more in the way, but the problem is=20 the same. Those functions are oriented to calculate the crc of a formed string,=20 while I need do this 'in transit', with the classical crc_init(&acum),=20 crc_do(&acum, &str, len), crc=3Dcrc_get(&acum) But I don't know if crc32.c will be right in non-i386 like endian=20 systems. I allways see this implemented with a previous crc table=20 generation. If (I Hope) there aren't endian problems with crc32.c (I doesn't have=20 the hard to test this), my plans are add those 2/3 functions to=20 sys/kern/crc32.c using the same table. Any comments on this are welcome. =2D- josemi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504262112.54889.josemi>