Subversion Repositories Kolibri OS

Rev

Rev 1483 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1483 Rev 1514
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2009. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2010. All rights reserved.    ;;
4
;; Distributed under terms of the GNU General Public License       ;;
4
;; Distributed under terms of the GNU General Public License       ;;
5
;;                                                                 ;;
5
;;                                                                 ;;
6
;;  STACK.INC                                                      ;;
6
;;  STACK.INC                                                      ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;  BASIC TCP/IP stack for KolibriOS                               ;;
8
;;  BASIC TCP/IP stack for KolibriOS                               ;;
Line 15... Line 15...
15
;;          GNU GENERAL PUBLIC LICENSE                             ;;
15
;;          GNU GENERAL PUBLIC LICENSE                             ;;
16
;;             Version 2, June 1991                                ;;
16
;;             Version 2, June 1991                                ;;
17
;;                                                                 ;;
17
;;                                                                 ;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 19... Line 19...
19
 
19
 
Line 20... Line 20...
20
$Revision: 1483 $
20
$Revision: 1514 $
21
 
21
 
Line 22... Line 22...
22
__DEBUG_LEVEL_OLD__  equ __DEBUG_LEVEL__
22
__DEBUG_LEVEL_OLD__  equ __DEBUG_LEVEL__
23
__DEBUG_LEVEL__ equ 1			; this sets the debug level for network part of kernel
23
__DEBUG_LEVEL__ equ 1			; this sets the debug level for network part of kernel
24
 
24
 
25
uglobal
25
uglobal
Line 26... Line 26...
26
	last_1sTick	db ?
26
	net_10ms       dd ?
-
 
27
	net_tmr_count  dw ?
27
	last_1hsTick	dd ?
28
endg
Line 28... Line 29...
28
endg
29
 
29
 
30
MAX_NET_DEVICES 	equ 16
Line 30... Line 31...
30
MAX_NET_DEVICES 	equ 16
31
 
31
QUEUE_BEFORE_SENDING	equ 0		; 1 or 0 (enable or disable) currently only affects ethernet
32
ETH_QUEUE		equ 0		; 1 = enable / 0 = disable
-
 
33
 
Line -... Line 34...
-
 
34
MIN_EPHEMERAL_PORT equ 49152
32
 
35
MAX_EPHEMERAL_PORT equ 61000
33
MIN_EPHEMERAL_PORT equ 49152
36
 
34
MAX_EPHEMERAL_PORT equ 61000
37
; Ethernet protocol numbers
35
 
38
ETHER_ARP	equ 0x0608
36
ETHER		equ 1337		; TODO: find another value for this (how does it work in posix ?)
39
ETHER_IPv4	equ 0x0008		; Reversed from 0800 for intel
37
ETHER_ARP	equ 0x0608
40
 
38
 
41
;Protocol family
39
AF_UNSPEC	equ 0
42
AF_UNSPEC	equ 0
40
AF_UNIX 	equ 1
43
AF_UNIX 	equ 1
41
AF_INET4	equ 2
44
AF_INET4	equ 2
42
;AF_AX25         equ 3
45
;AF_AX25         equ 3
43
;AF_IPX          equ 4
46
;AF_IPX          equ 4
Line -... Line 47...
-
 
47
;AF_APPLETALK    equ 5
44
;AF_APPLETALK    equ 5
48
;AF_NETROM       equ 6
45
;AF_NETROM       equ 6
49
;AF_BRIDGE       equ 7
46
;AF_BRIDGE       equ 7
50
;AF_AAL5         equ 8
47
;AF_AAL5         equ 8
51
;AF_X25          equ 9
Line 48... Line 52...
48
;AF_X25          equ 9
52
AF_INET6	equ 10
49
;AF_INET6        equ 10
53
;AF_MAX          equ 12
50
;AF_MAX          equ 12
54
 
51
 
55
; Internet protocol numbers
52
IP_PROTO_IP	equ 0
-
 
53
IP_PROTO_ICMP	equ 1
-
 
54
IP_PROTO_TCP	equ 6
-
 
55
IP_PROTO_UDP	equ 17
-
 
56
 
