Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3617 → Rev 3618

/programs/network/proc32.inc
File deleted
/programs/network/libio.inc
File deleted
/programs/network/network.inc
File deleted
/programs/network/config.inc
File deleted
/programs/network/dll.inc
File deleted
/programs/network/macros.inc
File deleted
/programs/network/debug-fdo.inc
File deleted
/programs/network/struct.inc
File deleted
/programs/network/downloader/downloader.asm
19,7 → 19,7
BUFFERSIZE = 4096
 
__DEBUG__ = 1
__DEBUG_LEVEL__ = 2
__DEBUG_LEVEL__ = 1
 
format binary as ""
 
35,12 → 35,12
dd params ; I_PARAM
dd 0x0 ; I_Path
 
include '../macros.inc'
include '../proc32.inc'
include '../network.inc'
include '../../macros.inc'
include '../../proc32.inc'
include '../../network.inc'
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../dll.inc'
include '../debug-fdo.inc'
include '../../dll.inc'
include '../../debug-fdo.inc'
 
START:
 
/programs/network/ftpd/commands.inc
531,13 → 531,13
stosd
 
; now the filesize in ascii
mov eax, [ebx + FileInfoA.FileSizeLow]
mov eax, dword[ebx + FileInfoA.FileSize]
call dword_to_ascii
mov al, ' '
stosb
 
; then date (month/day/year)
movzx eax, [ebx + FileInfoA.DateModify + FileDateTime.month]
movzx eax, [ebx + FileInfoA.DateModify.month]
cmp eax, 12
ja @f
mov eax, [months - 4 + 4*eax]
544,12 → 544,12
stosd
@@:
 
movzx eax, [ebx + FileInfoA.DateModify + FileDateTime.day]
movzx eax, [ebx + FileInfoA.DateModify.day]
call dword_to_ascii
mov al, ' '
stosb
 
movzx eax, [ebx + FileInfoA.DateModify + FileDateTime.year]
movzx eax, [ebx + FileInfoA.DateModify.year]
call dword_to_ascii
mov al, ' '
stosb
/programs/network/ftpd/ftpd.asm
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; ftpd.asm - FTP Daemon for KolibriOS ;;
63,14 → 63,14
dd params ; parameters
dd path ; path
 
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../struct.inc'
include '../libio.inc'
include '../../proc32.inc'
include '../../dll.inc'
include '../../struct.inc'
include '../../libio.inc'
 
include '../network.inc'
include '../../network.inc'
 
