@LiveForIt
> @LiveForIt: What exactly are you missing in Roadshow which AROS TCP (which is built upon AmiTCP V3) is delivering?
>
> Being able to see what TCP/IP stack is doing when I send some packages, and > maybe understand way I don’t get any packages from Roadshow. At that was problem I had, it looked like communication did not go anywhere. From my point of view.
>
> Something like Wireshark for Amiga might helped.
Roadshow ships with tcpdump, which directly hooks into its builtin BPF interface. That should get you somewhere
At the very least, you could capture the packets, have tcpdump write them to a file (using the "-w" option) and feed these files into Wireshark.
> I have no idea what is going on inside of POSIX sockets, I know roadshow is picky about having open the interface per thread or something like that, but that cannot possibly work, I know about socket sharing, but that is below the POSIX api, so not easily accessible. I got lot crashes and count really do anything. Of course is also issues with errno because designed for isolated thread like forks(), but do not work well in Amiga landscape.
The AmiTCP API does not permit socket library bases to be shared (but doesn't indicate so), and Roadshow follows this practice by default. I tried to keep the behaviour of the API in line with how AmiTCP would approach this, but there is a caveat in that the library base sharing is unpredictable with AmiTCP. This is why Roadshow blocks sharing by default and will return an error. With AmiTCP you may not even get an error, your code might just hang indefinitely.
However, you can enable library base sharing through the SocketBaseTags() SBTC_CAN_SHARE_LIBRARY_BASES option, like so:
error = SocketBaseTags(
SBTM_SETVAL(SBTC_CAN_SHARE_LIBRARY_BASES), TRUE,
TAG_END);
Make sure to check if SocketBaseTags() returns an error code instead of 0. If there's an error code, it means that you can't enable or use library base sharing.
> posix select() also behaves strangely, I had to make a work around in mplayer, when streaming you get error message about select() being broken on AmigaOS
WaitSelect() comes with its share of peculiar features and it does not necessarily perform exactly like select() does. For example, Exec signals are checked during the syscalls behind the bsdsocket.library functions, and if your application so happens to use the same default signals (e.g. SIGBREAKB_CTRL_C) then there will be side-effects.
Due to how the TCP/IP kernel code handles time in, for example, the code which backs the select() syscall, you do not have as fine-grained an interval length as you would with timer.device on the Amiga. More recent versions of Roadshow support the more fine-grained microsecond intervals, though. But out of the box, Roadshow versions older than two years do not.
> For example do I need vlink? Well the TCP/IP package be send to roadshow and my program when I open a ethernet device, or will it only be send to roadshow only, does it work the same on all ethernet drivers? Or is different depending on driver used?
I haven't used vlink.device, so I would not know whether it would make it easier for you to add networking support to Basilisk.
If you went the other way through the use of a SANA-II network device, then the tftp client example should at least introduce you to the basics, namely how to open the device, initialize it, check for errors (and how to make sure that you have the right type of hardware!), and then how to receive and send Ethernet frames. Not all Amiga network device drivers support shared access to the same device, which is where things are bound to get tricky... Sending frames is easy enough, but receiving the frames intended for your emulated Mac is harder (it involves a filter function which not all Amiga device drivers support, and some do not support it completely/correctly). Documentation for SANA-II is available on the Amiga Developer CD 1.1 and beyond.
Whether BSD raw sockets can be a viable substitute remains to be seen. Both AmiTCP V3 and Roadshow support these, but I've never used them.