Author Topic: TCP/IP from MVDM DOS sessions  (Read 2600 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5391
  • Karma: +128/-1
    • View Profile
Re: TCP/IP from MVDM DOS sessions
« Reply #15 on: May 05, 2025, 01:25:56 am »
Dave: Possibly. I'm still no clear how the PC/FTP exactly works, but since it was meant as a TCPIP stack for OS2 systems _without_ one (without IBM tcpip for os2) I suspect the IBM BSD stack to be completely bypassed?

In that case, there may be sharing issues, the network adapter and sockets at least. "ifconfig lan0 down" for example may fix the socket sharing, not sure about the network adapter.

SoundChaser

  • Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: TCP/IP from MVDM DOS sessions
« Reply #16 on: May 05, 2025, 03:22:11 pm »
OK while I do _not_ pretend to have material that's awesome enough to make an OS/2 Museum article, or the talent of Michal to do spelunking within the darkness of days gone by, this is getting pretty interesting nevertheless.

My system boots. I suspect ae (e replacement, I hate it) to have garbled my config.sys the first time, which - *if* its indeed the case, led to the infamous country.sys trap error. Maybe it was an operator error as well. Anyway, I've had many problems with editing simple text files from the prompt using ae, so I decided to stick with tedit and epm and forget about e until I recover IBM's original one from my Warp 4 Advanced Server CDROM.

Enough ramblings. the findings:

First, PC/TCP 1.3.1 modifies the config.sys with new entries very early in the file.

I decided to move them closer to other IBMCOM and MPTN (MPTS, whatever) :

Code: [Select]
...snipped...
REM *** this next line was added to the config.sys in the original install.
SET HOSTNAME=ARCAOS

REM *** the line below was added by PC/FTP and I commented it out as it uses the old MS Protocol Manager.
REM DEVICE=d:\pctcp\drv\PROTMAN.OS2 /I:d:\pctcp\drv
REM *** I replaced it with IBM's PROTMAN. I do not know whether they can co-exist.
REM *** BTW, interestingly enough, protman was not in the config.sys already, perhaps because
REM *** I opted out from NetBIOS/NetBEUI?
DEVICE=D:\IBMCOM\PROTMAN.OS2 /I:D:\IBMCOM

REM *** This line corresponds to PC/TCP socket driver.
DEVICE=d:\pctcp\drv\SOCKET.OS2

REM *** This comment was added by PC/TCP installer. I moved it right before my
REM *** NIC driver to document the original message and what's my NDIS driver.
REM *** You must find what is your NIC corresponding NDIS device driver for your setup.
REM *** PUT THE NDIS DEVICE= STATEMENT HERE ***
DEVICE=D:\IBMCOM\MACS\E1000B.OS2

REM *** This is where the fun starts. This is the int 61h driver.
REM *** I'll post another message with additional findings
DEVICE=d:\pctcp\drv\INT61VDD.SYS

REM *** ... and it darkness, bind them :-)
REM *** At this point, everything else correspond to my original config.sys
CALL=D:\IBMCOM\PROTOCOL\NETBIND.EXE
<...snipped...>

Then the installer also add a script to the startup folder, the script invokes the following from pc/tcp folder.

Code: [Select]
netbind
tcpmgr start

There another script, called pctcp.cmd which starts, minimized the VDD_D daemon:

Code: [Select]

rem pctcp.cmd - starts up pctcp services

ifconfig lo0 localhost
hostname arcaos.local
minstart VDD_D


Finally, the default autoexec.bat receives the following new entry:

Code: [Select]
D:\PCTCP\BIN\INST61

And _that_ is what loads the int 61h handler in every VDM instance.

-=-=-=-=-=-=-=-=-=

The install process also tell about modifying the protocol.ini file.... yay..... Since I'm using IBM's protocol manager, I left PCTCP protocol.ini untouched and updated \IBMCOM\protocol.ini instead. I copied the snipped to be filled from PCTCP's protocol.ini, though.

Code: [Select]
[PROT_MAN]

   DRIVERNAME = PROTMAN$

[IBMLXCFG]

   TCPIP_NIF = TCPIP.NIF
   E1000B_NIF = E1000B.NIF

[TCPIP_NIF]

   DriverName = TCPIP$
   Bindings = E1000B_NIF

[E1000B_NIF]

   DriverName = E1000B$


;FTP Software --- PCTCP Section -------
[SOCKET]
drivername = $SOCKET
; The next line was unfilled, I've manually added E1000B$ to bind $SOCKET with E1000B$
bindings= E1000B$
;----------------------------------

Does it work? Hell no :-) Even PCTCP software doesn't work _but_ it could be a configuration thing. I went fast in itsinstall process. The IBM TCP stack still works, I'm typing this from Firefox under ArcaOS 5.1

Oh, and I get a trap error on shutdown in the int61vdd ever since. Very annoying.

Next post will cover my findings wrt int 61h.



SoundChaser

  • Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: TCP/IP from MVDM DOS sessions
« Reply #17 on: May 05, 2025, 03:38:38 pm »
Now for the INT 61h documentation.

It turns out that Ralf Brown's Interrupt List has some info about it.

https://www.cs.cmu.edu/~ralf/files.html

The following page contains the same documentation, but formatted in HTML format:

