1 #ifndef __SPARC_IPSUM_H
2 #define __SPARC_IPSUM_H
3 /* ipsum.h: IP/UDP/TCP checksum routines on the Sparc.
4 *
5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
6 */
7
8 /*
9 * This routine computes a UDP checksum.
10 */
11 extern inline unsigned short udp_check(struct udphdr *uh, int len, u32 saddr, u32 daddr)
/* ![[previous]](../icons/n_left.png)
![[next]](../icons/right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
12 {
13 /* uhh.. eventually */
14 return 0;
15 }
16
17 /*
18 * This routine computes a TCP checksum.
19 */
20 extern inline unsigned short tcp_check(struct tcphdr *th, int len, u32 saddr, u32 daddr)
/* ![[previous]](../icons/left.png)
![[next]](../icons/right.png)
![[first]](../icons/first.png)
![[last]](../icons/last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
21 {
22 /* uhh.. eventually */
23 return 0;
24 }
25
26
27 /*
28 * This routine does all the checksum computations that don't
29 * require anything special (like copying or special headers).
30 */
31
32 extern inline unsigned short ip_compute_csum(unsigned char * buff, int len)
/* ![[previous]](../icons/left.png)
![[next]](../icons/right.png)
![[first]](../icons/first.png)
![[last]](../icons/last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
33 {
34 /* uhh.. eventually */
35 return 0;
36 }
37
38 /*
39 * This is a version of ip_compute_csum() optimized for IP headers, which
40 * always checksum on 4 octet boundaries.
41 */
42
43 static inline unsigned short ip_fast_csum(unsigned char * buff, int wlen)
/* ![[previous]](../icons/left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
44 {
45 /* uhh.. eventually */
46 return 0;
47 }
48
49 #endif /* !(__SPARC_IPSUM_H) */