Int 15/AX=DE2Eh

Prev Next Ralf Interrups Categories Contents

------

DESQview v2.50+ - SOCKET API

AX = DE2Eh
DX:BX -> socket record (see #00558)
0000h:0000h to create a new socket record

Return:
CX = size of socket record in bytes DX:BX -> socket record which was used

Notes: DESQview 2.50-2.52 are distributed as part of DESQview/X v1.0x.. Socket records are allocated from common memory. For Unix compatibility, each socket and connection on a socket is allocated a DOS file handle (referencing an SFT for NUL) which is used on various calls to specify which of possibly multiple connections is to be operated upon

See Also: AX=DE2Dh - INT 61/AX=0001h/SF=0001h"VINES" - INT 63"DESQview"

(Table 00557) Values for DESQview/X socket API function number: 0000h initialize socket??? 0001h "gethostname" 0002h "ioctl" check for input 0003h "sleep" delay for specified period 0004h "htons" convert word to network (big-endian) byte order 0005h "select" 0006h "bsd_close"/"so_close" close socket 0007h NOP 0008h "connect" initiate connection on socket 0009h "recv"/"recvfrom" read from socket 000Ah "socket" 000Bh ??? 000Ch "gethostbyname" 000Dh "send"/"sendto" write to socket 000Eh ??? (does something to all connections for process) 000Fh "getpid" get process identifier 0010h "gettimeofday" 0011h "bind" assign name to socket 0012h "listen" listen for connections on socket 0013h "accept" accept connection on socket 0014h connect to X server 0015h "gethostbyaddr" get host information for an address 0016h "getprotobyname" 0017h "getprotobynumber" 0018h "getservbyname" 0019h "getservbyport" 001Ah "getsockname" determine name bound to socket 001Bh "getpeername" get name of connected peer 001Ch "getsockopt"/"setsockopt" 001Dh "so_exit" close all sockets for calling process 001Eh "issock" determine whether file handle references socket 001Fh "so_attach" reattach previously detached socket 0020h "so_detach" temporarily detach socket 0021h "dvpath" get DESQview directory (see also AX=DE24h) 0022h "NewProc" start new application (see also AX=102Ch) 0023h "so_linkup" 0024h "CanonicalPath" canonicalize filename (see also INT 21/AH=60h) 0025h indirect INT 15h call 0026h Network Manager interface 0027h "so_unlink" close connection from "so_linkup" 0028h "raisepriority" 0029h "lowerpriority" 002Ah "so_private" ??? FFFFh "NetExit" (appears to be a NOP)

Format of DESQview/X socket record: Offset Size Description (Table 00558) 00h WORD signature F0ADh 02h WORD function number (see #00557) 04h WORD returned error code (see #00578) 06h WORD maximum message size??? (usually 0400h) 08h WORD PSP segment to use or 0000h if socket not valid 0Ah WORD scratch space (JFT size) 0Ch DWORD scratch space (JFT address) 10h DWORD mailbox handle (initialized by function 0000h) 14h DWORD timer object handle (initialized by function 0000h) ---function 0000h--- 18h WORD (ret) ??? ---function 0001h--- 18h WORD (ret) status??? 1Ah 128 BYTEs (ret) ASCIZ hostname (empty string if not on network) 9Ah WORD maximum length of hostname to return ---function 0002h--- 18h WORD (ret) status 1Ah WORD socket's file handle 1Ch WORD IOCTL function 05h "FIONREAD" determine available input 06h "FIONBIO" set blocking state of socket 1Eh WORD (return, subfn 05h) number of bytes available for reading (call, subfn 06h) 0000h blocking, nonzero nonblocking ---function 0003h--- 18h 2 BYTEs unused 1Ah WORD delay time in seconds ---function 0004h--- 18h WORD (ret) result in network (big-endian) byte order 1Ah WORD value to convert to network byte order ---function 0005h--- 18h WORD (ret) number of handles meeting the specified conditions??? 1Ah WORD number of file handles in each bitset 1Ch DWORD bitset of socket handles to check for readability 20h DWORD bitset of socket handles to check for writability 24h DWORD bitset of socket handles to check for errors 28h WORD timeout in ??? or 0000h to block until some socket ready 2Ah DWORD ??? 2Eh DWORD ??? ---function 0006h---

18h WORD (ret) status:
0000h if successful, FFFFh on error 1Ah WORD socket's file handle ---function 0008h---

18h WORD (ret) status:
0000h if successful, FFFFh on error 1Ah WORD socket's file handle 1Ch WORD 0001h if socket name specified, 0000h if not 1Eh WORD length of socket name 20h N BYTEs name of socket to which to connect ---function 0009h--- 18h WORD (ret) number of bytes actually read, 0000h if connection closed, or FFFFh on error 1Ah WORD socket's file handle 1Ch WORD number of bytes to read 1Eh WORD flags 20h WORD 0000h if no source address desired 0001h if source address is to be stored (datagram sockets) 22h WORD length of source address 24h 110 BYTEs source address 92h 1K BYTEs buffer for data to be read ---function 000Ah--- 18h WORD (ret) socket's file handle or FFFFh on error 1Ah WORD address family (0001h,0002h) 1Ch WORD socket type 1Eh WORD protocol ---function 000Bh--- 18h WORD (ret) 0001h if ??? or FFFFh on error 1Ah WORD socket's file handle 1Eh WORD (call) ??? ---function 000Ch--- 18h 128 BYTEs ASCIZ hostname (special case if empty string or "unix") 98h ??? (ret) packed 'hostent' structure A2h ??? (ret) ??? ---function 000Dh--- 18h WORD (ret) number of bytes actually written or FFFFh on error 1Ah WORD socket's file handle 1Ch WORD number of bytes to write 1Eh WORD number of bytes to follow in subsequent writes??? 20h WORD flags 22h WORD 0000h if no destination specified, 0001h if destination present 24h WORD 0001h if broadcast message???, 0000h if not (ignored if no destination specified) 26h WORD length of destination address 28h 110 BYTEs destination address 96h 1K BYTEs buffer containing data to be written ---function 000Eh--- no additional fields ---function 000Fh--- 18h DWORD (ret) DESQview task handle of calling process ---function 0010h--- 18h DWORD (ret) current time 1Ch DWORD (ret) ??? ---function 0011h---

18h WORD (ret) status:
0000h if successful, FFFFh on error 1Ah WORD socket's file handle 1Ch WORD length of name 1Eh N BYTEs buffer for socket name ---function 0012h---

18h WORD (ret) status:
0000h if successful, FFFFh on error 1Ah WORD socket's file handle 1Ch WORD maximum backlog of pending connections allowed on socket ---function 0013h--- 18h WORD (ret) file handle for new connection or FFFFh on error 1Ah WORD listen()ing socket's file handle 1Ch WORD (call) length of buffer for connecting entity's address (ret) actual length of address 1Eh N BYTEs buffer for connecting entity's address (110 bytes???) ---function 0014h--- 18h WORD (ret) socket's file handle or FFFFh on error 1Ah 4 BYTEs (ret) ??? 1Eh WORD (ret) ??? 20h WORD (ret) ??? 22h 256 BYTEs ASCIZ X display name 122h ??? ---function 0015h--- 18h WORD (call) type of address??? (test for 0001h seen) 1Ah WORD (call) length of buffer for host address 1Ch 110 BYTEs buffer containing ASCIZ host address 8Ah WORD (ret) offset of official host name 8Ch WORD (ret) offset of alias list??? 8Eh WORD (ret) address type??? 90h WORD (ret) length of an address in bytes??? 92h WORD (ret) offset of address??? 9Ah N BYTEs (ret) buffer for hostname, alias list, and host address ---function 0016h--- 18h ??? buffer for ASCIZ protocol name 98h ??? ---function 0017h--- 18h WORD (call) protocol number 1Ah WORD (ret) ??? or 0001h ---function 0018h--- 18h 128 BYTEs buffer containing ASCIZ ??? 98h 128 BYTEs buffer containing ASCIZ ??? 118h WORD (ret) ??? ---function 0019h--- 18h WORD port number 1Ah 128 BYTEs (call) ASCIZ host name (ret) packed servent strctures??? 9Ah WORD (ret) ??? ---function 001Ah--- 18h WORD (ret) 0000h if successful, FFFFh on error 1Ah WORD socket's file handle 1Ch WORD (call) length of buffer for socket name (ret) actual length of socket name 1Eh N BYTEs buffer for socket name ---function 001Bh---

18h WORD (ret) status:
0000h if successful, FFFFh on error 1Ah WORD socket's file handle 1Ch WORD (call) size of buffer for name (ret) actual size of name 1Eh N BYTEs buffer for peer's name ---function 001Ch---

18h WORD (ret) status:
0000h if successful, FFFFh on error

1Ah WORD direction:
0000h to get, 0001h to set 1Ch WORD socket's file handle 1Eh WORD option level 20h WORD option name 22h WORD (call) length of buffer for option value (ret) actual length of option value 24h N BYTEs buffer for option value ---function 001Dh--- no additional fields ---function 001Eh---

18h WORD (ret) status:
0000h ??? or 0001h ??? 1Ah WORD file handle which may or may not be a socket ---function 001Fh--- 18h WORD (ret) file handle or FFFFh on error 1Ah DWORD (call) pointer to Socket Context Record (see #00579) of a previously detached socket ---function 0020h---

18h WORD (ret) status:
0000h if successful or FFFFh on error 1Ah WORD socket's file handle 1Ch DWORD (ret) pointer to Socket Context Record (see #00579) for the file handle ---function 0021h--- 18h 64 BYTEs buffer for DESQview startup directory (see AX=DE25h) ---function 0022h--- 18h DWORD (ret) task handle of new application 1Ch WORD size of .DVP data 1Eh 129 BYTEs ASCIZ ??? 9Fh N BYTEs .DVP data (see #00427 at AX=102Ch) ---function 0023h--- 18h WORD (ret) ??? or FFFFh on error 1Ah WORD socket's file handle??? ---function 0024h--- 18h WORD (ret) DOS error code (see #01680 at INT 21/AH=59h/BX=0000h) 0000h if successful 1Ah 129 BYTEs ASCIZ filename/pathname 11Bh 129 BYTEs ASCIZ canonicalized filename/pathname (see INT 21/AH=60h) ---function 0025h--- 18h WORD value of AX 1Ah WORD value of BX 1Ch WORD (call) value of CX for call if AH value other than 12h (call) number of stack parameters if AH value is 12h (ret) returned CX for calls other than INT 15/AH=12h 1Eh WORD value of DX 20h WORD value of DI 22h WORD value of SI 24h WORD value of DS 26h WORD value of ES 28h WORD (ret) value of FLAGS after call 2Ah N DWORDs (call) stack parameters for INT 15/AH=12h call (ret) stack results from INT 15/AH=12h call ---function 0026h--- 18h WORD (call) Network Manager subfunction (see #00559) (ret) status??? (0000h on error) 1Ah WORD (call) size of parameter data (ret) size of returned data 1Ch N BYTEs (call) parameter data required by call (see #00560,#00561,#00577) (ret) result data (see #00570,#00571,#00576) ---function 0027h---

18h WORD (ret) status:
0000h if successful, FFFFh on error 1Ah WORD socket's file handle ---functions 0028h,0029h--- 18h WORD (call) file handle for which to set priority low/high FFFFh to change calling task's priority ---function 002Ah--- no additional fields

(Table 00559) Values for DESQview/X Network Manager subfunction: 0004h "so_exit"??? 0005h "gethostbyname" 0006h "gethostname" 0009h "socket" 000Dh "gethostbyaddr" 000Fh "getprotobyname" 0010h get protocol name for protocol number 0011h "getservbyname" 0012h "getservbyport" (see #00563) 0013h "getsockname"??? (see #00564) 0016h "shutdown" (see #00565) 0017h kill Network Manager 0018h "getpeername"??? (see #00566) 0019h ??? (called by socket function 0000h) (see #00567) 001Ah ??? (see #00568) 001Bh "so_linkup" (see #00569) 001Dh "getnetstatus" get network services (see #00570) 001Fh "getpwuid" 0020h "getpwnam" 0021h "getpwvar" 0022h "crypt" 0023h "so_unlink" 0024h "getlogin" (see #00571) 0028h "sethostent" 0029h "gethostent" 002Ah "soaddhost" 002Bh "soupdatehost" 002Ch "sodeletehost" 002Dh "setservent" 002Eh "getservent" 002Fh "setpwent" 0030h "getpwent" (see #00572) 0031h "sethostpath" (see #00573) 0032h "endservent" 0033h "endhostent" 0034h "getnettype" get IP network number (see #00574) 0035h ??? (pops up Network Manager window) 0037h "getnettimeout" (see #00575) 0038h get machine name and IP address (see #00576) 0039h "getuid" (see #00577) ---DV/X v2.0+ --- 0041h "deletepwnam" 0045h "renamepw"

Format of Function 0026h/Subfunction 000Fh data: Offset Size Description (Table 00560) 00h 8 BYTEs (ret) ???

Format of Function 0026h/Subfunction 0010h data: Offset Size Description (Table 00561) 00h 2 BYTEs (ret) ??? 02h WORD (ret) protocol number 04h WORD (call) protocol number for which to get name 06h WORD (ret) ??? 08h var (ret) ASCIZ protocol name N var (ret) ASCIZ protocol name

Format of Function 0026h/Subfunction 0011h data: Offset Size Description (Table 00562) 00h 8 BYTEs ??? 08h var (ret) ASCIZ protocol name. Var (ret) ASCIZ ??? name. Var (ret) ASCIZ ??? name

Format of Function 0026h/Subfunction 0012h data: Offset Size Description (Table 00563) 00h 8 BYTEs (ret) ???

Format of Function 0026h/Subfunction 0013h data: Offset Size Description (Table 00564) 00h 116 BYTEs (ret) ???

Format of Function 0026h/Subfunction 0016h ("shutdown") data: Offset Size Description (Table 00565) 00h WORD (ret) shutdown status (0000h successful, FFFFh error) 02h 4 BYTEs (ret) ??? 04h WORD (call) socket handle 06*h WORD (call) what (0 = receives, 1 = sends, 2 = both)

Format of Function 0026h/Subfunction 0018h data: Offset Size Description (Table 00566) 00h 116 BYTEs (ret) ???

Format of Function 0026h/Subfunction 0019h data: Offset Size Description (Table 00567) 00h 4 BYTEs (ret) ??? 04h DWORD (ret) task handle of ???

Format of Function 0026h/Subfunction 001Ah data: Offset Size Description (Table 00568) 00h 38 BYTEs (ret) ???

Format of Function 0026h/Subfunction 001Bh data: Offset Size Description (Table 00569) 00h 10 BYTEs (ret) ???

Format of Function 0026h/Subfunction 001Dh return data [array]: Offset Size Description (Table 00570) 00h WORD ??? or FFFFh if end of array 02h 7 BYTEs ??? 09h 27 BYTEs ASCIZ name of service

Format of Function 0026h/Subfunction 0024h return data: Offset Size Description (Table 00571) 00h var ASCIZ username

Format of Function 0026h/Subfunction 0030h data: Offset Size Description (Table 00572) 00h WORD (call) UID or 0000h for current user (ret) ??? 02h WORD (ret) UID 04h 6 BYTEs (ret) ??? 0Ah var (ret) ASCIZ username. Var (ret) ASCIZ encrypted password. Var (ret) ASCIZ initial ("home") directory

Format of Function 0026h/Subfunction 0031h ("sethostpath") data: Offset Size Description (Table 00573) 00h 4 BYTEs ??? 04h 144 BYTEs ASCIZ ???

Format of Function 0026h/Subfunction 0034h data: Offset Size Description (Table 00574) 00h 1-3 BYTEs IP network number of caller's machine (low byte first)

Format of Function 0026h/Subfunction 0037h ("getnettimeout") return data: Offset Size Description (Table 00575) 00h WORD (ret) timeout 02h 2 BYTEs (ret) ???

Format of Function 0026h/Subfunction 0038h return data: Offset Size Description (Table 00576) 00h BYTE ??? 01h 4 BYTEs IP address 05h var ASCIZ machine name. ???

Format of Function 0026h/Subfunction 0039h ("getuid") return data: Offset Size Description (Table 00577) 00h WORD user ID 02h 2 BYTEs ???

See Also: #00573 - #00576

(Table 00578) Values for DESQview/X socket error code: 0000h successful 0009h "BADF" bad file handle 000Ch "ENOMEM" out of memory 000Eh "EFAULT" bad address 0016h "EINVAL" invalid argument 0018h "EMFILE" too many open files 0020h "EPIPE" ??? broken pipe 0023h "EWOULDBLOCK" operation cannot be completed at this time 0024h "EINPROGRESS" operation now in progress 0026h "ENOTSOCK" socket invalid 0028h "EMSGSIZE" message too long to send atomically 002Ch "ESOCKTNOSUPPORT" socket type not supported 002Fh "EAFNOSUPPORT" address family not supp. by protocol fam. 0031h "EDOM" argument too large 0038h "EISCONN" socket is already connected 0039h "ENOTCONN" socket is not connected

Format of DESQview/X Socket Context Record: Offset Size Description (Table 00579) 00h DWORD pointer to next Socket Context Record, 0000h:0000h if last 04h WORD SFT index for socket, 00FFh if not connected, FFFFh if detached 06h WORD PSP segment of owner or 0000h 08h WORD mapping context of owning window (see #00416 at AX=1016h) 0Ah 2 BYTEs ??? 0Ch WORD address family 0Eh WORD socket type 10h WORD protocol 12h WORD socket state 0001h created 0002h bound 0003h listening??? 0005h connected 14h DWORD timer object handle 18h DWORD object handle (mailbox???) 1Ch DWORD object handle of parent of above object or 0000h:0000h 20h DWORD pointer to ??? or 0000h 24h 6 BYTEs ??? 2Ah WORD file handle for socket or FFFFh 2Ch 2 BYTEs ??? 2Eh WORD nonzero if socket nonblocking ---network connections only--- 30h 2 BYTEs ??? 32h WORD ??? 34h 4 BYTEs (big-endian) IP address of remote 38h 6 BYTEs ???

Category: DESQview/TopView and Quarterdeck Programs - Int 15h - D

------

Prev Next Ralf Interrups Categories Contents

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home

Search the web with Google
Google
Google
Google

------