-
 
57
; Socket types
-
 
58
SOCK_STREAM	= 1
-
 
59
SOCK_DGRAM	= 2
-
 
60
SOCK_RAW	= 3
-
 
61
 
-
 
62
TCB_LISTEN		equ 1
-
 
63
TCB_SYN_SENT		equ 2
-
 
64
TCB_SYN_RECEIVED	equ 3
-
 
65
TCB_ESTABLISHED 	equ 4
-
 
66
TCB_FIN_WAIT_1		equ 5
-
 
67
TCB_FIN_WAIT_2		equ 6
-
 
68
TCB_CLOSE_WAIT		equ 7
-
 
69
TCB_CLOSING		equ 8
-
 
70
TCB_LAST_ACK		equ 9
-
 
71
TCB_TIMED_WAIT		equ 10
-
 
72
TCB_CLOSED		equ 11
-
 
73
 
-
 
74
TH_FIN			equ 1 shl 0
-
 
75
TH_SYN			equ 1 shl 1
-
 
76
TH_RST			equ 1 shl 2
-
 
77
TH_PUSH 		equ 1 shl 3
-
 
78
TH_ACK			equ 1 shl 4
-
 
Line 79... Line 56...
79
TH_URG			equ 1 shl 5
56
IP_PROTO_IP	equ 0
-
 
57
IP_PROTO_ICMP	equ 1
Line -... Line 58...
-
 
58
IP_PROTO_TCP	equ 6
Line 80... Line -...
80
 
-
 
81
 
-
 
82
macro inc_INET reg {
-
 
83
 
59
IP_PROTO_UDP	equ 17
84
	add	byte [reg + 3], 1
60
 
85
	adc	byte [reg + 2], 0
-
 
86
	adc	byte [reg + 1], 0
-
 
87
	adc	byte [reg], 0
61
; Socket types
88
 
-
 
89
}
-
 
Line 90... Line 62...
90
 
62
SOCK_STREAM	equ 1
-
 
63
SOCK_DGRAM	equ 2
-
 
64
SOCK_RAW	equ 3
-
 
65
 
-
 
66
; Socket options
-
 
67
SO_ACCEPTCON equ 1
-
 
68
 
-
 
69
SOCKET_MAXDATA	equ 4096
Line -... Line 70...
-
 
70
 
-
 
71
; Network driver types
91
 
72
NET_TYPE_ETH	equ 1
92
macro add_INET reg {
73
NET_TYPE_SLIP	equ 2
93
	add	byte [reg + 3], cl
74
 
94
	adc	byte [reg + 2], ch
75
 
95
	adc	byte [reg + 1], 0
76
virtual at 0
96
	adc	byte [reg], 0
77
 
-
 
78
	NET_DEVICE:
Line 97... Line 79...
97
	rol	ecx, 16
79
	.type		dd ?
-
 
80
	.end:
98
	add	byte [reg + 1], cl
81
 
99
	adc	byte [reg], ch
82
end virtual
100
	rol	ecx, 16
83
 
Line 101... Line 84...
101
}
84
 
Line -... Line 85...
-
 
85
; Exactly as it says..
-
 
86
macro pseudo_random reg {
-
 
87
	add	reg, [esp]
-
 
88
	rol	reg, 5
-
 
89
	xor	reg, [timer_ticks]
-
 
90
	imul	reg, 214013
-
 
91
	xor	reg, 0xdeadbeef
102
 
92
	rol	reg, 9
-
 
93
}
-
 
94
 
-
 
