OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: John Wilson on April 23, 2023, 08:53:47 pm
-
Is there a reasonable way to do raw Ethernet I/O (for using non-TCP/IP protocols) from a user-mode application? Something equivalent to the DOS Packet Driver interface or Linux's PF_PACKET would be great, but a BPF/libpcap/WinPcap-style thing is good enough too. I also need to be able to change my MAC address (which might be upsetting to the local TCP/IP stack's ARP layer if it isn't wired for that) and multicast address list, or at least set up promiscuous mode so I can *pretend* to do those things. No idea where to look! I hope it doesn't mean writing a cooperating fake network driver (like WinPcap) because that has quite a learning curve ... but if that's the only choice, OK. If it matters: my application is a minicomputer emulator, which can emulate a minicomputer Ethernet port so the minicomputer OS can run old-fashioned networking protocols (most likely DECnet). Ethernet has long been a missing piece in my OS/2 build. Thanks / JW
-
Hi John, welcome.
As far as I know, we can't change the MAC address.
There is a port of libpcap, https://hobbes.nmsu.edu/download/pub/os2/dev/libraries/misc/lpcap_0-4a.zip (https://hobbes.nmsu.edu/download/pub/os2/dev/libraries/misc/lpcap_0-4a.zip) with other dependencies also on Hobbes. Not sure about any others.
-
Kermit/2 for OS/2 supports DECnet in conjunction with DEC's PATHWORKS For OS/2 product version 2.3 or later. I wonder how they do it?
https://kermitproject.org/k95manual/os2k95.html (https://kermitproject.org/k95manual/os2k95.html)
-
Interesting point about PATHWORKS! OK I grabbed libpcap and it depends on ipspy.dll, which looks much more like what I want. Seems like the .DLL itself might be closed-source though, so I can't do what it does, but at least I can call the DLL and maybe get what I need. Thank you guys!
-
MAC address change - some network drivers allow to set it (MPTS [NAPS] - Parameters - ). Needs a reboot. If you mean changing on the fly - I don't know.