VOGONS


First post, by Yoghoo

User metadata
Rank Oldbie
Rank
Oldbie

As there was no DOS packet driver for the Realtek RTL8169 Gigabit network card I thought it would be a nice project to create one (for the first time) with the help of Claude. It is tested on real hardware with EtherDFS and MTCP (FTP/NTP etc).

Features

  • PCI bus detection via the PCI BIOS (INT 1Ah).
  • Full RTL8169 initialisation: descriptor-ring based TX/RX (bus-master DMA, not the older RTL8139 ring-buffer style), interrupt handling, IRQ8-15 cascade handling.
  • 10/100/1000 Mbit auto-negotiation (no forced speed - see "Design notes" for why).
  • A minimal, functional subset of the Packet Driver Specification: driver_info, access_type, release_type, send_pkt, terminate, get_address, reset_interface, get_statistics - enough for a single TCP/IP stack such as mTCP or WatTCP.
  • A safe, spec-compliant -u uninstall option that unhooks the driver and frees all of its memory (including the DMA descriptor rings and packet buffers, which live outside the normal resident program image).
  • No <stdio.h>/<stdlib.h> dependency, to keep the resident footprint small.

Requirements

  • A Realtek RTL8169 (PCI vendor:device 10ec:8169) network card.
  • Open Watcom v2, 16-bit DOS target (wcl, not wcl386). Only needed if you want to compile it yourself of course.
  • DOS or a DOS-compatible environment (tested with MS-DOS version 7.10).

Examples

  • RTL8169P 0x60
  • RTL8169P -u 0x60
  • RTLDEBUG -s 0x60

Normally you only need the RTL8169P.EXE executable. But if you need to debug problems there is also a RTLDEBUG.EXE executable available on Github which can output statistics and even create a Wireshark compatible capture file. The debug version uses around 2.2KB extra memory. The standard version with default options uses about 48KB memory. This can be reduced by adjusting the TX/RX parameters (-t, -r) but be aware that using too low values can cause lost packet issues. For an explanation about these and other parameters please take a look a on the project page.

Project page is located on Github: https://github.com/Yoghoo/RTL8169P. Sources are included there as well (GPLv3).

It was quitte an extensive project and I won't bore you with all the details here. But if you are interested in the details look at the README.md and DESIGN.md files on Github.

Please report bug and problems on Github (preferred) or in this thread.

Reply 1 of 3, by carlostex

User metadata
Rank l33t
Rank
l33t

Well done! I think i have a couple of these cards around, need to try that when i have some time available.

Reply 2 of 3, by Grzyb

User metadata
Rank l33t
Rank
l33t
Yoghoo wrote on 2026-09-12, 16:23:

there was no DOS packet driver for the Realtek RTL8169 Gigabit network card

There was this - https://www.corus.pro/pilotes/VAD/VAD747/rtll … Driver_v200B28/
...but it seems to exhibit some issues - Getting the RTL8169SC gigabit NIC working under Win98SE's MS-DOS mode

So it's nice to have an alternative - I will try both when I have an opportunity.

In 2003, I voted in favour of joining the European Union. However, due to later developments - especially the restrictions on cash usage - I have withdrawn my support. DOWN WITH THE EU!

Reply 3 of 3, by Yoghoo

User metadata
Rank Oldbie
Rank
Oldbie
Grzyb wrote on 2026-09-12, 22:02:

There was this - https://www.corus.pro/pilotes/VAD/VAD747/rtll … Driver_v200B28/
...but it seems to exhibit some issues - Getting the RTL8169SC gigabit NIC working under Win98SE's MS-DOS mode

So it's nice to have an alternative - I will try both when I have an opportunity.

Thanks. Couldn't find one when I looked a while ago so nice that there are alternatives.

But I can confirm those problems. It doesn't start in certain PCI slots (with a free IRQ). It does start in another PCI slot (with a shared IRQ) but the transfer rates are really bad. More than 100 times slower (20KB/s instead of 2.4MB/s). This is with a CF card btw. With a ramdrive it's around 4 to 5 times faster. Tested with an Intel Celeron (466MHz) CPU.

Not to promote my packet driver because it is a most probably not perfect yet (it's only tested on 1 PC with 1 RTL8169 NIC) but I'm glad I created it seeing these test results. To be honest I am not even sure if I will be using the RTL8169 NUC in the future. It's a bit faster than a RTL8139 but it gets hot. I mean really hot (70 C). So I would only use this NIC in a well ventilated case.