forked from KolibriOS/kolibrios
Forgot to upload a file, wich caused net kernel not to compile.
PS: There seems to be a bug in UDP checksum wich causes it to currently only work on DHCP git-svn-id: svn://kolibrios.org@1250 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7f9d0c6697
commit
441819a385
72
kernel/branches/net/applications/network.inc
Normal file
72
kernel/branches/net/applications/network.inc
Normal file
@ -0,0 +1,72 @@
|
||||
; Socket types
|
||||
SOCK_STREAM = 1
|
||||
SOCK_DGRAM = 2
|
||||
SOCK_RAW = 3 ; not supported by the kernel
|
||||
|
||||
; IP protocols
|
||||
IPPROTO_IP = 0
|
||||
IPPROTO_ICMP = 1 ; not supported by the kernel
|
||||
IPPROTO_TCP = 6
|
||||
IPPROTO_UDP = 17
|
||||
|
||||
; Address families
|
||||
AF_UNSPEC = 0
|
||||
AF_UNIX = 1
|
||||
AF_INET4 = 2 ; IPv4
|
||||
;AF_INET6 = 28 ; IPv6 (not supported)
|
||||
|
||||
PF_UNSPEC = AF_UNSPEC
|
||||
PF_UNIX = AF_UNIX
|
||||
PF_INET4 = AF_INET4
|
||||
;PF_INET6 = AF_INET6
|
||||
|
||||
; Flags for addrinfo
|
||||
AI_PASSIVE = 1
|
||||
AI_CANONNAME = 2
|
||||
AI_NUMERICHOST = 4
|
||||
AI_NUMERICSERV = 8
|
||||
AI_ADDRCONFIG = 0x400
|
||||
|
||||
; internal definition
|
||||
AI_SUPPORTED = 0x40F
|
||||
|
||||
struct sockaddr_in
|
||||
sin_family dw ? ; sa_family_t
|
||||
sin_port dw ? ; in_port_t
|
||||
sin_addr dd ? ; struct in_addr
|
||||
sin_zero rb 8 ; zero
|
||||
ends
|
||||
|
||||
struct addrinfo
|
||||
ai_flags dd ? ; bitmask of AI_*
|
||||
ai_family dd ? ; PF_*
|
||||
ai_socktype dd ? ; SOCK_*
|
||||
ai_protocol dd ? ; 0 or IPPROTO_*
|
||||
ai_addrlen dd ? ; length of ai_addr
|
||||
ai_canonname dd ? ; char*
|
||||
ai_addr dd ? ; struct sockaddr*
|
||||
ai_next dd ? ; struct addrinfo*
|
||||
ends
|
||||
|
||||
EAI_ADDRFAMILY = 1
|
||||
EAI_AGAIN = 2
|
||||
EAI_BADFLAGS = 3
|
||||
EAI_FAIL = 4
|
||||
EAI_FAMILY = 5
|
||||
EAI_MEMORY = 6
|
||||
EAI_NONAME = 8
|
||||
EAI_SERVICE = 9
|
||||
EAI_SOCKTYPE = 10
|
||||
EAI_BADHINTS = 12
|
||||
EAI_PROTOCOL = 13
|
||||
EAI_OVERFLOW = 14
|
||||
|
||||
socket fix 74, 0
|
||||
close fix 74, 1
|
||||
bind fix 74, 2
|
||||
listen fix 74, 3
|
||||
connect fix 74, 4
|
||||
accept fix 74, 5
|
||||
send fix 74, 6
|
||||
recv fix 74, 7
|
||||
|
@ -9,57 +9,57 @@ $Revision$
|
||||
|
||||
|
||||
iglobal
|
||||
szKernel db 'KERNEL', 0
|
||||
szVersion db 'version',0
|
||||
szKernel db 'KERNEL', 0
|
||||
szVersion db 'version',0
|
||||
|
||||
szRegService db 'RegService',0
|
||||
szGetService db 'GetService',0
|
||||
szRegService db 'RegService',0
|
||||
szGetService db 'GetService',0
|
||||
szServiceHandler db 'ServiceHandler',0
|
||||
szAttachIntHandler db 'AttachIntHandler',0
|
||||
szGetIntHandler db 'GetIntHandler', 0
|
||||
szFpuSave db 'FpuSave',0
|
||||
szFpuRestore db 'FpuRestore',0
|
||||
szFpuSave db 'FpuSave',0
|
||||
szFpuRestore db 'FpuRestore',0
|
||||
szReservePortArea db 'ReservePortArea',0
|
||||
szBoot_Log db 'Boot_Log',0
|
||||
szBoot_Log db 'Boot_Log',0
|
||||
|
||||
szPciApi db 'PciApi', 0
|
||||
szPciRead32 db 'PciRead32', 0
|
||||
szPciRead16 db 'PciRead16', 0
|
||||
szPciRead8 db 'PciRead8', 0
|
||||
szPciWrite8 db 'PciWrite8',0
|
||||
szPciWrite16 db 'PciWrite16',0
|
||||
szPciWrite32 db 'PciWrite32',0
|
||||
szPciApi db 'PciApi', 0
|
||||
szPciRead32 db 'PciRead32', 0
|
||||
szPciRead16 db 'PciRead16', 0
|
||||
szPciRead8 db 'PciRead8', 0
|
||||
szPciWrite8 db 'PciWrite8',0
|
||||
szPciWrite16 db 'PciWrite16',0
|
||||
szPciWrite32 db 'PciWrite32',0
|
||||
|
||||
szAllocPage db 'AllocPage',0
|
||||
szAllocPages db 'AllocPages',0
|
||||
szFreePage db 'FreePage',0
|
||||
szGetPgAddr db 'GetPgAddr',0
|
||||
szMapPage db 'MapPage',0
|
||||
szMapSpace db 'MapSpace',0
|
||||
szMapIoMem db 'MapIoMem',0
|
||||
szAllocPage db 'AllocPage',0
|
||||
szAllocPages db 'AllocPages',0
|
||||
szFreePage db 'FreePage',0
|
||||
szGetPgAddr db 'GetPgAddr',0
|
||||
szMapPage db 'MapPage',0
|
||||
szMapSpace db 'MapSpace',0
|
||||
szMapIoMem db 'MapIoMem',0
|
||||
szCommitPages db 'CommitPages',0
|
||||
szReleasePages db 'ReleasePages',0
|
||||
|
||||
szAllocKernelSpace db 'AllocKernelSpace',0
|
||||
szFreeKernelSpace db 'FreeKernelSpace',0
|
||||
szKernelAlloc db 'KernelAlloc',0
|
||||
szKernelFree db 'KernelFree',0
|
||||
szUserAlloc db 'UserAlloc',0
|
||||
szUserFree db 'UserFree',0
|
||||
szKmalloc db 'Kmalloc',0
|
||||
szKfree db 'Kfree',0
|
||||
szKernelFree db 'KernelFree',0
|
||||
szUserAlloc db 'UserAlloc',0
|
||||
szUserFree db 'UserFree',0
|
||||
szKmalloc db 'Kmalloc',0
|
||||
szKfree db 'Kfree',0
|
||||
szCreateRingBuffer db 'CreateRingBuffer',0
|
||||
|
||||
szGetPid db 'GetPid',0
|
||||
szGetPid db 'GetPid',0
|
||||
szCreateObject db 'CreateObject',0
|
||||
szDestroyObject db 'DestroyObject',0
|
||||
szCreateEvent db 'CreateEvent',0
|
||||
szRaiseEvent db 'RaiseEvent',0
|
||||
szWaitEvent db 'WaitEvent',0
|
||||
szRaiseEvent db 'RaiseEvent',0
|
||||
szWaitEvent db 'WaitEvent',0
|
||||
szDestroyEvent db 'DestroyEvent',0
|
||||
szClearEvent db 'ClearEvent',0
|
||||
szClearEvent db 'ClearEvent',0
|
||||
|
||||
szLoadCursor db 'LoadCursor',0
|
||||
szLoadCursor db 'LoadCursor',0
|
||||
szSelectHwCursor db 'SelectHwCursor',0
|
||||
szSetHwCursor db 'SetHwCursor',0
|
||||
szHwCursorRestore db 'HwCursorRestore', 0
|
||||
@ -68,19 +68,19 @@ iglobal
|
||||
szSysMsgBoardStr db 'SysMsgBoardStr', 0
|
||||
szSysMsgBoardChar db 'SysMsgBoardChar', 0
|
||||
szGetCurrentTask db 'GetCurrentTask',0
|
||||
szLFBAddress db 'LFBAddress',0
|
||||
szLoadFile db 'LoadFile',0
|
||||
szSendEvent db 'SendEvent',0
|
||||
szLFBAddress db 'LFBAddress',0
|
||||
szLoadFile db 'LoadFile',0
|
||||
szSendEvent db 'SendEvent',0
|
||||
szSetMouseData db 'SetMouseData',0
|
||||
szSleep db 'Sleep',0
|
||||
szGetTimerTicks db 'GetTimerTicks',0
|
||||
|
||||
szStrncat db 'strncat',0
|
||||
szStrncpy db 'strncpy',0
|
||||
szstrncmp db 'strncmp',0
|
||||
szStrnlen db 'strnlen',0
|
||||
szStrchr db 'strchr',0
|
||||
szStrrchr db 'strrchr',0
|
||||
szStrncat db 'strncat',0
|
||||
szStrncpy db 'strncpy',0
|
||||
szstrncmp db 'strncmp',0
|
||||
szStrnlen db 'strnlen',0
|
||||
szStrchr db 'strchr',0
|
||||
szStrrchr db 'strrchr',0
|
||||
|
||||
szEthReceiver db 'EthReceiver',0
|
||||
szEthRegDev db 'EthRegDev',0
|
||||
@ -95,12 +95,12 @@ kernel_export:
|
||||
dd szServiceHandler , srv_handler
|
||||
dd szAttachIntHandler, attach_int_handler
|
||||
dd szGetIntHandler , get_int_handler
|
||||
dd szFpuSave , fpu_save
|
||||
dd szFpuSave , fpu_save
|
||||
dd szFpuRestore , fpu_restore
|
||||
dd szReservePortArea , r_f_port_area
|
||||
dd szBoot_Log , boot_log
|
||||
|
||||
dd szPciApi , pci_api
|
||||
dd szPciApi , pci_api
|
||||
dd szPciRead32 , pci_read32
|
||||
dd szPciRead16 , pci_read16
|
||||
dd szPciRead8 , pci_read8
|
||||
@ -131,11 +131,11 @@ kernel_export:
|
||||
dd szGetPid , get_pid
|
||||
dd szCreateObject , create_kernel_object
|
||||
dd szDestroyObject , destroy_kernel_object
|
||||
dd szCreateEvent , create_event ;see EVENT.inc for specification
|
||||
dd szRaiseEvent , raise_event ;see EVENT.inc for specification
|
||||
dd szWaitEvent , wait_event ;see EVENT.inc for specification
|
||||
dd szDestroyEvent , destroy_event ;see EVENT.inc for specification
|
||||
dd szClearEvent , clear_event ;see EVENT.inc for specification
|
||||
dd szCreateEvent , create_event ;see EVENT.inc for specification
|
||||
dd szRaiseEvent , raise_event ;see EVENT.inc for specification
|
||||
dd szWaitEvent , wait_event ;see EVENT.inc for specification
|
||||
dd szDestroyEvent , destroy_event ;see EVENT.inc for specification
|
||||
dd szClearEvent , clear_event ;see EVENT.inc for specification
|
||||
|
||||
dd szLoadCursor , load_cursor ;stdcall
|
||||
|
||||
@ -148,25 +148,25 @@ kernel_export:
|
||||
dd szSysMsgBoardChar , sys_msg_board
|
||||
dd szGetCurrentTask , get_curr_task
|
||||
dd szLoadFile , load_file ;retval eax, ebx
|
||||
dd szSendEvent , send_event ;see EVENT.inc for specification
|
||||
dd szSendEvent , send_event ;see EVENT.inc for specification
|
||||
dd szSetMouseData , set_mouse_data ;stdcall
|
||||
dd szSleep , delay_ms
|
||||
dd szSleep , delay_ms
|
||||
dd szGetTimerTicks , get_timer_ticks
|
||||
|
||||
dd szStrncat , strncat
|
||||
dd szStrncpy , strncpy
|
||||
dd szstrncmp , strncmp
|
||||
dd szStrnlen , strnlen
|
||||
dd szStrchr , strchr
|
||||
dd szStrrchr , strrchr
|
||||
dd szStrncat , strncat
|
||||
dd szStrncpy , strncpy
|
||||
dd szstrncmp , strncmp
|
||||
dd szStrnlen , strnlen
|
||||
dd szStrchr , strchr
|
||||
dd szStrrchr , strrchr
|
||||
|
||||
dd szEthReceiver , ETH_Receiver
|
||||
dd szEthRegDev , ETH_Add_Device
|
||||
dd szEthUnRegDev , ETH_Remove_Device
|
||||
dd szEthReceiver , ETH_receiver
|
||||
dd szEthRegDev , ETH_add_device
|
||||
dd szEthUnRegDev , ETH_remove_device
|
||||
dd szEthStruc2Dev , ETH_struc2dev
|
||||
|
||||
exp_lfb:
|
||||
dd szLFBAddress , 0
|
||||
dd 0 ;terminator, must be zero
|
||||
dd 0 ;terminator, must be zero
|
||||
|
||||
endg
|
||||
|
Loading…
Reference in New Issue
Block a user