macro sendFTP str {
local string, length
/programs/network/icmp/ping.asm
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; ping.asm - ICMP echo client for KolibriOS ;;
12,9 → 12,10
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
format binary as ""
 
BUFFERSIZE = 1500
 
use32
org 0x0
 
28,13 → 29,12
dd 0 ; path
 
 
BUFFERSIZE equ 1500
; useful includes
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../network.inc'
include '../../proc32.inc'
include '../../dll.inc'
include '../../network.inc'
 
include 'icmp.inc'
 
/programs/network/ircc/ircc.asm
87,11 → 87,11
dd param
dd path
 
include "../macros.inc"
include "../proc32.inc"
include "../dll.inc"
include "../network.inc"
include "../struct.inc"
include "../../macros.inc"
include "../../proc32.inc"
include "../../dll.inc"
include "../../network.inc"
include "../../struct.inc"
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
 
struct window
426,10 → 426,6
scrollbar_v_draw ,'scrollbar_v_draw' ,\
scrollbar_v_mouse,'scrollbar_v_mouse'
 
 
usercommand db '/server chat.freenode.net', 0
rb MAX_COMMAND_LEN
 
I_END:
 
; width, left, top
438,6 → 434,9
scroll1 scrollbar SCROLLBAR_WIDTH, 300, 150, TOP_Y, 10, 100, 0, 0, 0, 0, 0, 1
scroll2 scrollbar SCROLLBAR_WIDTH, 300, 150, TOP_Y, 10, 100, 0, 0, 0, 0, 0, 1
 
usercommand db '/server chat.freenode.net', 0
rb MAX_COMMAND_LEN
 
main_PID dd ? ; identifier of main thread
utf8_bytes_rest dd ? ; bytes rest in current UTF8 sequence
utf8_char dd ? ; first bits of current UTF8 character
/programs/network/netcfg/netcfg.asm
1,10 → 1,16
;
; Netcfg v1.02
;
; Application to load network drivers in KolibriOS
;
; By hidnplayr
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; netcfg.asm - Network driver control center for KolibriOS ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
format binary as ""
 
21,7 → 27,7
 
type_ethernet equ 1
 
include '../macros.inc'
include '../../macros.inc'
 
START:
; first, check boot parameters
243,13 → 249,26
@@: mcall 62 ; Read it
mov [PCI_IRQ], al ; Save it
 
; cmp byte [PCI_Class], 0 ; device from before class codes
; je @f
cmp byte [PCI_Class], 2 ; network controller
je @f
 
cmp byte [PCI_Class], 2 ; network controller
cmp byte [PCI_Class], 6 ; bridge type device
jne nextDev
; @@:
 
cmp byte [PCI_SubClass], 7 ; Cardbus bridge
jne nextDev
 
mov bl, 6 ; get a dword
mov bh, byte [V_Bus] ; bus of pci device
mov ch, byte [V_Dev] ; device number/function
mov cl, 0x40 ; offset to subsystem device/vendor id
mcall 62 ; get ID's
 
mov word [PCI_Device], ax ; There is a device here, save the ID's
shr eax, 16 ;
mov word [PCI_Vendor], ax ;
@@:
 
cmp byte[param], 0
jne load_and_start
 
/programs/network/netstat/netstat.asm
26,8 → 26,8
dd (I_END+0x1000) ; esp
dd 0, 0 ; I_Param , I_Path
 
include '..\macros.inc'
include '..\network.inc'
include '../../macros.inc'
include '../../network.inc'
 
START:
mcall 40, EVM_REDRAW + EVM_BUTTON + EVM_STACK2
324,9 → 324,7
pop ecx
mcall
 
 
 
mov edx, 50 shl 16 + 150
; mov edx, 50 shl 16 + 150
mov [last], 0
 
.arp_loop:
/programs/network/nslookup/nslookup.asm
1,3 → 1,17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; nslookup.asm - name service lookup (DNS)) program for KolibriOS ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
format binary as ""
 
use32
12,12 → 26,12
dd 0 ; path
 
; useful includes
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../../proc32.inc'
include '../../dll.inc'
 
include '../network.inc'
include '../../network.inc'
 
; entry point
start:
/programs/network/pppoe/pppoe.asm
1,9 → 1,9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; pppoe.asm - PPPoE dialer for KolibriOS ;;
;; pppoe.asm - PPPoe dialer for KolibriOS ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
;; ;;
25,12 → 25,12
dd 0 ; parameters
dd 0 ; path
 
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../network.inc'
include '../struct.inc'
include '../../proc32.inc'
include '../../dll.inc'
include '../../network.inc'
include '../../struct.inc'
 
; Ethernet protocol numbers
ETHER_PPP_DISCOVERY = 0x6388
/programs/network/socketdbg/socketdbg.asm
1,3 → 1,17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; socketdbg.asm - socket debug utility for KolibriOS ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
format binary as ""
 
use32
12,13 → 26,12
dd 0 ; path
 
; useful includes
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../../proc32.inc'
include '../../dll.inc'
include '../../struct.inc'
 
include '../struct.inc'
 
include 'socket.inc'
 
; entry point
/programs/network/synergyc/synergyc.asm
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; Synergyc.asm - Synergy client for KolibriOS ;;
14,6 → 14,9
 
format binary as ""
 
BUFFERSIZE = 1024
DEFAULTPORT = 24800
 
use32
org 0x0
 
26,19 → 29,12
dd 0 ; parameters
dd path ; path
 
__DEBUG__ equ 1 ; enable/disable
__DEBUG_LEVEL__ equ 1 ; 1 = all, 2 = errors
 
 
BUFFERSIZE equ 1024
DEFAULTPORT equ 24800
 
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../../proc32.inc'
include '../../dll.inc'
 
include '../network.inc'
include '../../network.inc'
 
