This source file includes following definitions.
- sys_ptrace
- sys_iopl
- sys_vm86
- sys_modify_ldt
- sys_quotactl
- sys_pipe
- sys_ipc
- sys_mmap
- halt
- _panic
- _warn
- ip_fast_csum
- ip_compute_csum
- udp_check
- tcp_check
- _do_bottom_half
- csum_partial
- csum_partial_copy
- csum_tcpudp_magic
1 #include <linux/in.h>
2
3 unsigned int csum_tcpudp_magic(void);
4 void halt(void);
5 void _do_bottom_half(void);
6
7 void sys_ptrace(void) { _panic("sys_ptrace"); }
8 void sys_iopl(void) { _panic("sys_iopl"); }
9 void sys_vm86(void) { _panic("sys_vm86"); }
10 void sys_modify_ldt(void) { _panic("sys_modify_ldt"); }
11 void sys_quotactl(void) { _panic("sys_quotactl"); }
12
13 void sys_pipe(void) {_panic("sys_pipe"); }
14 void sys_ipc(void) {_panic("sys_ipc"); }
15 void sys_mmap(void) {_panic("sys_mmap"); }
16
17
18
19
20 void halt(void)
21 {
22 _printk("\n...Halt!\n");
23 abort();
24 }
25
26 _panic(char *msg)
27 {
28 _printk("Panic: %s\n", msg);
29 printk("Panic: %s\n", msg);
30 abort();
31 }
32
33 _warn(char *msg)
34 {
35 _printk("*** Warning: %s UNIMPLEMENTED!\n", msg);
36 }
37
38 extern unsigned short _ip_fast_csum(unsigned char *buf, int len);
39
40 unsigned short
41 ip_fast_csum(unsigned char *buf, int len)
42 {
43 unsigned short _val;
44 _val = _ip_fast_csum(buf, len);
45 #if 0
46 printk("IP CKSUM(%x, %d) = %x\n", buf, len, _val);
47 #endif
48 return (_val);
49 }
50
51 extern unsigned short _ip_compute_csum(unsigned char *buf, int len);
52
53 unsigned short
54 ip_compute_csum(unsigned char *buf, int len)
55 {
56 unsigned short _val;
57 _val = _ip_compute_csum(buf, len);
58 #if 0
59 printk("Compute IP CKSUM(%x, %d) = %x\n", buf, len, _val);
60 #endif
61 return (_val);
62 }
63
64 unsigned short
65 _udp_check(unsigned char *buf, int len, int saddr, int daddr, int hdr);
66
67 unsigned short
68 udp_check(unsigned char *buf, int len, int saddr, int daddr)
69 {
70 unsigned short _val;
71 int hdr;
72 hdr = (len << 16) + IPPROTO_UDP;
73 _val = _udp_check(buf, len, saddr, daddr, hdr);
74 #if 0
75 printk("UDP CSUM(%x,%d,%x,%x) = %x\n", buf, len, saddr, daddr, _val);
76 dump_buf(buf, len);
77 #endif
78 return (_val);
79 }
80 #if 0
81 unsigned short
82 _tcp_check(unsigned char *buf, int len, int saddr, int daddr, int hdr);
83
84 unsigned short
85 tcp_check(unsigned char *buf, int len, int saddr, int daddr)
86 {
87 unsigned short _val;
88 int hdr;
89 hdr = (len << 16) + IPPROTO_TCP;
90 if (saddr == 0) saddr = ip_my_addr();
91 _val = _tcp_check(buf, len, saddr, daddr, hdr);
92 #if 0
93 printk("TCP CSUM(%x,%d,%x,%x) = %x\n", buf, len, saddr, daddr, _val);
94 dump_buf(buf, len);
95 #endif
96 return (_val);
97 }
98 #endif
99
100 void _do_bottom_half(void)
101 {
102 _enable_interrupts(1);
103 do_bottom_half();
104 _disable_interrupts();
105 }
106
107 unsigned int csum_partial(unsigned char * buff, int len, unsigned int sum)
108 {
109 panic("csum_partial");
110 }
111
112
113 unsigned int csum_partial_copy(char *src, char *dst, int len, int sum)
114 {
115 panic("csum_partial_copy");
116 }
117
118 unsigned int csum_tcpudp_magic()
119 {
120 }