root/arch/alpha/lib/checksum.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. ip_fast_csum
  2. csum_tcpudp_magic
  3. csum_partial
  4. csum_partial_copyffs
  5. ip_compute_csum

   1 /*
   2  * arch/alpha/lib/checksum.c
   3  *
   4  * This file contains network checksum routines that are better done
   5  * in an architecture-specific manner due to speed..
   6  */
   7 
   8 /*
   9  *      This is a version of ip_compute_csum() optimized for IP headers,
  10  *      which always checksum on 4 octet boundaries.
  11  */
  12 unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl)
     /* [previous][next][first][last][top][bottom][index][help] */
  13 {
  14         /* not yet */
  15         return 0;
  16 }
  17 
  18 /*
  19  * computes the checksum of the TCP/UDP pseudo-header
  20  * returns a 16-bit checksum, already complemented
  21  */
  22 unsigned short int csum_tcpudp_magic(unsigned long saddr,
     /* [previous][next][first][last][top][bottom][index][help] */
  23                                    unsigned long daddr,
  24                                    unsigned short len,
  25                                    unsigned short proto,
  26                                    unsigned int sum)
  27 {
  28         /* not yet */
  29         return 0;
  30 }
  31 
  32 /*
  33  * computes the checksum of a memory block at buff, length len,
  34  * and adds in "sum" (32-bit)
  35  *
  36  * returns a 32-bit number suitable for feeding into itself
  37  * or csum_tcpudp_magic
  38  *
  39  * this function must be called with even lengths, except
  40  * for the last fragment, which may be odd
  41  *
  42  * it's best to have buff aligned on a 32-bit boundary
  43  */
  44 unsigned int csum_partial(unsigned char * buff, int len, unsigned int sum)
     /* [previous][next][first][last][top][bottom][index][help] */
  45 {
  46         /* not yet */
  47         return 0;
  48 }
  49 
  50 /*
  51  * the same as csum_partial, but copies from fs:src while it
  52  * checksums
  53  *
  54  * here even more important to align src and dst on a 32-bit (or even
  55  * better 64-bit) boundary
  56  */
  57 
  58 unsigned int csum_partial_copyffs( char *src, char *dst, int len, int sum)
     /* [previous][next][first][last][top][bottom][index][help] */
  59 {
  60         /* not yet */
  61         return 0;
  62 }
  63 
  64 
  65 /*
  66  * this routine is used for miscellaneous IP-like checksums, mainly
  67  * in icmp.c
  68  */
  69 unsigned short ip_compute_csum(unsigned char * buff, int len)
     /* [previous][next][first][last][top][bottom][index][help] */
  70 {
  71         /* not yet */
  72         return 0;
  73 }

/* [previous][next][first][last][top][bottom][index][help] */