start:
 
68,15 → 64,9
push 80
call [con_init]
 
push path
push str0
call [con_write_asciiz]
 
push newline
call [con_write_asciiz]
 
push newline
call [con_write_asciiz]
 
invoke ini.get_str, path, str_remote, str_ip, buffer_ptr, 16, 0
test eax, eax
jnz error
97,13 → 87,22
mcall socket, AF_INET4, SOCK_STREAM, 0
cmp eax, -1
je error
 
mov [socketnum], eax
 
; resolve name
push esp ; reserve stack place
push esp ; ptr to result
push 0 ; addrinfo hints
push 0 ; servname
push buffer_ptr ; hostname
call [inet_addr]
cmp eax, -1
je error
call [getaddrinfo]
pop esi
; test for error
test eax, eax
jnz error
 
mov eax, [esi+addrinfo.ai_addr]
mov eax, [eax+sockaddr_in.sin_addr]
mov [sockaddr1.ip], eax
 
mcall connect, [socketnum], sockaddr1, 18
111,7 → 110,7
push str7
call [con_write_asciiz]
 
mcall 40, 1 shl 7; + 7
mcall 40, EVM_STACK
 
login:
call wait_for_data
273,12 → 272,14
push str_err
call [con_write_asciiz]
 
call [con_gets]
; call [con_gets]
 
call [con_getch2]
 
mcall close, [socketnum]
 
push 1
call [con_exit]
 
mcall close, [socketnum]
exit:
 
mcall -1
292,7 → 293,7
je wait_for_data
 
cmp eax, 8
jl wait_for_data
jb wait_for_data ; FIXME
 
ret
 
300,15 → 301,16
 
; data
title db 'Synergy client',0
str0 db 'Welcome to the software KM switch for KolibriOS.',10,10,0
str1 db 'Connecting to: ',0
str7 db 'Connected!',13,10,0
str2 db 13,10,'Handshake received',13,10,0
str7 db 'Connected!',10,0
str2 db 10,'Handshake received',10,0
str3 db 'Unsupported command: ',0
newline db 13,10,0
str4 db 'mouse moved',13,10,0
str5 db 'mouse buttons changed',13,10,0
str6 db 'Enter screen',13,10,0
str_err db 'Error occured !',13,10,'Press any key to quit',0
newline db 10,0
str4 db 'mouse moved',10,0
str5 db 'mouse buttons changed',10,0
str6 db 'Enter screen',10,0
str_err db 'Uh-Oh.. some error occured !',10,'Press any key to quit.',0
 
screeninfo:
dd (screeninfo.length - 4) shl 24
360,7 → 362,7
libini, 'libini.obj'
 
import network,\
inet_addr, 'inet_addr'
getaddrinfo, 'getaddrinfo'
 
import console, \
con_start, 'START',\
/programs/network/tcpserv/tcpserv.asm
1,5 → 1,21
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; tcpserv.asm - TCP demo program for KolibriOS ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
format binary as ""
 
BUFFERSIZE = 1500
 
use32
; standard header
db 'MENUET01' ; signature
12,14 → 28,12
dd 0 ; path
 
 
BUFFERSIZE equ 1500
; useful includes
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../../proc32.inc'
include '../../dll.inc'
 
include '../network.inc'
include '../../network.inc'
 
; entry point
start:
/programs/network/telnet/telnet.asm
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2012. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; telnet.asm - Telnet client for KolibriOS ;;
14,9 → 14,9
 
format binary as ""
 
__DEBUG__ equ 0
__DEBUG_LEVEL__ equ 1
BUFFERSIZE equ 4096
__DEBUG__ = 0
__DEBUG_LEVEL__ = 1
BUFFERSIZE = 4096
 
use32
; standard header
29,12 → 29,12
dd hostname ; parameters
dd 0 ; path
 
include '../macros.inc'
include '../../macros.inc'
purge mov,add,sub
include '../proc32.inc'
include '../dll.inc'
include '../debug-fdo.inc'
include '../network.inc'
include '../../proc32.inc'
include '../../dll.inc'
include '../../debug-fdo.inc'
include '../../network.inc'
 
