home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / MAILMIND.ZOO / NETMMIND.DOC < prev    next >
Text File  |  1992-03-16  |  17KB  |  337 lines

  1.                              NETMMIND.DOC
  2.  
  3. NETMMIND is our system for providing mail reminders to 3+Mail users
  4. under 3+Open or Microsoft Lan Manager.  NETMMIND uses NetBIOS and
  5. hence works through any NetBIOS protocol such as NBP without needing
  6. to have an XNS stack loading at workstations.  NETMMIND consists of both
  7. software to run on the workstations and software to run on the
  8. server.
  9.  
  10. On the workstation, NETMSG.COM is a TSR replacement for NETPOPUP. 
  11. NETMSG receives NetBIOS messages and displays them on the first line
  12. of the screen.  Messages of less than 3 characters are displayed in
  13. the upper right corner, with the second character specifying the
  14. displacement from the right.  Longer messages are displayed on the
  15. left of the screen.  NETMSG.COM works with color adapters; 
  16. NETMSGBW.COM is the version for IBM monochrome adapters.  NETMSG
  17. works in conjunction with other utilities that add appropriate
  18. NetBIOS names to the workstation and send messages from DOS and OS/2. 
  19. These utilities are described briefly below.
  20.  
  21. On the server, NETMMIND.EXE is an OS/2 detached process that sends
  22. out the reminder messages.  NETMMIND.EXE reads NETMMIND.INI to link
  23. 3+Mail user subdirectories with NetBIOS names. (An older version,
  24. NETFMIND.COM, is a DOS TSR that can be run on a workstation to perform the
  25. same function as NETMMIND.EXE.)
  26.  
  27. We have been using NETMMIND for over a year now on two 3+Open
  28. networks, one with over 175 workstations, in the Division of Cancer
  29. Prevention and Control (DCPC) of the National Cancer Institute.  We
  30. have not experienced any problems nor have we found any conflicts
  31. between the TSRs and other programs.  We are quite confident that the
  32. programs work as described below.  The directions are oriented toward
  33. our needs in DCPC, but we have tried to generalize them wherever
  34. feasible.  Since our documentation is rather terse, we suggest
  35. familiarizing yourself with the programs by trying the following at a
  36. DOS workstation:
  37.  
  38. a.  NETLSTNM.  Executing this program should display a list of the
  39. NetBIOS names on the workstation.
  40.  
  41. b.  NETADDNM DUMMY.  NETADDNM should have added the name DUMMY to the
  42. workstation NetBIOS names (provided you don't already have DUMMY on
  43. your network!  If you do, select another name.)  Run NETLSTNM again to
  44. confirm this.
  45.  
  46. c.  NETMSG.  NETMSG installs the message receiving TSR for a color
  47. display.  Use your favorite memory mapping program, e.g., MEM for DOS
  48. 5.0, to confirm the installation of NETMSG.
  49.  
  50. d.  NETSEND DUMMY M.  "NETSEND" to "DUMMY" the message "M".  Your
  51. workstation should emit a distinctive sound and a flashing M should
  52. appear in the upper right corner of the display.  This is the message
  53. we normally use for mail reminders.
  54.  
  55. e.  NETSEND DUMMY "Test message".  Include the quotes around "Test
  56. message".  Your workstation should emit the same sound as with 4
  57. above, but this longer message should display on the first line
  58. starting at the left margin.  We use these longer messages for
  59. notifications about network problems.  You can also enter just
  60. NETSEND and be prompted for the user and message.  (If you're
  61. prompted for the message, you don't have to use quotes around
  62. messages of more than one word.)
  63.  
  64. f.  If you like what you've seen so far, try installing the mail
  65. minder system per the directions below!
  66.  
  67. Installation directions for NETMMIND:
  68.  
  69. 1.  At a workstation, use NETLSTNM.EXE to list the NetBIOS names. For
  70. 3+Open systems, two names are usually registered:  LANGROUP and the
  71. computer name.  These names are not useful for NETMMIND as explained
  72. later.  If another name is not available, use NETADDNM <name> to add
  73. the name to be used for mail reminders.  Hence you should include a
  74. line in AUTOEXEC.BAT like:
  75.  
  76. netaddnm MY_NAME
  77.  
  78. For DCPC, add NETADDUS.EXE ("net add user") to LOGON.BAT. NETADDUS does a
  79. number of things dependent upon an understanding of NetBIOS names.
  80. When a name is added to NetBIOS, NetBIOS assigns a number to the
  81. name.  3+Open already registers the names LANGROUP (2) and the
  82. computer name, e.g., CIII, (3).  NETADDUS deletes any NetBIOS numbers
  83. greater than 4 and then registers the environment variable username
  84. (initials) as 4 and the home_server (with the SERV replaced by USER,
  85. e.g., USERCSB) as 5.  If your network only has one server, you can
  86. modify NETADDUS to eliminate the server registration.  This will save
  87. some execution time.
  88.  
  89. 2.  Add the TSR NETMSG.COM to the autoexec sequence (or NETMSGBW.COM
  90. if the video adapter is an IBM monochrome card.)  NETMSG currently
  91. occupies about 5K and is written in assembler using the TesSeRact TSR
  92. library.  If anyone wants to optimize it in straight assembler, it
  93. would probably be reduced to about 2-3K.
  94.  
  95. For DCPC, since we use three files for this sequence (AUTOEXEC.BAT,
  96. LOGON.BAT, and SETDOS.BAT) we put NETMSG in SETDOS.BAT with the rest
  97. of our TSRs. 
  98.  
  99. 3.  Create a file NETMMIND.INI. This INI file must be similar in
  100. format to the MBXS mailbox file.  (Each user has a numbered directory
  101. in C:\3OPEN\3MAIL\INBOX.  3+Mail creates a text file
  102. C:\3OPEN\3MAIL\MBXS, mailboxes, listing the mailbox numbers and
  103. usernames.)  The first line will be ignored and subsequent lines have
  104. the directory numbers and user names as follows:
  105.  
  106. 004425070950
  107. 0 Admin:NCIDCPC1:NIH
  108. 1 JD:John Doe -- everything after the ':' is ignored
  109.  
  110. A leading ';' indicates a remark.  Use only one blank between the
  111. mail box number and the user name.  The domain and organization are not
  112. needed.  The name must be a NetBIOS name.  If that is different
  113. than the 3+Mail name (as it is in DCPC), the MBXS file can not be used--
  114. you must make a similar file with the NetBIOS names.
  115.  
  116. 4.  If you have a standard 3+Open server setup, copy the files
  117. NETMMIND.INI and NETMMIND.EXE to the mail servers C:\3OPEN\3MAIL
  118. directory.  Add this line to the servers 3STARTUP.CMD file: 
  119. "detach c:\3open\3mail\netmmind".  Netmmind will be active at the
  120. next boot, or activate it immediately by entering "net admin
  121. \\<server name> /c detach c:\3open\3mail\netmind". (<server name> is
  122. the name of the file server, such as SERVCSB.)  Netmmind creates a
  123. file NETMMIND.PID which gives its process id.  If you need to stop
  124. the mail minders, enter "net admin \\<server name> /c c:\os2\kill
  125. <pid>", where <pid> is the process id and kill is a utility to stop
  126. an OS/2 process.
  127.  
  128. 5. NETMMIND takes command line parameters if you do not have a
  129. standard 3+Open setup. The first is the path of the mail directories
  130. (default C:\3OPEN\3MAIL\INBOX);  the second is the path of the ini
  131. file (default C:\3OPEN\3MAIL\NETMMIND.INI);  and the third is the
  132. delay between each user check in milliseconds (default 10000 = 10
  133. seconds).  The .PID file will also be created in the path specified
  134. for the ini file.
  135.  
  136. 6. If you want to use the DOS TSR version, create a sharename like
  137. MMIND (mail minder) for the mail server inbox directory, typically
  138. C:\3OPEN\3MAIL\INBOX.  For DCPC, add set nettmind=L: \\<mail
  139. server>\MMIND to one workstation's LOGON.BAT file and
  140. P:\DOS\BOOT\NETFMIND to the same workstation's SETDOS.BAT file.  (For
  141. non-DCPC, you would perhaps add NET USE L: \\<mail server>\MMIND to
  142. the profile and NETFMIND to the AUTOEXEC.BAT.)  The user logging on
  143. at that workstation must have read access rights to MMIND.  NETFMIND
  144. is a TSR that periodically checks the inboxes and sends out messages.
  145. Currently it is written in assembler using the Tesseract TSR
  146. library.  You have to create an INI file, default NETFMIND.INI, to
  147. link your 3+Open or Share user names with their mailbox numbers. 
  148. NETFMIND uses three optional command line parameters: The first is
  149. the path of the mail directories (default L:\);  the second is the
  150. path of the ini file (default NETFMIND.INI);  and the third is the
  151. delay between each user check in ticks (default 1100 = 1 minute). 
  152.  
  153. 7.  You can send messages directly with NETSEND.  If you invoke
  154. NETSEND without parameters, you will be prompted for the name and
  155. message.  Alternatively, you can supply them on the command line,
  156. e.g., NETSEND usercsb "SERVCSB going down in 5 minutes" will send a
  157. messsage to the USERCSB group.  The message must be enclosed in
  158. quotes if it contains spaces.  NETSEND2.EXE is the OS/2 version. 
  159. You must always use command line parameters with NETSEND2--it does
  160. not have a prompt mode.  NETSEND2 will beep if something is wrong; 
  161. otherwise, NETSEND2 merely returns to the OS/2 prompt.
  162.  
  163. Please note that this message system uses the NetBIOS datagram
  164. facility.  Datagrams do NOT guarantee that the message was delivered,
  165. although we have found them to be very reliable.  Critical messages,
  166. such as the server going down, should be sent serveral times, e.g.,
  167. once a minute for five minutes.
  168.  
  169. 8.  On our servers, we store all of these message utilities in the
  170. P:\DOS\NETWORK subdirectory. Some of the programs take command line
  171. parameters.  Most of the parameters are easy to understand.  A number
  172. parameter refers to the internal NetBIOS number.  We summarize the
  173. utilities below:
  174.  
  175. NETADDGR <name>  Add name as a NetBIOS group name.
  176. NETADDGR usercsb Adds usercsb as a NetBIOS group name.
  177.  
  178. NETADDNM <name>  Add a NetBIOS name.
  179. NETADDNM ytm     Adds YTM.
  180.  
  181. NETADDUS         Add username and home_server as NetBIOS names.
  182. NETADDUS         As above.
  183.  
  184. NETCLRNM         Clears the NetBIOS name table except 2 and 3.
  185. NETCLRNM         As above.
  186.  
  187. NETDELNM <name>  Delete a NetBIOS name.
  188. NETDELNM ytm     Deletes ytm.
  189.  
  190. NETDELUS         Deletes username and home_server.
  191. NETDELUS         As above.  NETCLRNM is more bullet-proof.
  192.  
  193. NETFMIND [path] [INI file] [ticks]  DOS TSR mail minder.
  194. NETFMIND         Checks L: for mail messages using NETFMIND.INI.
  195.  
  196. NETLSTNM [name]  List names [for remote name].
  197. NETLSTNM         Lists names for this computer.
  198. NETLSTNM cytm    List names for workstation CYTM.
  199.  
  200. NETMMIND [path] [INI file] [milliseconds]  OS/2 mail minder.
  201.  
  202. NETMSG           Receives messages (TSR).
  203. NETMSG           As above.
  204.  
  205. NETRCV [#]       Receive messages (not-TSR) [for #].
  206. NETRCV           Receives messages for 4 (should be username.)
  207.   
  208. NETSEND [name] ["message"]  Send a message to name.
  209. NETSEND2 <name> <"message"> Send a message to name from OS/2 over
  210.                             logical network "NET1"
  211. NETSEND ytm "Help"          Sends the message Help to ytm.
  212. NETSEND                     Prompts for name and message.
  213. NETSEND2 ytm "Help"         Sends the message Help to ytm from OS/2.
  214. NETSEND2                    Beeps.
  215.  
  216. 9.  Existing names:  As mentioned above, LANGROUP and the computer name
  217. are already registered by 3+Open.  However, 3+Open uses them for
  218. something and the computer name has a session linked with the home
  219. server.  If you send messages to LANGROUP or a computer name, e.g.,
  220. CTYM, only every other message gets through!
  221.  
  222. Group names:  You can use two group names for sending messages.  All
  223. computers have LANGROUP registered, so you can send network-wide
  224. problem messages to that name:
  225.  
  226. NETSEND LANGROUP "The network is dying!"
  227.  
  228. (You will have to send the message twice, as mentioned above.)
  229.  
  230. For DCPC, each workstation should have its current home server identified as
  231. USERCSB, USERARB, etc.  (We couldn't use SERVCSB, since that name is
  232. already registered to the server.)  So if only a server is going
  233. down, send something like:
  234.  
  235. NETSEND USERCSB "SERVCSB is going down in 5 minutes!"
  236.  
  237. 10.  NETMSG is our receiving TSR.  Currently it is about 5K, but
  238. in the future we will reduce it to 2-3K.  It takes two different
  239. actions depending upon the length of the message:  If the message is
  240. a single character, it displays it in the upper right corner of
  241. the screen.  For example, sending an 'M' for mail messages will
  242. display a flashing 'M' in the upper right corner.  Longer messages are
  243. displayed on the first screen line starting at the left.  The maximum
  244. message length is 80 characters, one screen line.  Since NETMSG does
  245. not erase to the end of the line, add a few blanks at the end of your
  246. message so that, if multiple messages come through before the user
  247. clears the screen, the last message does not overlap with earlier
  248. ones.
  249.  
  250.  
  251. Technical notes:
  252.  
  253. 1.  Source names.  We use the extension .C for C sources, .H for C
  254. header files, .ASM for assembler sources, and .INC for assembler
  255. include files, which are usual defaults.  In addition, we use the
  256. following extensions for make files:  .MSC for the Microsoft C, .BC
  257. for Borland C, .TC for TurboC, and .TA for Turboassembler.  For C
  258. compilations, we use special include files for standardization within
  259. our organization:  LOCAL.H is a generic header file that also
  260. includes PCKEYS.H for PC keyboard codes (not used by this
  261. application) and ENVIRON.H, which has specific versions for Microsoft
  262. C (ENVIRON.MSC) and Borland or TurboC (ENVIRON.BC).  Rename the one
  263. appropriate for your compiler to ENVIRON.H.  We also have a limited
  264. version of OS2.H with OS2 defines specific to this application.
  265.  
  266. 2.  Library dependencies.  The DOS non-TSR programs, like NETADDNM
  267. and NETLSTNM, can be compiled with the compiler libraries alone.  All
  268. DOS TSRs, both C and assembler sources, use the TesSeRact libraries
  269. distributed by Innovative Data Concepts, (800) 926-4551.  Since
  270. TesSeRact is a commercial product, we do NOT distribute their
  271. libraries and hence you can NOT recompile and link our sources
  272. without obtaining a license from them.  TesSeRact is inexpensive
  273. (e.g., about $50) and reliable, so don't hesitate to acquire it.  The
  274. OS/2 programs require both the Microsoft Lan Manager Toolkit for the
  275. NetBIOS interface and and an OS/2 development kit for some OS/2
  276. calls--sorry, we can't distribute these commercial products either.
  277.  
  278. 3.  Make files.  Examine the make files for recompilation
  279. information.  The .MSC files for Microsoft C are written for MAKE
  280. (not NMAKE) and the .BC and .TC files are written for Borland's MAKE.
  281. We use Microsoft C version 6.0 for most of the .MSC DOS and OS/2
  282. makes, with an installation defaulting to OS/2 protected mode.  The
  283. .MSC make files reflect this installation--e.g., the make files
  284. override the default libraries to link to the real mode libraries for
  285. DOS makes.  You may have to change the make files if your compiler
  286. setup defaults to real mode.
  287.  
  288. 4.  Installation.  Some of the header files must be moved to your
  289. default include directory, and some paths in make files may have to
  290. be changed.  Examine the make files and modify them as appropriate to
  291. match your environment.
  292.  
  293. 5.  References.  We have found the following books to be useful
  294. sources of information regarding NetBIOS:
  295.  
  296. 3Com.  NetBIOS Programmer's Reference.  Santa Clara, CA: 3Com, 1987.
  297.  
  298. Barry Nance.  Network Programming in C.  Carmel, IN: Que Corporation,
  299. 1990.
  300.  
  301. W. David Schwaderer.  Programmer's Guide to NetBIOS.  Indianapolis,
  302. IN:  Howard W. Sams, 1988.
  303.  
  304. 6.  Future directions.  This set of programs meets our immediate needs
  305. for mail reminders.  There are many obvious features for flexibility
  306. that we would like to have, like configurable colors for the
  307. messages, but that we have survived well without.  We certainly would
  308. love to see someone optimize the TSRs to be smaller.  For Novell
  309. fans, all of the DOS programs should be adaptable to IPX.  However,
  310. there is one less obvious enhancement that we feel would really add
  311. flexibility:  We wish we or somebody else had the time to customize
  312. the sound generation.  The distinctive sound currently generated by
  313. NETMSG is produced by a TessBeep subroutine incorporated from the
  314. TesSerAct TSR library.  NETMSG uses the same sound for all messages. 
  315. Wouldn't it be preferable to have different sounds for mail messages
  316. and for system problems?  For print notifications?  (Note that you
  317. can send a message like P2 to display a flashing P on the first line
  318. in the second to the last column.)  In general, business programs on
  319. PCs don't take full advantage of the primitive but useful sound
  320. generating capabilities of the machine.  Regardless, we would like to
  321. see enhancements to NETMMIND and we will slowly produce some
  322. ourselves.  One of our motivating factors for distributing NETMMIND
  323. in the public domain is the hope that others will enhance the system
  324. and return the enhancements to us.  If you make improvements, please
  325. let us know!
  326.  
  327.  
  328. For further information contact:
  329.  
  330.         Thomas A. Marciniak, M.D.
  331.         National Cancer Institute
  332.         EPN 337
  333.         Bethesda, MD  20892
  334.         (301) 496-8516
  335.         ytm@nihccpc1.bitnet
  336.  
  337.