DM&P DOS Sockets Library

Home : Products | Technical Support 2007/08/08

DSock is a TCP/IP library for DOS real mode, which is used by RSIP. It provides simple C functions for programmer to write Internet applications. We also provide Internet examples using DSock: BOOTP/DHCP, FTP server, SMTP client/server, HTTP server, TELNET server, Talk client/server, etc.

DSock provides a lot of example source code. Programmer can add Internet functions to their project easily and save a lot of time. We also provide a utility "MakeROM" which can make a ROM image for programmer to fit their application, DOS and BIOS into one 512KB flash ROM like Mity-Mite Module Demo Box do.

DSock is free for DM&P products using M6117D/Vortex86/Vortex86SX CPU and business version is also available for other x86 CPUs. If you want to use DSock on other x86 CPUs, mail to soc@dmp.com.tw please.

Just running DSock examples, our single board computers with Ethernet interface can be a Web/FTP server. You can get benefits from DSock:

We use Turbo C 2.0 to compile DSock and we recommend you to use Borland C++/Turbo C++ to build your program. Download Turbo C++ 1.01 form http://community.borland.com/article/images/21751/tcpp101.zip (2.63 MB)

What's New

Version 0.61 - 2007/08/08

  • Support Ethernet in Vortex86SX SoC.

Version 0.60 - 2004/12/09

  • Support AX88796 100M LAN chipset for M6117D series.
  • Fix checksum bug for odd-bytes packets.

Version 0.51 - 2002/07/24

  • Time out check added in SocketGetString() to avoid halt.

Version 0.50 - 2002/06/11

  • Support Vortex86.

Version 0.42 - 2002/05/20

  • DSock programming guide and library reference updated.
  • Function SocketFlush() and SocketFlushNext() added.

(More...)

 Specifications

Hardware Requirement
  • DM&P M6117D/Vortex86/Vortex86SX signal board computers
  • Ethernet interface.
  • 512 KB RAM
  • 64 KB Disk space
  • Realtek 8019/8139 10/100 Base-T.

    Packet Driver Requirement

  • RTL8019/8139/NE2000 compatible
  • AX88796
  • R6040 in Vortex86SX
  • Operating System
  • X-DOS
  • DR-DOS
  • MS-DOS
  • FreeDOS

    Protocols

  • IP / ICMP / ARP
  • TCP / UDP
  • BOOTP / DHCP
  • SMTP / HTTP / FTP / TELNET (Example)
  •  Examples in DSock Library

    Example Name Description
    DEMO\BOOTP Use BOOTP/DHCP to get network setting from DHCP server.
    DEMO\DNS To get IP address from domain name.
    DEMO\FTPD FTP server example, default user name is "dmp" and default password is "dmp".
    DEMO\HTTPD Web server example.
    DEMO\SMTP A simple program to send mail.
    DEMO\SMTPD SMTP server example.
    DEMO\TELNETD Simple TELNET server example, default user name is "dmp" and default password is "dmp".
    DEMO\TALK_S Talk Server example with multiple TCP connections.
    DEMO\TALK_TCP Talk example with TCP.
    DEMO\talk_tcp_win Talk (TCP) Windows version written with WinSock.
    DEMO\TALK_UB Talk example with broadcast.
    DEMO\talk_ub_win Talk (UDP) Windows version written with WinSock.
    DEMO\TALK_UDP Talk example with UDP.
    DEMO\talk_udp_win Talk (UDP) Windows version written with WinSock.
    DEMO\SOCK_AP A start-up project for programmer that support FTP/HTTP/SMTP/TELNET.

    Update Utility for DSock

    Update utility is a Windows program to upload files by FTP protocol. Use DSock to develop your application and support FTP service. You can use this utility to auto-upload files to update your firmware. Our auto-update program for WebCamera and RSIP use Update utility to do firmware updating. If you use DSock to build your application with FTP service, package your new firmware with Update utility will be very useful for programmer to update firmware of his products.

    For example, user can download RSIP auto-update form our web site to update firmware. RSIP uses a 512KB flash disk contains BIOS, X-DOS and RSIP main program like Mity-Mite Module.

    Update Utility Page: http://www.dmp.com.tw/tech/dmp-lib/dsock/update

     How to Run Examples

    Before running examples, you should load packet driver first.
    RTL8019
    The default I/O address and IRQ of DMP products are 0x320 and 5. Run NE2000.COM to install packet driver:

    
    C:\DSOCK\DEMO\EXE>ne2000 0x62 5 0x320
    

    where software interrupt 62H can be any number between 60H and 70H. Just run pktdrv.bat in directory "EXE" to load packet driver:

    
    C:\DSOCK\DEMO\EXE>pktdrv (Load packet driver for RTL 8019)
    C:\DSOCK\DEMO\EXE>ftpd   (Run any DSock example program)
    

    RTL8139
    For Vortex86, you should use another packet driver:

    
    C:\DSOCK\DEMO\EXE>rtspkt 0x62
    

    where software interrupt 62H can be any number between 60H and 70H. Or run pktdrv2.bat in directory "EXE" to load packet driver:

    
    C:\DSOCK\DEMO\EXE>pktdrv2 (Load packet driver for RTL8139)
    C:\DSOCK\DEMO\EXE>ftpd    (Run any DSock example program)
    

    AX88796
    For M6117D with 100M LAN, you should use AX88796 packet driver:

    
    C:\DSOCK\DEMO\EXE>796pkt 0x62 5 0x320
    

    where software interrupt 62H can be any number between 60H and 70H. Or run pktdrv3.bat in directory "EXE" to load packet driver:

    
    C:\DSOCK\DEMO\EXE>pktdrv3 (Load packet driver for AX88796)
    C:\DSOCK\DEMO\EXE>ftpd    (Run any DSock example program)
    

    Vortex86SX

    For Vortex86SX with 100M LAN, you should use R6040 packet driver:

    
    C:\DSOCK\DEMO\EXE>r6040pd 0x62
    

    where software interrupt 62H can be any number between 60H and 70H. Or run pktdrv4.bat in directory "EXE" to load packet driver:

    
    C:\DSOCK\DEMO\EXE>pktdrv4 (Load packet driver for Vortex86SX)
    C:\DSOCK\DEMO\EXE>ftpd    (Run any DSock example program)
    

    The default setting of network is on DSOCK.CFG. You should modified the default setup upon your network. After changing the DSOCK.CFG, you can run examples.

     DSock Download

    The DSock library download from our web site is test version. It will quit to DOS after 2 hours. Mail us to get normal or business version please. E-mail: info@icop.com.tw.

     Technical Support

    If you have any problem about DSock, feel free to mail to soc@dmp.com.tw please.


    DMP Electronics Inc. All rights reserved. Email us: info@dmp.com.tw