; entry point
start:
/programs/network/tftpc/tftpc.asm
1,3 → 1,17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; tftpc.asm - TFTP client for KolibriOS ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
format binary as ""
 
use32
7,32 → 21,29
dd 0x1
dd START
dd I_END
dd IM_END
dd IM_END
dd IM_END+0x1000
dd IM_END+0x1000
dd 0, 0
 
include '../proc32.inc'
include '../macros.inc'
include '../libio.inc'
include '../dll.inc'
include '../../proc32.inc'
include '../../macros.inc'
include '../../libio.inc'
include '../../dll.inc'
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
 
include '../network.inc'
include '../../network.inc'
 
 
filebuffer_size equ 4*4096 ; 16kb (dont try to change it yet..)
TIMEOUT equ 100
buffer_len equ 1500
filebuffer_size = 4*4096 ; 16kb (dont try to change it yet..)
TIMEOUT = 100
buffer_len = 1500
 
AF_INET4 equ 2
IP_PROTO_UDP equ 17
opcode_rrq = 1
opcode_wrq = 2
opcode_data = 3
opcode_ack = 4
opcode_error = 5
 
opcode_rrq equ 1
opcode_wrq equ 2
opcode_data equ 3
opcode_ack equ 4
opcode_error equ 5
 
; read/write request packet
;
; 2 bytes string 1 byte string 1 byte
561,6 → 572,4
buffer:
rb buffer_len
 
rb 0x1000 ; stack
 
IM_END:
/programs/network/vncc/vncc.asm
1,12 → 1,28
;
;
; VNC Client for kolibrios by hidnplayr
;
; hidnplayr@gmail.com
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2010-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; vncc.asm - VNC client for KolibriOS ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
format binary as ""
 
__DEBUG__ = 1
__DEBUG_LEVEL__ = 1
 
STRLEN = 64 ; password and server max length
xpos = 4 ; coordinates of image
ypos = 22 ;
 
TIMEOUT = 5 ; timeout in seconds
 
use32
 
org 0x0
19,22 → 35,14
dd IM_END ; esp
dd 0x0 , 0x0 ; I_Param , I_Path
 
__DEBUG__ equ 1
__DEBUG_LEVEL__ equ 1
 
STRLEN = 64 ; password and server max length
xpos = 4 ; coordinates of image
ypos = 22 ;
include '../../macros.inc'
include '../../debug-fdo.inc'
include '../../proc32.inc'
include '../../dll.inc'
include '../../struct.inc'
include '../../network.inc'
 
TIMEOUT = 5 ; timeout in seconds
 
include '../macros.inc'
include '../debug-fdo.inc'
include '../proc32.inc'
include '../dll.inc'
include '../struct.inc'
include '../network.inc'
 
include 'structs.inc'
include 'logon.inc'
include 'raw.inc'
/programs/network/zeroconf/zeroconf.asm
9,7 → 9,7
;; Some code contributed by Derpenguin ;;
;; ;;
;; DHCP code is based on that by Mike Hibbet ;;
; (DHCP client for menuetos) ;;
;; (DHCP client for menuetos) ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
18,17 → 18,6
 
format binary as ""
 
use32
org 0x0
 
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd IM_END ; size of image
dd (I_END+0x100) ; memory for app
dd (I_END+0x100) ; esp
dd 0, 0 ; I_Param, I_Path
 
; CONFIGURATION
 
TIMEOUT = 60 ; in seconds
53,13 → 42,24
 
DEFEND_INTERVAL = 10 ; seconds (min. wait between defensive ARPs)
 
use32
org 0x0
 
include '../proc32.inc'
include '../macros.inc'
include '../debug-fdo.inc'
include '../network.inc'
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd START ; start of code
dd IM_END ; size of image
dd (I_END+0x100) ; memory for app
dd (I_END+0x100) ; esp
dd 0, 0 ; I_Param, I_Path
 
 
include '../../proc32.inc'
include '../../macros.inc'
include '../../debug-fdo.inc'
include '../../network.inc'
include 'dhcp.inc'
include '../dll.inc'
include '../../dll.inc'
 
 
Ip2dword: