MityDSP Documentation Index

Using the MityDSP WINS Daemon

The MityDSP WINS deamon allows you to easily add a Windows Name Service interface into your MityDSP based aplication. A WINS interface can be used to help other PCs on your local area network find your MityDSP device by name.

By itself the WINS deamon is not very useful, but in conjunction with your MityDSP application it can make configuration of your network easier. For example, if you are also using the HTTP server or telnet server modules, then you can connect to your MityDSP device by name rather than by IP address.

e.g.
    ping MityDSP     rather than   ping 192.168.0.100      and
    telnet MityDSP   rather than   telnet 192.168.0.100    and
    http://MityDSP   rather than   http://192.168.0.100
    

The MityDSP WINS deamon complies with Netbios WINS (RFC 1002) Name Query. Only Query Request Client Routine sending/Positive Name Query Response receiving are implemented. When the Netbios Name Query request UDP datagram is on the ethernet network, asking "Who is 'name'?", the MityDSP WINS deamon answers with the specified MityDSP board IP address. Answer to Microsoft Windows/Internet Explorer calls by "http://name" command line (and even directly "name" as command line if "name" is not a shared folder).

Once started the tcWins object runs in the background with no required interaction on the part of your MityDSP application.

Example

The following simple example will start a WINS deamon with the name "MityDSP". Once run you may ping your MityDSP device by name (e.g. ping MityDSP).

 #include "net/wins/wins.h"

 void start_wins_server ()
 {
    struct ip_addr ipaddr;

    // Initialize the IP address. This must be the same IP address which
    // you used to initialize the MityDSP TCP/IP stack.
    IP4_ADDR (&ipaddr,  g_ip_addr[0], g_ip_addr[1], g_ip_addr[2], g_ip_addr[3]);

    // Create the WINS deamon object...
    tcWins *wins = new tcWins;    

    // Start the deamon. Note: This function will not return unless an
    // initialization error occurs.
    wins->run ("MityDSP", &ipaddr);
 }

Copyright Information

The MityDSP WINS deamon is based in part on the Ethernut WINS deamon written by Jean Pierre Gauthier. More information on the Ethernut project may be found here http://www.ethernut.de.

Portions of the MitySP WINS deamon are Copyright by Critical Link LLC. These portions written by Critical Link do not fall under the same redistribution guidelines (outlined below) as the sections copyrighted by other individuals.

Portions of the WINS deamon server copyright by:
Copyright (C) 2004 by Jean Pierre Gauthier. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


  
Generated on Wed Mar 28 15:14:00 2012 for MityDSP Net by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.