home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / MSDOS / WATTCP / MCAST.ZIP / MCAST.TXT < prev   
Encoding:
Text File  |  1993-11-10  |  7.0 KB  |  185 lines

  1.     Multicast extensions for the WATTCP TCP/IP libraries
  2.         ----------------------------------------------------
  3.  
  4. Introduction
  5. ------------
  6.     IP Multicasting is a mechanism to send and receive data from
  7. a group of hosts rather than via the more traditional one on one
  8. interaction. This technology is being heavily used for experimentation
  9. into Audio/Video Conferencing over IP, but has the potential to be
  10. used in a much more far-reaching manner. In fact, one school of
  11. thought says that multicasting (1->n) is the general case, and that
  12. unicasts (1->1) are simply a special case.
  13.  
  14.     This package contains the pieces necessary to extend the
  15. WATTCP libraries to support IP multicasting as defined by RFC-1112[1]
  16. (Deering). Three new user-level routines have been created to achieve
  17. this goal. The routines join_mcast_group and leave_mcast_group allow a
  18. process to join and leave a specified multicast group, and udp_SetTTL
  19. allows the outgoing ttl on udp packets to be set. Additionally, there
  20. are two trivial example/test programs. Lister is a simple program that
  21. watches a specified address/port pair and decodes vat[2] style control
  22. packets, thus producing a continuous listing of the IDs of the
  23. participants. Blather is the flip side of lister. It produces a vat
  24. style control packet and sends it to the specified address and port,
  25. thus adding a new participant to your vat display.
  26.  
  27.  
  28. Installation
  29. ------------
  30.  
  31.     The installation of this package consists of three basic
  32. steps. The package must first be unzipped, the source files then need
  33. to be patched, and finally everything needs to be rebuilt.
  34.     Before you begin, you will need to have the WATTCP source
  35. distribution installed, built, and working. WATTCP is available
  36. from ftp-ns.rutgers.edu in /pub/msdos/wattcp. The September 30, 1993
  37. distribution was used as a basis for these extensions. Additionally, a
  38. connection to the MBone[3], the Internet Multicast Backbone, is a
  39. great advantage and the default operation of the example programs
  40. assumes that it is present.
  41.     
  42. 1. In the same directory that you unzipped the WATTCP distribution,
  43.    unzip the mcast.zip file using version 2.04c or greater of
  44.    pkunzip. Make sure that the "-d" flag is specified so
  45.    that the files end up in the proper subdirectories rather than all
  46.    being dumped at the top level. This will create the following files:
  47.  
  48.     mcast.txt    This file
  49.     mcast.dif    The patch file
  50.     apps\lister.c    The receive example
  51.     apps\blather.c    The send example
  52.     src\pcigmp.c    code to support IGMP
  53.     src\ipmulti.c    generic additional multicast source
  54.  
  55. 2. You now need to patch the source files to add the extensions. To do
  56.    this, you will need the "patch" program by Larry Wall. It can be found
  57.    on wuarchive.wustl.edu in /mirrors/msdos/filutl as patch12.zip. Now,
  58.    again in that same top level directory, type "patch -p0 < mcast.dif".
  59.    There should be lots of "Hunk Succeeded" messages, and all your code 
  60.    will be patched.
  61.  
  62.  
  63.  
  64. 3. The final step is to rebuild the entire set of libraries and example
  65.    applications. Begin by removing all of the .obj and .exe files in src,
  66.    apps, and elib plus all of the libraries in lib (effectively doing a 
  67.    "make clean"). Then just do a make in the top level directory and
  68.    everything will rebuild.
  69.  
  70. Use
  71. ___
  72.     Network programming for multicasting isn't very different from
  73. the network programming that you're already used to. The two basic
  74. differences are that you need to join and leave a multicast group and
  75. that you need to specify the outgoing ttl on most multicast packets.
  76.     To join a group you simply need to use the "join_mcast_group"
  77. call after you've done the udp_open. This registers the use of the
  78. group with the low level routines that need to interact with the
  79. multicast router to keep the packets flowing. After you're done,
  80. you'll then need to leave the multicast group immediately prior to
  81. issuing the close call by using the "leave_mcast_group" routine.
  82.     The default ttl whenever you open a udp connection with a
  83. multicast address is set to 1. That way, your multicasts won't leave
  84. your local net. To expand the scope, you'll need to up the ttl by
  85. using the "udp_SetTTL" call. This call should be used after the udp_connect
  86. is done, but before anything is sent, and is persistent for the life of
  87. the connection.
  88.     Beyond those two points, most things are straightforward. You
  89. do a udp_open, a join_mcast_group, set the ttl, read and write a few
  90. things, leave_mcast_group, and close. That's all there is to it. The
  91. only other thing you need to remember is to define MULTICAST whenever
  92. you use this code so that you get all of the multicasting prototypes
  93. from the tcp.h header file.
  94.  
  95.  
  96.  
  97. Reference
  98. ---------
  99.  
  100. join_mcast_group - joins a multicast group
  101.  
  102.     int join_mcast_group( longword ina )
  103.  
  104.     Where:
  105.         ina    IP address of the group to be joined
  106.  
  107.     Behavior:
  108.         join_mcast_group registers the use of the multicast
  109.         address with the internals of the tcp stack that 
  110.         deal with responding to IGMP queries from the 
  111.         multicast router.    
  112.  
  113.     Returns:
  114.         1    if the group was joined successfully
  115.         0    if attempt failed
  116.  
  117.  
  118. leave_mcast_group - leaves a multicast group
  119.  
  120.     int leave_mcast_group( longword ina )
  121.  
  122.     Where:
  123.         ina    IP address of the group to be joined
  124.  
  125.     Behavior:
  126.         leave_mcast_group deregisters the use of a 
  127.         particular multicast address so that no
  128.         IGMP Reports will be sent for that address.
  129.  
  130.     Returns:
  131.         1    if the group was left successfully
  132.         0    if attempt failed
  133.  
  134. udp_SetTTL -  Set the TTL on an outgoing UDP datagram.
  135.  
  136.     int udp_SetTTL(udp_Socket *s, byte ttl)
  137.  
  138.     Where:
  139.          s    the socket of the UDP connection (?!?) in question
  140.         ttl    the desired ttl for the outgoing datagrams
  141.  
  142.     Behavior:
  143.         udp_SetTTL allows the ttl for a particular UDP connection
  144.         to be changed from the default value of 1. As the ttl is 
  145.         increased, the scope of the packets will expand until it 
  146.         reaches worldwide scope at around 192.
  147.  
  148.     Returns:
  149.         1    always (there is no error return)
  150.  
  151.  
  152.  
  153.  
  154. Notes
  155. -----
  156.  
  157. [1] RFC-1112, "Host Extensions for IP Multicasting", is a description
  158.     and specification of IP Multicasting by Steve Deering 
  159.     (deering@parc.xerox.com) of Xerox PARC. It is available via 
  160.     anonymous FTP on ds.internic.net in the /rfc directory as 
  161.     "rfc1112.txt".
  162.  
  163. [2] vat, the Visual Audio Tool, is an audioconferencing application
  164.     for the X-Windowing system written by Van Jacobson (van@ee.lbl.gov)
  165.     of Lawrence Berkeley Labs. It is the de-facto standard for audio on 
  166.     the MBone, and can be found via anonymous FTP on ftp.ee.lbl.gov.
  167.  
  168. [3] The MBone or the Internet Multicast Backbone is an outgrowth of the
  169.     first two IETF "audiocasts". It is a virtual network, layered upon
  170.     parts of the physical Internet to facilitate worldwide routing of
  171.     IP multicasts. More information about the MBone can be found in the
  172.     Frequently Asked Questions document available on venera.isi.edu in 
  173.     /mbone as "faq.txt".
  174.  
  175.  
  176.  
  177. Author
  178. ------
  179.  
  180.     Jim Martin
  181.     Rutgers University
  182.     jim@noc.rutgers.edu
  183.     11/10/93
  184.  
  185.