linux/include/asm-generic/checksum.h
<<
> > p/spa pspa class="lxr_search"> > ="+search" method="post" onsubmit="return do_search(this);"> > > > Search > p/spa > ="ajax+*" method="post" onsubmit="return false;"> pinput typ"v2hidden" nam"v2ajax_lookup" idv2ajax_lookup" lue="v2"> >
pdiv idv2file_contents"
o o1p/a>#ifndefopa href="+code=__ASM_GENERIC_CHECKSUM_H" class="sref">__ASM_GENERIC_CHECKSUM_Hp/a> o o2p/a>#defineopa href="+code=__ASM_GENERIC_CHECKSUM_H" class="sref">__ASM_GENERIC_CHECKSUM_Hp/a> o o3p/a> o o4p/a>pspa
 class="comment">/*p/spa
  o o5p/a>pspa
 class="comment"> * computes the checksum of a memory block at buff, length len,p/spa
  o o6p/a>pspa
 class="comment"> * and adds in "sum" (32-bit)p/spa
  o o7p/a>pspa
 class="comment"> *p/spa
  o o8p/a>pspa
 class="comment"> * returns a 32-bit number suitable for feeding into itselfp/spa
  o o9p/a>pspa
 class="comment"> * or csum_tcpudp_magicp/spa
  o pspa
 class="comment"> *p/spa
  o 11p/a>pspa
 class="comment"> * this funcon>
 must be called with even lengths, exceptp/spa
  o 12p/a>pspa
 class="comment"> * for the last fragment, which may be oddp/spa
  o 13opa>pspa
 class="comment"> *p/spa
  o 14p/a>pspa
 class="comment"> * it's best to have buff aligned >
 a 32-bit boundaryp/spa
  o 15p/a>pspa
 class="comment"> */p/spa
  o 16p/a>extern pa href="+code=__wsum" class="sref">__wsump/a> pa href="+code=csum_partial" class="sref">csum_partialp/a>(const void *pa href="+code=buff" class="sref">buffp/a>, int pa href="+code=len" class="sref">lenp/a>, pa href="+code=__wsum" class="sref">__wsump/a> pa href="+code=sum" class="sref">sump/a>); o 17p/a> o 18p/a>pspa
 class="comment">/*p/spa
  o 19p/a>pspa
 class="comment"> * the sam" as csum_partial, but copies from src while itp/spa
  o 2/opa>pspa
 class="comment"> * checksumsp/spa
  o 21p/a>pspa
 class="comment"> *p/spa
  o 22p/a>pspa
 class="comment"> * here even more important to align src and dst >
 a 32-bit (or evenp/spa
  o 23opa>pspa
 class="comment"> * better 64-bit) boundaryp/spa
  o 24p/a>pspa
 class="comment"> */p/spa
  o 25p/a>extern pa href="+code=__wsum" class="sref">__wsump/a> pa href="+code=csum_partial_copy" class="sref">csum_partial_copyp/a>(const void *pa href="+code=src" class="sref">srcp/a>, void *pa href="+code=dst" class="sref">dstp/a>, int pa href="+code=len" class="sref">lenp/a>, pa href="+code=__wsum" class="sref">__wsump/a> pa href="+code=sum" class="sref">sump/a>); o 26p/a> o 27p/a>pspa
 class="comment">/*p/spa
  o 28p/a>pspa
 class="comment"> * the sam" as csum_partial_copy, but copies from user space.p/spa
  o 29p/a>pspa
 class="comment"> *p/spa
  o 3/opa>pspa
 class="comment"> * here even more important to align src and dst >
 a 32-bit (or evenp/spa
  o 31p/a>pspa
 class="comment"> * better 64-bit) boundaryp/spa
  o 32p/a>pspa
 class="comment"> */p/spa
  o 33p/a>extern pa href="+code=__wsum" class="sref">__wsump/a> pa href="+code=csum_partial_copy_from_user" class="sref">csum_partial_copy_from_userp/a>(const void pa href="+code=__user" class="sref">__userp/a> *pa href="+code=src" class="sref">srcp/a>, void *pa href="+code=dst" class="sref">dstp/a>, o 34p/a>                                        int pa href="+code=len" class="sref">lenp/a>, pa href="+code=__wsum" class="sref">__wsump/a> pa href="+code=sum" class="sref">sump/a>, int *pa href="+code=csum_err" class="sref">csum_errp/a>); o 35p/a> o 36p/a>#ifndefopa href="+code=csum_partial_copy_nocheck" class="sref">csum_partial_copy_nocheckp/a> o 37p/a>#defineopa href="+code=csum_partial_copy_nocheck" class="sref">csum_partial_copy_nocheckp/a>(pa href="+code=src" class="sref">srcp/a>, pa href="+code=dst" class="sref">dstp/a>, pa href="+code=len" class="sref">lenp/a>, pa href="+code=sum" class="sref">sump/a>)   \ o 38p/a>        pa href="+code=csum_partial_copy" class="sref">csum_partial_copyp/a>((pa href="+code=src" class="sref">srcp/a>), (pa href="+code=dst" class="sref">dstp/a>), (pa href="+code=len" class="sref">lenp/a>), (pa href="+code=sum" class="sref">sump/a>)) o 39p/a>#endif o 40p/a> o 41p/a>pspa
 class="comment">/*p/spa
  o 42p/a>pspa
 class="comment"> * This is a versn>
 of ip_compute_csum() tionmized for IP headers,p/spa
  o 43opa>pspa
 class="comment"> * which always checksum on 4 octet boundaries.p/spa
  o 44p/a>pspa
 class="comment"> */p/spa
  o 45p/a>extern pa href="+code=__sum16" class="sref">__sum16p/a> pa href="+code=ip_fast_csum" class="sref">ip_fast_csump/a>(const void *pa href="+code=iph" class="sref">iphp/a>, unsigned int pa href="+code=ihl" class="sref">ihlp/a>); o 46p/a> o 47p/a>pspa
 class="comment">/*p/spa
  o 48p/a>pspa
 class="comment"> * Fold a partial checksump/spa
  o 49p/a>pspa
 class="comment"> */p/spa
  o 50p/a>staticsref">ip
   * better 648m"v2L45">o 45p/a>extern pa href="v2L44" ctomment">/*p/spa
 mH6"include/asm-v
	  >
  v2.6.2ndaryp/spa
   * whiclude/e=> * whiclude/e=> * whiclude/e=> * whicied with even lengtcomment"> */p/sp5enenp/a>),ss=e5a
 class="c2" idv2L32" class="line" nam"v2L32">o 3.am"v2L32">o 32p/a>pspa
 class="comment">s="sref">csum_partial_copy_from_f="include/asm-generic/checksum.hm_pa7a href="+code=__ASM_GENERIC_CHECKSUM_H" k value="v2.6.32213
	  >
  v2.6.32213v2.6.32213
	  >
  v2.6.32213v223" jgv  >
  v2.6.35210