95
macro ntohld reg {
-
 
96
 
103
 
97
	rol	word reg, 8
104
macro pseudo_random reg {
98
	rol	dword reg, 16
105
 
-
 
106
	add	reg, [esp]
-
 
107
	rol	reg, 5
-
 
108
	xor	reg, [timer_ticks]
-
 
-
 
99
	rol	word reg, 8
109
	imul	reg, 214013
100
 
-
 
101
}
-
 
102
 
-
 
103
macro ntohlw reg {
-
 
104
 
-
 
105
	rol	word reg, 8
-
 
106
 
-
 
107
}
-
 
108
 
-
 
109
 
-
 
110
include "queue.inc"
-
 
111
 
-
 
112
include "ethernet.inc"
-
 
113
;include "slip.inc"
-
 
114
 
-
 
115
include "ARP.inc"
Line 110... Line 116...
110
	xor	reg, 0xdeadbeef
116
include "IPv4.inc"
111
	rol	reg, 9
117
 
112
 
118
include "icmp.inc"
113
	pushd	reg
119
include "udp.inc"
Line 137... Line 143...
137
;
143
;
138
;-----------------------------------------------------------------
144
;-----------------------------------------------------------------
139
align 4
145
align 4
140
stack_init:
146
stack_init:
Line -... Line 147...
-
 
147
 
-
 
148
; Init the network drivers list
-
 
149
 
-
 
150
	xor	eax, eax
-
 
151
	mov	edi, NET_RUNNING
-
 
152
	mov	ecx, MAX_NET_DEVICES + 1
-
 
153
	rep	stosd
-
 
154
 
-
 
155
; Call other init procedures
141
 
156
 
-
 
157
	call	ETH_init
-
 
158
;        call    SLIP_init
142
	call	ETH_init
159
 
-
 
160
	call	IPv4_init
-
 
161
	call	ICMP_init
143
	call	IPv4_init
162
 
144
	call	ARP_init
163
	call	ARP_init
145
	call	UDP_init
164
	call	UDP_init
146
	call	TCP_init
165
	call	TCP_init
147
	call	ICMP_init
166
 
Line 148... Line -...
148
	call	socket_init
-
 
149
 
-
 
150
	mov	al, 0		      ; set up 1s timer
-
 
151
	out	0x70, al
167
	call	socket_init
Line 152... Line 168...
152
	in	al, 0x71
168
 
Line 153... Line -...
153
	mov	[last_1sTick], al
-
 
154
 
169
	mov	[net_tmr_count], 0
155
	ret
170
 
156
 
171
	ret
157
 
172
 
158
 
173
 
159
;-----------------------------------------------------------------
174
;-----------------------------------------------------------------
160
;
175
;
161
; stack_handler
176
; stack_handler
162
;
177
;
163
;  This function calls all network init procedures
178
;  This function is called in kernel loop
164
;
179
;
165
;  IN:  /
180
;  IN:  /
Line 166... Line 181...
166
;  OUT: /
181
;  OUT: /
167
;
182
;
Line 168... Line 183...
168
;-----------------------------------------------------------------
183
;-----------------------------------------------------------------
169
align 4
184
align 4
170
stack_handler:
185
stack_handler:
171
 
186
 
-
 
187
	cmp	[NET_RUNNING], 0
Line 172... Line 188...
172
	cmp	[ETH_RUNNING], 0
188
	je	.exit
173
	je	.exit
-
 
174
 
-
 
175
	; Test for 10ms tick
189
 
176
	mov	eax, [timer_ticks]
190
	; Test for 10ms tick
177
	cmp	eax, [last_1hsTick]
191
	mov	eax, [timer_ticks]
178
	je	.exit
192
	cmp	eax, [net_10ms]
179
 
-
 
180
	mov	[last_1hsTick], eax
-
 
181
 
-
 
182
	call	ETH_handler		    ; handle all queued ethernet packets
-
 
183
if QUEUE_BEFORE_SENDING
-
 
184
	call	ETH_send_queued
-
 
185
end if
-
 
186
	call	TCP_send_queued
-
 
187
 
-
 
Line -... Line 193...
-
 
193
	je	.exit
188
  .sec_tick:
194
	mov	[net_10ms], eax
-
 
195
 
-
 
196
   if ETH_QUEUE
-
 
197
	call	ETH_handler
Line 189... Line 198...
189
 
198
	call	ETH_send_queued
190
	; Test for 1 second tick
199
   end if
191
	mov	al, 0
200
	call	TCP_10ms
-
 
201
 
-
 
202
	inc	[net_tmr_count]
-
 
203
	cmp	[net_tmr_count], 50
-
 
204
	je	.500ms
-
 
205
	cmp	[net_tmr_count], 100
Line 192... Line 206...
192
	out	0x70, al
206
	jne	.exit
193
	in	al, 0x71
207
 
Line -... Line 208...
-
 
208
	call	ARP_decrease_entry_ttls
-
 
209
	call	IPv4_decrease_fragment_ttls
-
 
210
	call	TCP_timer_1000ms
-
 
211
 
-
 
212
	mov	[net_tmr_count], 0
-
 
213
 
-
 
214
  .500ms:
-
 
215
	call	TCP_500ms
-
 
216
 
-
 
217
  .exit:
-
 
218
	ret
-
 
219
 
-
 
220
 
-
 
221
 
-
 
222
;-----------------------------------------------------------------
-
 
223
;
-
 
224
; NET_Add_Device:
-
 
225
;
-
 
226
;  This function is called by the network drivers,
-
 
227
;  to register each running NIC to the kernel
-
 
228
;
-
 
229
;  IN:  Pointer to device structure in ebx
-
 
230
;  OUT: Device num in eax, -1 on error
-
 
231
;
-
 
232
;-----------------------------------------------------------------
-
 
233
align 4
-
 
234
NET_add_device:
-
 
235
 
-
 
236
	DEBUGF	1,"NET_Add_Device: %x\n", ebx
-
 
237
 
-
 
238
	mov	eax, [NET_RUNNING]
-
 
239
	cmp	eax, MAX_NET_DEVICES
-
 
240
	jge	.error
-
 
241
 
-
 
242
;----------------------------------
-
 
243
; Check if device is already listed
-
 
244
	mov	eax, ebx
-
 
245
	mov	ecx, MAX_NET_DEVICES	  ; We need to check whole list because a device may be removed without re-organizing list
-
 
246
	mov	edi, NET_DRV_LIST
-
 
247
 
-
 
248
	repne	scasd			  ; See if device is already in the list
-
 
249
	jz	.error
-
 
250
 
-
 
251
;----------------------------
-
 
252
; Find empty slot in the list
-
 
253
	xor	eax, eax
-
 
254
	mov	ecx, MAX_NET_DEVICES
-
 
255
	mov	edi, NET_DRV_LIST
-
 
256
 
-
 
257
	repne	scasd
-
 
258
	jnz	.error
-
 
259
 
-
 
260
	sub	edi, 4
-
 
261
 
-
 
262
	cmp	[ebx + NET_DEVICE.type], NET_TYPE_ETH
-
 
263
	je	.ethernet
-
 
264
 
-
 
265
	cmp	[ebx + NET_DEVICE.type], NET_TYPE_SLIP
-
 
266
	je	.slip
-
 
267
 
-
 
268
	DEBUGF	1,"Unknown network device type: %u\n", [ebx + NET_DEVICE.type]
-
 
269
	jmp	.error
-
 
270
 
-
 
271
  .ethernet:
-
 
272
	DEBUGF	1,"Trying to add an ethernet driver\n"
-
 
273
 
-
 
274
	inc	[ETH_RUNNING]		  ; Indicate that one more ethernet device is up and running
-
 
275
	jmp	.add_it
-
 
276
 
-
 
277
  .slip:
-
 
278
	DEBUGF	1,"Trying to add a slip driver\n"
-
 
279
	;;;;
-
 
280
	jmp	.error
-
 
281
 
-
 
282
 
-
 
283
  .add_it:
-
 
284
 
-
 
285
;-----------------------------
-
 
286
; Add device to the found slot
-
 
287
	mov	[edi], ebx		  ; add device to list
-
 
288
 
-
 
289
	sub	edi, NET_DRV_LIST	  ; Calculate device number in eax
-
 
290
	mov	eax, edi		  ;
-
 
291
	shr	eax, 2
-
 
292
 
-
 
293
	inc	[NET_RUNNING]		  ; Indicate that one more network device is up and running
-
 
294
 
-
 
295
	DEBUGF	1,"Device number: %u\n",eax
-
 
296
	ret
-
 
297
 
-
 
298
  .error:
-
 
299
	or	eax, -1
-
 
300
	DEBUGF	2,"Adding network device failed\n"
-
 
301
	ret
-
 
302
 
-
 
303
 
-
 
304
 
-
 
305
;-----------------------------------------------------------------
-
 
306
;
-
 
307
; NET_Remove_Device:
-
 
308
;
-
 
309
;  This function is called by etwork drivers,
-
 
310
;  to unregister network devices from the kernel
-
 
311
;
-
 
312
;  IN:  Pointer to device structure in ebx
-
 
313
;  OUT: eax: -1 on error
-
 
314
;
-
 
315
;-----------------------------------------------------------------
-
 
316
align 4
-
 
317
NET_remove_device:
-
 
318
 
-
 
319
	cmp	[NET_RUNNING], 0
-
 
320
	je	.error
-
 
321
 
-
 
322
;----------------------------
-
 
323
; Find the driver in the list
-
 
324
 
-
 
325
	mov	eax, ebx
-
 
326
	mov	ecx, MAX_NET_DEVICES
-
 
327
	mov	edi, NET_DRV_LIST
-
 
328
 
-
 
329
	repne	scasd
-
 
330
	jnz	.error
-
 
331
 
-
 
332
;------------------------
-
 
333
; Remove it from the list
-
 
334
 
-
 
335
	xor	eax, eax
-
 
336
	mov	dword [edi-4], eax
-
 
337
 
-
 
338
	dec	[NET_RUNNING]
-
 
339
	ret
-
 
340
 
-
 
341
  .error:
-
 
342
	or	eax, -1
-
 
343
	ret
-
 
344
 
-
 
345
 
-
 
346
 
-
 
347
;-----------------------------------------------------------------
-
 
348
;
-
 
349
; NET_ptr_to_num
-
 
350
;
-
 
351
; IN:  ebx = ptr to device struct
-
 
352
; OUT: edi = -1 on error, device number otherwise
-
 
353
;
-
 
354
;-----------------------------------------------------------------
-
 
355
align 4
-
 
356
NET_ptr_to_num:
-
 
357
	push	ecx
-
 
358
 
-
 
359
	mov	ecx, MAX_NET_DEVICES
-
 
360
	mov	edi, NET_DRV_LIST
-
 
361
 
-
 
362
  .loop:
-
 
363
	cmp	ebx, [edi]
-
 
364
	jz	.found
-
 
365
	add	edi, 4
-
 
366
	dec	ecx
-
 
367
	jnz	.loop
-
 
368
 
-
 
369
	; repnz  scasd could work too if eax is used instead of ebx!
-
 
370
 
-
 
371
	or	edi, -1
-
 
372
 
-
 
373
	pop	ecx
-
 
374
	ret
-
 
375
 
-
 
376
  .found:
-
 
377
	sub	edi, NET_DRV_LIST
-
 
378
	shr	edi, 2
-
 
379
 
-
 
380
	pop	ecx
-
 
381
	ret
-
 
382
 
-
 
383
 
-
 
384
 
-
 
385
 
-
 
386
;--------------------------
-
 
387
;
-
 
388
; NET_send
-
 
389
;
-
 
390
; IN:   ebx = ptr to device struct
-
 
391
;      [esp] = data ptr
-
 
392
;    [esp + 4] = data size
-
 
393
;
-
 
394
; OUT: /
-
 
395
;
-
 
396
;--------------------------
-
 
397
align 4
194
	cmp	al, [last_1sTick]
398
NET_send:
195
	je	.exit
399
 
196
 
400
	call	[ebx + ETH_DEVICE.transmit] ;;;;
197
	mov	[last_1sTick], al
401
 
198
 
402
;;; TODO:check if packet was sent ok
Line 331... Line 535...
331
sys_network:
535
sys_network:
Line 332... Line 536...
332
 
536
 
333
	cmp	ebx, -1
537
	cmp	ebx, -1
Line 334... Line 538...
334
	jne	@f
538
	jne	@f
335
 
539
 
Line 336... Line 540...
336
	mov	eax, [ETH_RUNNING]
540
	mov	eax, [NET_RUNNING]
337
	jmp	.return
541
	jmp	.return
338
 
542
 
Line 339... Line 543...
339
   @@:
543
   @@:
340
	cmp	bh, MAX_NET_DEVICES		 ; Check if device number exists
544
	cmp	bh, MAX_NET_DEVICES		 ; Check if device number exists
341
	jge	.doesnt_exist
545
	jge	.doesnt_exist
Line 342... Line 546...
342
 
546
 
343
	mov	esi, ebx
547
	mov	esi, ebx
Line 344... Line 548...
344
	and	esi, 0x0000ff00
548
	and	esi, 0x0000ff00
345
	shr	esi, 6
549
	shr	esi, 6
346
 
550
 
347
	cmp	dword [esi + ETH_DRV_LIST], 0 ; check if driver is running
551
	cmp	dword [esi + NET_DRV_LIST], 0 ; check if driver is running
348
	je	.doesnt_exist
552
	je	.doesnt_exist
Line 349... Line 553...
349
 
553
 
350
	test	bl, bl			; 0 = Get device type (ethernet/token ring/...)
554
	test	bl, bl			 ; 0 = Get device type (ethernet/token ring/...)
351
	jnz	@f
555
	jnz	@f
Line 352... Line 556...
352
					 ; todo
556
 
353
	xor	eax, eax
557
	xor	eax, eax
354
	jmp	.return
558
	jmp	.return
Line 355... Line 559...
355
 
559
 
356
 
560
 
Line 371... Line 575...
371
  @@:
575
  @@:
Line 372... Line 576...
372
 
576
 
373
	dec	bl			; 2 = Reset the device
577
	dec	bl			; 2 = Reset the device
Line 374... Line 578...
374
	jnz	@f
578
	jnz	@f
375
 
579
 
376
	mov	esi, [esi + ETH_DRV_LIST]
580
	mov	esi, [esi + NET_DRV_LIST]
Line 377... Line 581...
377
	call	[esi + ETH_DEVICE.reset]
581
	call	[esi + ETH_DEVICE.reset]
Line 378... Line 582...
378
	jmp	.return
582
	jmp	.return
379
 
583
 
Line 380... Line 584...
380
  @@:
584
  @@:
381
 
585
 
382
	dec	bl			; 3 = Stop driver for this device
586
	dec	bl			; 3 = Stop driver for this device
Line 383... Line 587...
383
	jnz	@f
587
	jnz	@f
384
 
588
 
Line 405... Line 609...
405
	ret
609
	ret
Line 406... Line 610...
406
 
610
 
407
 
611
 
408
;----------------------------------------------------------------
612
;----------------------------------------------------------------
409
;
613
;
410
;  System Function To work with Protocols  (75)
614
;  System function to work with protocols  (75)
411
;
615
;
412
;----------------------------------------------------------------
616
;----------------------------------------------------------------
413
align 4
617
align 4
414
sys_protocols:
618
sys_protocols:
Line 415... Line 619...
415
	cmp	bh, MAX_NET_DEVICES		; Check if device number exists
619
	cmp	bh, MAX_NET_DEVICES		; Check if device number exists
416
	jge	.doesnt_exist
620
	jge	.doesnt_exist
417
 
621
 
418
	mov	esi, ebx
622
	mov	esi, ebx
419
	and	esi, 0x0000ff00
623
	and	esi, 0x0000ff00
Line 420... Line 624...
420
	shr	esi, 6
624
	shr	esi, 6				; now we have the device num * 4 in esi
Line 421... Line 625...
421
	cmp	dword [esi + ETH_DRV_LIST], 0	; check if driver is running TODO: check other lists too
625
	cmp	dword [esi + NET_DRV_LIST], 0	; check if driver is running
Line 439... Line 643...
439
	je	TCP_API
643
	je	TCP_API
Line 440... Line 644...
440
 
644
 
441
	cmp	ax , ETHER_ARP
645
	cmp	ax , ETHER_ARP
Line 442... Line 646...
442
	je	ARP_API
646
	je	ARP_API
443
 
647
 
Line 444... Line 648...
444
	cmp	ax , ETHER
648
	cmp	ax , 1337
Line 445... Line 649...
445
	je	ETH_API
649
	je	ETH_API