Demo Programs
Every TCP/IP demo program must know which Ethernet driver it should use. Since On Time RTOS-32 is not a plug-and-play operating system, the demos will not automatically detect what network hardware is installed. Rather, this information is supplied in include file Netcfg.h, which is part of every included demo.
This is the default content of Netcfg.h:
// #define DHCP // if you enable this, you must also
// link library dhcpc.lib
#if defined(DHCP) // use DHCP
...
#else // static IP address assignment (default)
static BYTE TargetIP[] = {192, 168, 1, 10};
static BYTE NetMask[] = {255, 255, 255, 0};
static BYTE DefaultGateway[] = {192, 168, 1, 1};
static BYTE DNSServer[] = {192, 168, 1, 1};
#endif
// #define DEVICE_ID NE2000_DEVICE // define your device type here
#define DEVICE_MINOR 0 // first device of type DEVICE_ID
#ifndef DEVICE_ID
#error You must define network driver/resources here
#endif
...
The NetMask, TargetIP, DefaultGateway, and DNSServer constants are only used by demos which do not use (or are not configured to use) DHCP. You can set DefaultGateway and DNSServer to 0.0.0.0 if you do not intend to use the demo to communicate outside the local LAN segment. With DHCP enabled, all required values are requested from a DHCP server which must be present on the LAN.
The DEVICE_ID specifies which driver shall be used on the target. The following values are available:
Value |
Devices |
Vendor |
NE2000_DEVICE |
NE2000
RTL8019 |
NS
RealTek |
NE2000_PCI_DEVICE |
NE2000
compatibles |
various |
N83815_DEVICE |
DP83815
DP83816 |
NS |
TC90X_DEVICE |
3C900B
3C905B
3C905C |
3COM |
SMC91C9X_DEVICE |
SMC91C90
SMC91C92
SMC91C94
SMC91C96
SMC91C100
SMC91C110
LAN91C111 |
SMC |
LANCE_ISA_DEVICE |
79C960
79C961
79C961A
79C965 |
AMD |
LANCE_DEVICE |
79C970
79C972
79C973
79C975 |
AMD |
LAN_CS89X0_DEVICE |
CS8900
CS8920 |
Crystal |
I82559_DEVICE |
82551
82558
82559
82562
82801 |
Intel |
I8254X_DEVICE |
82540/1/2/3/4/5/6/7
82567
82571/2/3/4/7/8/9
82583
80003
i217
i218
i219
DH89XXCC
ICH8/9/10 |
Intel |
I82575_DEVICE |
82575
82576
82580
i210
i211
i350
i354 |
Intel |
I255_DEVICE |
i225 |
Intel |
I82599_DEVICE |
82598
82599
X540
X550 |
Intel |
EG20T_DEVICE |
EG20T
ML7223
ML7831 |
Intel
ROHM Semiconductor |
R8139_DEVICE |
8129
8139 |
RealTek |
R8168_DEVICE |
8168
8169
8100/1/2/3/4/5/6
8110
8111
8401
DGE-528T |
RealTek
D-Link |
DAVICOM_DEVICE |
DM9102A
STE10/100A
21x4x (Tulip) |
Davicom
STMicroelectronics
DEC/Intel |
RHINE_DEVICE |
VT6105L
VT8235
VT8237 |
VIA Technologies |
VIAVELO_DEVICE |
VT6122
VT6130
VT6132 |
VIA Technologies |
RDC6040_DEVICE |
R6040 |
RDC |
PRISM_DEVICE1 |
Prism 802.11b |
Symbol
Intersil
Agere |
PRISM_PCMCIA_DEVICE1 |
Prism 802.11b |
Symbol
Intersil
Agere |
AX172_DEVICE2 |
AX88172 |
ASIX |
AX772_DEVICE2 |
AX88772
AX88178 |
ASIX |
CDCECM_DEVICE2 |
USB CDC ECM |
- |
RTVMF_DEVICE3 |
- |
acontis |
RTRTH_DEVICE4 |
- |
Real-Time Systems |
LOOP_DEVICE |
Loopback |
- |
For an example of using the PPP driver for RS232 and modem connections, please see demo program PPPDemo.
Program UDPServer
Program UDPClient
Program TCPServer
Program TCPClient
Program SSLServer
Program SSLClient
Program PPPDemo
Program WebServer
Program FTPClient
Program FTPServer
Program TFTPDemo
Program TelnetC
Program TelnetS
Program SNMPDemo
Program MailDemo
Program SntpDemo
Program SMBServer
Program SMBClient
Program SMB3Server
Program SMB3Client
PPP
|