t/asm-genenp/a>),ss=e5a
 class="comment/6m"v2L50">o 50p/at5* which 5lways checksum on 4 oct5t bou53nt">s="sref">csum_partial_chm_pa7a href="+code=__ASM_GENERIC_CHECKSUM_Hhm_pa7a href="+code=__ASM_& 0xffff) +ENERIC_CHECKSUM_Hhm_pa7a href="+code=__ASM_&"+searc 16e" nam"v2L46">o 46p/a> s="sref">csum_partial_chm_pa7a href="+code=__ASM_GENERIC_CHECKSUM_Hhm_pa7a href="+code=__ASM_& 0xffff) +ENERIC_CHECKSUM_Hhm_pa7a href="+code=__ASM_&"+searc 16e" nam"v2L46">o 46p/a> s="sref"ookup" NERIC_CHECKSUM_H" k value="v2.6.32213
	  >
  v2.6.32213v2.6.32213
  o 46p/a> o 46p/a> o 18p/a>pspa
 class="comment">5* Fold a5partial checksump/spa
 5 o 18p/a>pspa
 class="comment">5*/p/spa
5 o 48p/a>pspa
 class="comment">6 * bette6 648m"v2L45">o 45p/a>ex6ern p6-generic/checksum.h#L21" idv2L2o 48p/a>pspa
 class="comment">6ven leng6comment"> */p/sp5enenp/6>),ss6f="include/asm-generic/checksuhref="incl16dv2L3s="comme,-ger" cyL2o 13opa>pspa
 class="comment">6o 3.am"v6L32">o 32p/a>pspa
 clas6="com6checksum.h#L33" idv2L33" class="line" nam"v2L33">o 33p/a>extern pa href="+code=6* which 6lways checksum on 4 oct6t bou6"+code=csum_partial_copy_from_user" class="sref">csum_part nam"v2L33">o 33p/a>extern pa href="+code=6*/p/spa
