-
Notifications
You must be signed in to change notification settings - Fork 2
/
zombie.def
179 lines (137 loc) · 2.81 KB
/
zombie.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
;;;
;;; Some common definitions
;;;
CPS extern
dev_send extern
dev_poll extern
dev_init extern
dev_setaddr extern
arp_setbroad extern
arp_init extern
arp_in extern
arp_resolve extern
memclr extern
memcpy extern
ip_init extern
ip_in extern
ip_cont_filter extern
ip_out extern
ip_send extern
ip_cmp extern
ip_cksum extern
ip_setmask extern
proto extern
ripaddr extern
dipaddr extern
ipbroad extern
rlen extern
ipnet extern
ipmask extern
gateway extern
dns extern
ipaddr extern
eth_init extern
eth_in extern
eth_out extern
eth_send extern
eth_setaddr extern
mac extern
type extern
dmac extern
bmac extern
cmp_mac extern
udp_init extern
udp_in extern
udp_out extern
sport extern
dport extern
pdu extern
pdulen extern
pduport extern
tcp_in extern
tcp_init extern
icmp_in extern
insize extern
inbuf extern
inmax extern
put_char extern
put_dec extern
dhcp_init extern
bootfile extern
oserver extern
time extern
pause extern
for_sock extern
next_sock extern
resolve extern
ans extern
rand extern
lfsr extern
dev_need_poll extern
; drop the current input buffer
ip_drop extern
; frees a buffer
; takes: X = ptr
freebuff extern
; allocates a buffer
; returns: X = ptr, C set on error
getbuff extern
; initialize the system
ip6809_init extern
; allocate a new socket
; takes B = type (C_UDP,etc...)
; returns conn = new socket, C set on error
socket extern
; This is a pointer to a socket struct
conn extern
; send data to socket
; takes: conn = socket, X = ptr to pdu, D = length
send extern
; closes a socket
close extern
; call once per tick
tick extern
;;; call when interrupt for packet rx
dev_in extern
;;; print a ip address/mask
;;; takes X - ip addr ptr
ipprint extern
; This structure represents a logical connection
; 'conn' points to one of these
.area .conn,constant
C_FLG rmb 1 ; flags/type
C_DIP rmb 4 ; dest ip address
C_SPORT rmb 2 ; src port
C_DPORT rmb 2 ; dest sport
C_CALL rmb 2 ; callback vector
C_TIME rmb 2 ; timer
;; these fields are used for TCP
IFNDEF ETH_ONLY
C_SNDN rmb 4 ; sequence of next byte to be sent
C_RCVN rmb 4 ; sequence of next byte to be recv
C_SNDB rmb 2 ; buffer address of send data
C_SNDZ rmb 2 ; size of data in send buffer
C_RCVB rmb 2 ; receive packet buffer
C_RCVD rmb 2 ; ptr to data in buffer
C_RCVZ rmb 2 ; size of received packet
C_TFLG rmb 1 ; out going TCP flags mirror
C_TFLG2 rmb 1 ; remote has closed
ENDC
C_SIZE equ * ; size of this struct
C_UDP equ 1
C_TCP equ 2
C_ETH equ 3
C_IP equ 4
; these status codes are sent to callback functon
; to indicate what's going on...
C_CALLTO equ 0 ; timeout
C_CALLRX equ 1 ; rx data
tcp_connect extern
tcp_listen extern
tcp_send extern
tcp_close extern
tcp_recv extern
igmp_in extern
igmp_test extern
mdns_init extern
http_get extern