@Hans_
uIP has IPv6, too, but I haven't tested it.
@all
New version. Back to a simple event loop to aid in troubleshooting applications as opposed to my own bumbling.
Instead of ping-based configuration, this version supports both DHCP (unlike my version of Genesis) and static addresses. It should be possible to keep ping-based configuration around as a backup to DHCP, but I'm not sure that's necessary when static configuration is an option.
I've also added more Amiga-like command-line options via ReadArgs(). Here's a quick summary:
/*
* Command-line options.
*
* Default: DEVICE Devs:Networks/openpci_8139.device UNIT 0 CONFIG DYNAMIC
*
* DEVICE
* Fully-qualified path to device to open.
*
* Example: DEVICE Devs:Networks/openpci_8139.device
*
* UNIT
* Unit number to open.
*
* Example: UNIT 0
*
* CONFIG
* IP address configuration. Valid values are DYNAMIC and STATIC. If
* STATIC, the ADDR, MASK, and DEST options are required.
*
* Example: CONFIG DYNAMIC
* Example: CONFIG STATIC
*
* ADDR
* IP address.
*
* Example: ADDR 192.168.0.100
*
* MASK
* IP subnet mask.
*
* Example: MASK 255.255.255.0
*
* DEST
* IP default gateway.
*
* Example: DEST 192.168.0.1
*/
So, to configure cnet device 0 using DHCP, you can run any of the following commands:
uip device Devs:Networks/cnet.device unit 0 config dynamic
uip device Devs:Networks/cnet.device unit 0
uip device Devs:Networks/cnet.device
Similarly, for static address assignment, you can run something like the following command:
uip device Devs:Networks/cnet.device config static addr 192.168.0.23 mask 255.255.255.0 dest 192.168.0.1
Note that if you specify 'config static', the addr, mask, and dest options are required.
There's a note in the 3.5 autodocs about ReadArgs() expecting newline characters after strings passed as defaults in the option array. I haven't done that, so if using the defaults fails on EXEC <= V37, try using a complete command-line. Anyone have details on this one?
http://www.babacar.org/uip.lhaSo, now we need to come up with some creative uses for uIP--something better than a silly test web server. A general purpose web server would be fun. One that uses the file system instead of pre-compiled files. And performance can be improved. (The port I did for MS-DOS packet drivers performs quite well.) The stack isn't sending full-sized packets, so there's probably a simple buffer issue to overcome.
As I've said before, bsdsocket.library support would be very cool, but I'd rather do that on lwIP.
Trev