The NetBIOS Datagram Program is a simple application designed to showcase the functionality of NetBIOS (Network Basic Input/Output System) in the context of datagram operations. NetBIOS is a communication protocol that allows applications on different computers to communicate over a local area network (LAN). Datagram operations involve sending and receiving data in a connectionless manner which makes it suitable for tasks such as broadcasting messages or targeted communication.

This application demonstrates the various datagram operations such as sending and receiving both directed and group datagrams as well as broadcast datagrams. The name service uses UDP Protocol on port 137. However, TCP/IP Protocol on port 137 can also be used in some cases.

cl -o Nbdgram.exe Nbdgram.c ..\Common\Nbcommon.obj Netapi32.lib User32.lib

Command Line Options
nbdgram.exe options

  1. -n:NAME Register my unique name NAME
  2. -g:NAME Register my group name NAME
  3. -s I will be sending datagrams
  4. -c:xxx Number of datagrams to send
  5. -r:NAME The recipients NetBIOS name
  6. -b Use broadcast datagrams
  7. -a Receive datagrams for any NetBIOS name
  8. -l:xxx Send datagrams on LANA number xxx only
  9. -d:xxx Delay (in milliseconds) between sends

You need to be familiar with the following in order to properly compile and run this program.

  • The program relies on a Nbcommon library (Nbcommon.obj) for certain functions. Ensure it is available during compilation.
  • Understanding NetBIOS and networking concepts will enhance your comprehension of the program’s functionality.