* The transport between the Maiko client and Nethub server is TCP based and therefore data is buffered by the kernel so it is not necessary to have an additional layer of buffering to capture multiple logical packets before passing them to the Lisp ethernet interrupt handler.
* Receive packet directly into Lisp’s buffer and byte-swap in place only if necessary.
* Ethernet packet handling is no longer done directly in the signal handler so it is not necessary to block/unblock signals while a packet is being read from the byte stream in ether_get().
* Remove references to ETHEREventCount as it is unnecessary and the implementation (xc.c; other ethernet handlers) that attempted to use it to handle missed ethernet interrupts is incorrect, resulting in calls to the Lisp interrupt handler with no new packet data.
* Style changes - Use early return rather than nesting if statements. Move variable declarations from inline to beginning of function if they are not local to a small block. Use %p format specifier for printing pointers.
word_swap_page() should only touch each 32-bit word once to change
the byte order from ABCD to DCBA rather than twice doing a transform
of the entire region from ABCD to BADC and then again to DCBA
The compiler provided ntohl() usually gets favorable optimizations
applied, so use it for the byte reordering.
With word_swap_page() rewritten, byte_swap_word() is superfluous.
* added support for XNS networking via Dodo-Nethub
* NetHub connection now optional (only if -nh-host is given); released NetHub-related changes to 'ether.c' to the public domain
* Added file using-dodo-networking-with-maiko.md
Documentation for building and using the Dodo-networking addition to Maiko
* Added support for running Maiko unter cygwin/x86_64-x
* Migrate Addr68k/NativeAlignment{2,4} in Nethub code, move timer/async defines to platform.h
* added missing include <netinet/in.h> for FreeBSD
* updated 'compile-flags' with added flags
* splitted ether.c in 3 (_common, _sunos, _nethub)
* reworks/modifications for nbriggs' pull-request review comments
* addintional additions for nbriggs' pull-request review comments
* get the Lisp packet lengths with 'LispInt2CInt'
* renamed variables in dblwordsSwap to indicate it's about double-words
* fixed wrong preprocessor directive unnoticed by clang
* added networking choice option to cmake build, fix to printf warning
- for cmake specify the networking to use with -DMAIKO_NETWORK_TYPE=<type>
- with <type> one of: NONE, SUN_DLPI, SUN_NIT, NETHUB
- e.g.: cmake .. -DMAIKO_NETWORK_TYPE=NETHUB
* integrated improvement to sendPacket() proposed by nbriggs
* integrated fix for SIGBUS on 32-bit big-endian, provided by nbriggs
* MAIKO_ENABLE_ETHERNET should not be unconditionally set on Solaris systems
* Receiving an ethernet packet is an ether interrupt but not an i/o interrupt.
Co-authored-by: dev hawala <devhawala@x.y>
Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
Solaris does not define O_ASYNC, but does define FASYNC and FNDELAY,
which it expects to be used in place of O_ASYNC in an fcntl() to set up
asynchronous I/O on a socket.
This fix also generates a compiler warning if neither the O_ASYNC nor
FASYNC/FNDELAY methods are available.