DOS network-communication (NETBEUI)

This is a discussion on DOS network-communication (NETBEUI) within the Networking/Device Communication forums, part of the General Programming Boards category; Hi
I have many DOS clients on my LAN and I need to realize a communication tool based on NETBEUI ...

DOS network-communication (NETBEUI)

Hi

I have many DOS clients on my LAN and I need to realize a communication tool based on NETBEUI protocol, does anybody know where i can get examples and source code (in C) ?
Network is working, I can share files among the DOS PC's.

You might check out Ralph Brown's Interrupt List. I'm not familiar with that protocol but if its a dos-based driver then it must be interrupt driven. Perhaps the interrupt listing has the information you need. It will most likely use interrupt 2Fh, but there is another standard networking interrupt vector that most companies used. However it slips my mind at this point because I haven't done any DOS programming in over a year.

Thanks,
but I am actually a Java Developer and not familiar with dark, basic hardware implementations.. as a matter of fact I need to code in C for my DOS clients thus I am searching for example code which I can use direclty by modifying the source code.

You need to interface with the Net driver which will be located in upper memory in DOS. In order to 'call' the driver it will reside on an interrupt which you can invoke. Upon invocation the system looks in the IVT (interrupt vector table). The algo is: offset=(interrupt_num*4), segment=(interrupt_num*4)+2. The value at the location in this table is then used to call the interrupt handler which is provided by the driver manufacturer.

You simply need to pass the correct function number in the AX register (most implementations use the AX register as a function selector) and the correct values in the other registers. The registers used and the correct values to put in them are completely dependent on implementation inside the driver so there really is not a standard. The RBIL or interrupt listing by Ralph Brown will provide a wealth of information on many, many, many older network drivers and I'm sure yours is probably in there somewhere.

Here is an example of setting the video mode in C via int 10h. The desired mode is to be put into AX. There are other options available to use for diff cards but all of them support putting the mode number into AX.

This sets the video mode to 320x200x256 1 byte per pixel. It is a palettised mode in that the numbers in the video memory correspond to a pallette table in the video card memory which then correspond to certain RGB values.

Well thanks for your postings..I don't have the knowledge to implement any interrput stuff, I think that I will try to realize the communication through a database that is located on a shared drive.
I have Microsoft Network Client 3.0 on my DOS PC's, they can all access a shared drive on a Win2000 PC where I will have a database which gets queried by the DOS clients frequently..

All I need now is source code in C that lets me access (execute SQL statements) on a Microsoft Access database.

Just for information.
I found a nice tool for tcp/ip communication for DOS:http://www.ertos.com/ and http://www.wattcp.com
http_d is kind of a socket (on DOS) that can become access easily e.g. through Java etc..
Works nice !