Datalight ROM-DOS™
Total Page:16
File Type:pdf, Size:1020Kb
Datalight ROM-DOS Developer’s Guide Created: April 2005 Datalight ROM-DOS Developer’s Guide Copyright © 1999-2005 by Datalight, Inc . Portions copyright © GPvNO 2005 All Rights Reserved. Datalight, Inc. assumes no liability for the use or misuse of this software. Liability for any warranties implied or stated is limited to the original purchaser only and to the recording medium (disk) only, not the information encoded on it. U.S. Government Restricted Rights. Use, duplication, reproduction, or transfer of this commercial product and accompanying documentation is restricted in accordance with FAR 12.212 and DFARS 227.7202 and by a license agreement. THE SOFTWARE DESCRIBED HEREIN, TOGETHER WITH THIS DOCUMENT, ARE FURNISHED UNDER A SEPARATE SOFTWARE OEM LICENSE AGREEMENT AND MAY BE USED OR COPIED ONLY IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF THAT AGREEMENT. Datalight and ROM-DOS are registered trademarks of Datalight, Inc. FlashFX ® is a trademark of Datalight, Inc. All other product names are trademarks of their respective holders. Part Number: 3010-0200-0715 Contents Chapter 1, Introduction..................................................................................................................5 About ROM-DOS ......................................................................................................................5 ROM-DOS Target System Requirements...........................................................................6 ROM-DOS Development System Requirements................................................................6 Requesting Technical Assistance........................................................................................6 ROM-DOS Basics......................................................................................................................7 The Major Software Components.......................................................................................7 Placing ROM-DOS in a ROM ..........................................................................................11 DOS on a Disk ..................................................................................................................12 Using ROM-DOS with Flash Memory .............................................................................13 What is SOCKETS?.................................................................................................................13 What does SOCKETS provide?...............................................................................................13 Chapter 2, About TCP/IP.............................................................................................................15 TCP/IP Layers..........................................................................................................................15 Client/Server Model.................................................................................................................16 File Transfer Protocol (FTP)....................................................................................................16 Telnet .......................................................................................................................................17 Mail..........................................................................................................................................17 Hyper Text Transfer Protocol (HTTP).....................................................................................17 Printing.....................................................................................................................................17 Application Programming Interface (API)...............................................................................18 Transmission Control Protocol (TCP)......................................................................................18 User Datagram Protocol (UDP) ...............................................................................................19 2.10. Internet Protocol (IP).......................................................................................................19 Internet Control Message Protocol (ICMP) .............................................................................20 Internet Control Message Protocol version 6 (ICMPv6)..........................................................21 Routing.....................................................................................................................................21 Internet Gateway Management Protocol (IGMP) ....................................................................21 Management Information Base version 2 (MIB II)..................................................................22 Routing Information Protocol (RIP) ........................................................................................22 Address Resolution Protocol (ARP) ........................................................................................22 BOOTP ....................................................................................................................................22 Dynamic Host Configuration Protocol (DHCP) ......................................................................23 Point-to-Point Protocol (PPP) ..................................................................................................24 Serial Line IP (SLIP)................................................................................................................24 Compressed Serial Line IP (CSLIP) ........................................................................................24 Media Support..........................................................................................................................24 Ethernet and Token Ring ..................................................................................................24 Serial Interface..................................................................................................................24 Modem pool support.........................................................................................................24 Alternate Interface support ...............................................................................................25 References................................................................................................................................25 Chapter 3, Programming Reference............................................................................................27 Library Use/Linking.................................................................................................................27 ii Contents Disclaimer.........................................................................................................................27 Compilers Supported ........................................................................................................27 Memory Models................................................................................................................27 Library and Header Locations...........................................................................................27 Header Dependencies........................................................................................................27 Sample Code.....................................................................................................................28 Contacting Support ...........................................................................................................28 ROM-DOS Libraries................................................................................................................28 Function Reference ...........................................................................................................28 TCP/IP Basic API Reference (CAPI).......................................................................................58 TCP/IP Basic API Overview ............................................................................................58 Types of Service ...............................................................................................................59 Establishing Remote Connections ....................................................................................59 Using STREAM and DATAGRAM Services...................................................................60 Blocking and Non-blocking Operations............................................................................60 Blocking Operations with Timeouts .................................................................................60 Asynchronous Notifications/Callbacks.............................................................................60 IP Address Resolution.......................................................................................................61 Obtaining SOCKETS Kernel Information........................................................................61 Error Reporting.................................................................................................................61 Low Level Interface to the Compatible API.....................................................................61 Alternatives to the Compatible API ..................................................................................62 Porting for Compilers .......................................................................................................62 DJGPP and DPMI Support