https://www.ctyme.com/intr/rb-6703.htm

Code: [Select]
FTP Software PC/TCP - TCP/IP TSR System Call interface

AH = system call number (also see entries below)
01h "pkt_alloc" (v2.05; this is "net_config" in v2.1+)
02h "pkt_free" (v2.05; this is "get_kernel_info" in v2.1+)

Return:
CF clear if successful
CF set on error
AL = basic error (see #03319)
AH = suberror number (see #03320,#03321)

InstallCheck:
Test for the signature "TCPTSR" three bytes beyond the start
of the interrupt handler

Range:
INT 20h to INT E0h, selected by configuration

BUG: The SLIP kernel for v2.05 bounds-checks the wrong register, so values greater than 54h in AH may crash the system. Other kernels may have this bug as well.

See Also: INT 61/AH=00h"PC/TCP" - INT 61/AH=2Ah - INT 61/AH=54h

Index:
Installation check;PC/TCP



(Table 03319)
Values for PC/TCP error code:
00h "NET_NOERR" successful
01h "NET_ERR_INUSE" protocol or socket already in use
02h "NET_DOS_ERR" MS-DOS error (returned as suberror code in AH)
03h "NET_ERR_NOMEM" out of memory
04h "NET_ERR_NOTNETCONN" not a network descriptor
05h "NET_ERR_ILLEGALOP" invalid operation on given kind of network descriptor
06h "NET_ERR_BADPKT" illegal or corrupted packet
07h "NET_ERR_NOHOST" no host bound to specified connection
08h "NET_ERR_CANTOPEN" unable to open file
09h "NET_ERR_NET_UNREACHABLE" network is unreachable
0Ah "NET_ERR_HOST_UNREACHABLE" host is unreachable (see #03320)
0Bh "NET_ERR_PROT_UNREACHABLE" protocol is unreachable
0Ch "NET_ERR_PORT_UNREACHABLE" port is unreachable
0Dh "NET_ERR_TIMEOUT" operation timed out
0Eh "NET_ERR_HOSTUNKNOWN" unable to resolve host name
0Fh "NET_ERR_NOSERVERS" no name servers configured
10h "NET_ERR_SERVER_ERR" bad reply from name server.

Subcodes:
0= no error, 1 = Host unreachable
11h "NET_ERR_BADFORMAT" bad format for IP address or field in IP address
structure is zero
12h "NET_ERR_BADARG" invalid argument
13h "NET_ERR_EOF" foreign host closed its end of connection
14h "NET_ERR_RESET" connection has been reset
15h "NET_ERR_WOULDBLOCK" recv() call was done on a non-blocking connection
with no data available
16h "NET_ERR_UNBOUND" insufficient resources to do operation
17h "NET_ERR_NODESC" could not allocate network descriptor
18h "NET_ERR_BADSYSCALL" invalid/unsupported kernel call
19h "NET_ERR_CANTBROADCAST" unable to broadcast
1Ah "NET_ERR_NOTESTAB" operation illegal because connection not established
1Bh kernel busy, try again later
1Ch "NET_ERR_ICMPMESG" an ICMP message was received (not on streams).
(see #03321)
---v2.1+---
1Dh "NET_ERR_TERMINATING" internal kernel fatal error
1Eh "NET_ERR_TAG_LOCKED" not allowed to set this tag (net_config)
1Fh "NET_ERR_BAD_INTERFACE" non existent interface specified
20h "NET_ERR_BADCONFIG" kernel cannot run - bad configuration
21h "NET_ERR_EMM" expanded memory error
22h "NET_ERR_CANT_SHUTDOWN" cant unload kernel (multitasker running)
23h "NET_ERR_PARKED_IN" unable to unhook DOS interrupt
24h "NET_ERR_NOQIOS" ran out of resources; try again later
25h "NET_ERR_WOULD_TRUNCATE" datagram too large and "don't truncate" was set



(Table 03320)
Values for subcodes of PC/TCP error 0Ah "NET_ERR_HOST_UNREACHABLE":
00h    no error
01h    host unreachable
02h    ARP failed
03h    hardware failure
04h    link failure
05h    no route
06h    gateway down

See Also: #03319 - #03321



(Table 03321)
Values for subcodes of PC/TCP error 1Ch "NET_ERR_ICMPMESG":
07h    unrecognised
08h    can't fragment
09h    srcr_fail
0Ah    source quench
0Bh    time exceeded
0Ch    parameter problem
0Dh    admin_prohib. see also code 0Ah

See Also: #03319 - #03320


But... wait... it says TCP/IP System Call interface.

Yeah. It seems the packet driver is expected to be at INT 60h while the TCP/IP stack to reside at 61h.

What I was originally looking for was a handler for INT 60h instead of a TCP/IP payload forwarder. In other words, this is only useful for software developped for PCTCP and/or OnNet. It's mostly useless to run any software developped for WATTCP or Brutman mTCP DOS stacks, which want to talk to the NDIS adapter through INT 60h

Now if anyone has DOS or WinOS/2 software that works with PCTCP and been yearning for a way to have them run in ArcaOS, this could be your path forward. The hard trap upon shutdown is massively annoying, though.

The quest remains open for a packet driver shim or VDD that would work in MVDM...