home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. CD ROM (Annual Premium Edition)
/
premium.zip
/
premium
/
IBMOS2_2
/
MAILMIND.ZIP
/
NETMMIND.DOC
< prev
next >
Wrap
Text File
|
1992-03-16
|
17KB
|
337 lines
NETMMIND.DOC
NETMMIND is our system for providing mail reminders to 3+Mail users
under 3+Open or Microsoft Lan Manager. NETMMIND uses NetBIOS and
hence works through any NetBIOS protocol such as NBP without needing
to have an XNS stack loading at workstations. NETMMIND consists of both
software to run on the workstations and software to run on the
server.
On the workstation, NETMSG.COM is a TSR replacement for NETPOPUP.
NETMSG receives NetBIOS messages and displays them on the first line
of the screen. Messages of less than 3 characters are displayed in
the upper right corner, with the second character specifying the
displacement from the right. Longer messages are displayed on the
left of the screen. NETMSG.COM works with color adapters;
NETMSGBW.COM is the version for IBM monochrome adapters. NETMSG
works in conjunction with other utilities that add appropriate
NetBIOS names to the workstation and send messages from DOS and OS/2.
These utilities are described briefly below.
On the server, NETMMIND.EXE is an OS/2 detached process that sends
out the reminder messages. NETMMIND.EXE reads NETMMIND.INI to link
3+Mail user subdirectories with NetBIOS names. (An older version,
NETFMIND.COM, is a DOS TSR that can be run on a workstation to perform the
same function as NETMMIND.EXE.)
We have been using NETMMIND for over a year now on two 3+Open
networks, one with over 175 workstations, in the Division of Cancer
Prevention and Control (DCPC) of the National Cancer Institute. We
have not experienced any problems nor have we found any conflicts
between the TSRs and other programs. We are quite confident that the
programs work as described below. The directions are oriented toward
our needs in DCPC, but we have tried to generalize them wherever
feasible. Since our documentation is rather terse, we suggest
familiarizing yourself with the programs by trying the following at a
DOS workstation:
a. NETLSTNM. Executing this program should display a list of the
NetBIOS names on the workstation.
b. NETADDNM DUMMY. NETADDNM should have added the name DUMMY to the
workstation NetBIOS names (provided you don't already have DUMMY on
your network! If you do, select another name.) Run NETLSTNM again to
confirm this.
c. NETMSG. NETMSG installs the message receiving TSR for a color
display. Use your favorite memory mapping program, e.g., MEM for DOS
5.0, to confirm the installation of NETMSG.
d. NETSEND DUMMY M. "NETSEND" to "DUMMY" the message "M". Your
workstation should emit a distinctive sound and a flashing M should
appear in the upper right corner of the display. This is the message
we normally use for mail reminders.
e. NETSEND DUMMY "Test message". Include the quotes around "Test
message". Your workstation should emit the same sound as with 4
above, but this longer message should display on the first line
starting at the left margin. We use these longer messages for
notifications about network problems. You can also enter just
NETSEND and be prompted for the user and message. (If you're
prompted for the message, you don't have to use quotes around
messages of more than one word.)
f. If you like what you've seen so far, try installing the mail
minder system per the directions below!
Installation directions for NETMMIND:
1. At a workstation, use NETLSTNM.EXE to list the NetBIOS names. For
3+Open systems, two names are usually registered: LANGROUP and the
computer name. These names are not useful for NETMMIND as explained
later. If another name is not available, use NETADDNM <name> to add
the name to be used for mail reminders. Hence you should include a
line in AUTOEXEC.BAT like:
netaddnm MY_NAME
For DCPC, add NETADDUS.EXE ("net add user") to LOGON.BAT. NETADDUS does a
number of things dependent upon an understanding of NetBIOS names.
When a name is added to NetBIOS, NetBIOS assigns a number to the
name. 3+Open already registers the names LANGROUP (2) and the
computer name, e.g., CIII, (3). NETADDUS deletes any NetBIOS numbers
greater than 4 and then registers the environment variable username
(initials) as 4 and the home_server (with the SERV replaced by USER,
e.g., USERCSB) as 5. If your network only has one server, you can
modify NETADDUS to eliminate the server registration. This will save
some execution time.
2. Add the TSR NETMSG.COM to the autoexec sequence (or NETMSGBW.COM
if the video adapter is an IBM monochrome card.) NETMSG currently
occupies about 5K and is written in assembler using the TesSeRact TSR
library. If anyone wants to optimize it in straight assembler, it
would probably be reduced to about 2-3K.
For DCPC, since we use three files for this sequence (AUTOEXEC.BAT,
LOGON.BAT, and SETDOS.BAT) we put NETMSG in SETDOS.BAT with the rest
of our TSRs.
3. Create a file NETMMIND.INI. This INI file must be similar in
format to the MBXS mailbox file. (Each user has a numbered directory
in C:\3OPEN\3MAIL\INBOX. 3+Mail creates a text file
C:\3OPEN\3MAIL\MBXS, mailboxes, listing the mailbox numbers and
usernames.) The first line will be ignored and subsequent lines have
the directory numbers and user names as follows:
004425070950
0 Admin:NCIDCPC1:NIH
1 JD:John Doe -- everything after the ':' is ignored
A leading ';' indicates a remark. Use only one blank between the
mail box number and the user name. The domain and organization are not
needed. The name must be a NetBIOS name. If that is different
than the 3+Mail name (as it is in DCPC), the MBXS file can not be used--
you must make a similar file with the NetBIOS names.
4. If you have a standard 3+Open server setup, copy the files
NETMMIND.INI and NETMMIND.EXE to the mail servers C:\3OPEN\3MAIL
directory. Add this line to the servers 3STARTUP.CMD file:
"detach c:\3open\3mail\netmmind". Netmmind will be active at the
next boot, or activate it immediately by entering "net admin
\\<server name> /c detach c:\3open\3mail\netmind". (<server name> is
the name of the file server, such as SERVCSB.) Netmmind creates a
file NETMMIND.PID which gives its process id. If you need to stop
the mail minders, enter "net admin \\<server name> /c c:\os2\kill
<pid>", where <pid> is the process id and kill is a utility to stop
an OS/2 process.
5. NETMMIND takes command line parameters if you do not have a
standard 3+Open setup. The first is the path of the mail directories
(default C:\3OPEN\3MAIL\INBOX); the second is the path of the ini
file (default C:\3OPEN\3MAIL\NETMMIND.INI); and the third is the
delay between each user check in milliseconds (default 10000 = 10
seconds). The .PID file will also be created in the path specified
for the ini file.
6. If you want to use the DOS TSR version, create a sharename like
MMIND (mail minder) for the mail server inbox directory, typically
C:\3OPEN\3MAIL\INBOX. For DCPC, add set nettmind=L: \\<mail
server>\MMIND to one workstation's LOGON.BAT file and
P:\DOS\BOOT\NETFMIND to the same workstation's SETDOS.BAT file. (For
non-DCPC, you would perhaps add NET USE L: \\<mail server>\MMIND to
the profile and NETFMIND to the AUTOEXEC.BAT.) The user logging on
at that workstation must have read access rights to MMIND. NETFMIND
is a TSR that periodically checks the inboxes and sends out messages.
Currently it is written in assembler using the Tesseract TSR
library. You have to create an INI file, default NETFMIND.INI, to
link your 3+Open or Share user names with their mailbox numbers.
NETFMIND uses three optional command line parameters: The first is
the path of the mail directories (default L:\); the second is the
path of the ini file (default NETFMIND.INI); and the third is the
delay between each user check in ticks (default 1100 = 1 minute).
7. You can send messages directly with NETSEND. If you invoke
NETSEND without parameters, you will be prompted for the name and
message. Alternatively, you can supply them on the command line,
e.g., NETSEND usercsb "SERVCSB going down in 5 minutes" will send a
messsage to the USERCSB group. The message must be enclosed in
quotes if it contains spaces. NETSEND2.EXE is the OS/2 version.
You must always use command line parameters with NETSEND2--it does
not have a prompt mode. NETSEND2 will beep if something is wrong;
otherwise, NETSEND2 merely returns to the OS/2 prompt.
Please note that this message system uses the NetBIOS datagram
facility. Datagrams do NOT guarantee that the message was delivered,
although we have found them to be very reliable. Critical messages,
such as the server going down, should be sent serveral times, e.g.,
once a minute for five minutes.
8. On our servers, we store all of these message utilities in the
P:\DOS\NETWORK subdirectory. Some of the programs take command line
parameters. Most of the parameters are easy to understand. A number
parameter refers to the internal NetBIOS number. We summarize the
utilities below:
NETADDGR <name> Add name as a NetBIOS group name.
NETADDGR usercsb Adds usercsb as a NetBIOS group name.
NETADDNM <name> Add a NetBIOS name.
NETADDNM ytm Adds YTM.
NETADDUS Add username and home_server as NetBIOS names.
NETADDUS As above.
NETCLRNM Clears the NetBIOS name table except 2 and 3.
NETCLRNM As above.
NETDELNM <name> Delete a NetBIOS name.
NETDELNM ytm Deletes ytm.
NETDELUS Deletes username and home_server.
NETDELUS As above. NETCLRNM is more bullet-proof.
NETFMIND [path] [INI file] [ticks] DOS TSR mail minder.
NETFMIND Checks L: for mail messages using NETFMIND.INI.
NETLSTNM [name] List names [for remote name].
NETLSTNM Lists names for this computer.
NETLSTNM cytm List names for workstation CYTM.
NETMMIND [path] [INI file] [milliseconds] OS/2 mail minder.
NETMSG Receives messages (TSR).
NETMSG As above.
NETRCV [#] Receive messages (not-TSR) [for #].
NETRCV Receives messages for 4 (should be username.)
NETSEND [name] ["message"] Send a message to name.
NETSEND2 <name> <"message"> Send a message to name from OS/2 over
logical network "NET1"
NETSEND ytm "Help" Sends the message Help to ytm.
NETSEND Prompts for name and message.
NETSEND2 ytm "Help" Sends the message Help to ytm from OS/2.
NETSEND2 Beeps.
9. Existing names: As mentioned above, LANGROUP and the computer name
are already registered by 3+Open. However, 3+Open uses them for
something and the computer name has a session linked with the home
server. If you send messages to LANGROUP or a computer name, e.g.,
CTYM, only every other message gets through!
Group names: You can use two group names for sending messages. All
computers have LANGROUP registered, so you can send network-wide
problem messages to that name:
NETSEND LANGROUP "The network is dying!"
(You will have to send the message twice, as mentioned above.)
For DCPC, each workstation should have its current home server identified as
USERCSB, USERARB, etc. (We couldn't use SERVCSB, since that name is
already registered to the server.) So if only a server is going
down, send something like:
NETSEND USERCSB "SERVCSB is going down in 5 minutes!"
10. NETMSG is our receiving TSR. Currently it is about 5K, but
in the future we will reduce it to 2-3K. It takes two different
actions depending upon the length of the message: If the message is
a single character, it displays it in the upper right corner of
the screen. For example, sending an 'M' for mail messages will
display a flashing 'M' in the upper right corner. Longer messages are
displayed on the first screen line starting at the left. The maximum
message length is 80 characters, one screen line. Since NETMSG does
not erase to the end of the line, add a few blanks at the end of your
message so that, if multiple messages come through before the user
clears the screen, the last message does not overlap with earlier
ones.
Technical notes:
1. Source names. We use the extension .C for C sources, .H for C
header files, .ASM for assembler sources, and .INC for assembler
include files, which are usual defaults. In addition, we use the
following extensions for make files: .MSC for the Microsoft C, .BC
for Borland C, .TC for TurboC, and .TA for Turboassembler. For C
compilations, we use special include files for standardization within
our organization: LOCAL.H is a generic header file that also
includes PCKEYS.H for PC keyboard codes (not used by this
application) and ENVIRON.H, which has specific versions for Microsoft
C (ENVIRON.MSC) and Borland or TurboC (ENVIRON.BC). Rename the one
appropriate for your compiler to ENVIRON.H. We also have a limited
version of OS2.H with OS2 defines specific to this application.
2. Library dependencies. The DOS non-TSR programs, like NETADDNM
and NETLSTNM, can be compiled with the compiler libraries alone. All
DOS TSRs, both C and assembler sources, use the TesSeRact libraries
distributed by Innovative Data Concepts, (800) 926-4551. Since
TesSeRact is a commercial product, we do NOT distribute their
libraries and hence you can NOT recompile and link our sources
without obtaining a license from them. TesSeRact is inexpensive
(e.g., about $50) and reliable, so don't hesitate to acquire it. The
OS/2 programs require both the Microsoft Lan Manager Toolkit for the
NetBIOS interface and and an OS/2 development kit for some OS/2
calls--sorry, we can't distribute these commercial products either.
3. Make files. Examine the make files for recompilation
information. The .MSC files for Microsoft C are written for MAKE
(not NMAKE) and the .BC and .TC files are written for Borland's MAKE.
We use Microsoft C version 6.0 for most of the .MSC DOS and OS/2
makes, with an installation defaulting to OS/2 protected mode. The
.MSC make files reflect this installation--e.g., the make files
override the default libraries to link to the real mode libraries for
DOS makes. You may have to change the make files if your compiler
setup defaults to real mode.
4. Installation. Some of the header files must be moved to your
default include directory, and some paths in make files may have to
be changed. Examine the make files and modify them as appropriate to
match your environment.
5. References. We have found the following books to be useful
sources of information regarding NetBIOS:
3Com. NetBIOS Programmer's Reference. Santa Clara, CA: 3Com, 1987.
Barry Nance. Network Programming in C. Carmel, IN: Que Corporation,
1990.
W. David Schwaderer. Programmer's Guide to NetBIOS. Indianapolis,
IN: Howard W. Sams, 1988.
6. Future directions. This set of programs meets our immediate needs
for mail reminders. There are many obvious features for flexibility
that we would like to have, like configurable colors for the
messages, but that we have survived well without. We certainly would
love to see someone optimize the TSRs to be smaller. For Novell
fans, all of the DOS programs should be adaptable to IPX. However,
there is one less obvious enhancement that we feel would really add
flexibility: We wish we or somebody else had the time to customize
the sound generation. The distinctive sound currently generated by
NETMSG is produced by a TessBeep subroutine incorporated from the
TesSerAct TSR library. NETMSG uses the same sound for all messages.
Wouldn't it be preferable to have different sounds for mail messages
and for system problems? For print notifications? (Note that you
can send a message like P2 to display a flashing P on the first line
in the second to the last column.) In general, business programs on
PCs don't take full advantage of the primitive but useful sound
generating capabilities of the machine. Regardless, we would like to
see enhancements to NETMMIND and we will slowly produce some
ourselves. One of our motivating factors for distributing NETMMIND
in the public domain is the hope that others will enhance the system
and return the enhancements to us. If you make improvements, please
let us know!
For further information contact:
Thomas A. Marciniak, M.D.
National Cancer Institute
EPN 337
Bethesda, MD 20892
(301) 496-8516
ytm@nihccpc1.bitnet