6 
  v2.6.32213" be	 sm-generic/checksum.haddm.h#L35" idv2L35haddm=sum" class="sref">sumpbe	  >
  v2.6.32213" be	 sm-generic/checksum.daddm.h#L35" idv2L35daddm=sum" clude/asmshorclass="sref">__wsump/a> pa href="+code=sum" nam"v2L33">o 33p/a>extern pa href="+code=6computes6 the checksum of a memo6pa hr65nt">s="sref"""""""""clude/asmshorclass="sref">__wsproto/a> pa href="+cproto=sum" class="sref">sump/a>); o 26p/a> o 40p/a> o 18p/a>pspa
 class="comment">6* Fold a6partial checksump/spa
 6 o 18p/a>pspa
 class="comment">6*/p/spa
6 /*p/spa
 mH6"include/asm-v
	  >
  v2.6.2ndaryp/spa
  o o7p/a>pspa
 class="comment"> *p/ * bette7 648m"v2L45">o 45p/a>ex7ern p70heckscopy_nocheckp/a> 
  v2.6.32213" be	 sm-generic/checksum.haddm.h#L35" idv2L35haddm=sum" class="sref">sumpbe	  >
  v2.6.32213" be	 sm-generic/checksum.daddm.h#L35" idv2L35daddm=sum" clude/asmshorclass="sref">__wsump/a> pa href="+code=sum" nam"v2L33">o 3a>pspa
 class="comment"> *p/ven leng7comment"> */p/sp5enenp/7>),ss71 class="sref">lenp/a>,clude/asmshorclass="sref">__wsproto/a> pa href="+cproto=sum" class="sref">sump/a>); o 3a>pspa
 class="comment"> *p/o 3.am"v7L32">o 32p/a>pspa
 clas7="com725a
 class="c2" idv2L32" class="line" nam"v2L32"7* which 7lways checksum on 4 oct7t bou73nt">s="sref"ookup" -generic/checksum.h#L32" idv2L32" class="l align src and dst >
 a 32a> sudaddm.h#L35" idv2L35daddm=sum" ="sref">sump/a>)   \ su#L39" idv2L39" class="line"" nam"v2L26">o 26p/a> o 46p/a> o 40p/a> o o7p/a>pspa
 class="comment"> *p//spa
  o 48p/a>pspa
 class="comment">7* Fold a7partial checksump/spa
 7o 32p/a>pspa
 class="comment">7*/p/spa
7 o pspa
 class="comment">8 * bette8 648m"v2L45">o 45p/a>ex8ern p8-generic/checksum.h#L21" idv2s="line" nam"v2L33">o 33p/a>extern pa href="+code=8ven leng8comment"> */p/sp5enenp/8>),ss81="+code=ip_fast_csum" class="sref">ip_fast_csump/a>(const void *pa href="+codem-generic/chss="sref">iphp/a>,m-generic/ch int pa href="+code=ihl" class="enp/a>, pa href="+code=__wsum" class="sref">__wsump/a> pa href="+code=sum"" nam"v2L26">o 26p/a> o 32p/a>pspa
 clas8="com82i/asam"v2L7">o o7p/a>pspa
 class="comment"> *p8* which 8lways checksum on 4 oct8t bou83ass="line" um.h#L48" idv2L48" class h#L3" idv2L3" class="linv2s="line" nam"v2L33">o 33p/a>extern pa href="+code=8*/p/spa
8 
The original LXR software byn"incnam"v2L33http://source idge.net/projects/lxi">LXR 2L48unity__wsuma is expn p8" cal ef="inclbynnam"v2L33ma-lto:lxi@atic/.no+coxi@atic/.no__ws.
e" idv22/9c/ href="subfooe=i">
oxi.atic/.no kindly host43"bynnam"v2L33http://www.redpill-linpro.no+cRedpill Linpro AS__wsumprovider-genLtic/ s81=ul44" class="line" nam"v2L43d20s2checksum.h#L25idv2s services s=8*e 1995.he origina/bodytic/html>
Th