home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / isis / 336 < prev    next >
Encoding:
Text File  |  1992-12-15  |  2.6 KB  |  66 lines

  1. Newsgroups: comp.sys.isis
  2. Path: sparky!uunet!caen!batcomputer!cornell!ken
  3. From: ken@cs.cornell.edu (Ken Birman)
  4. Subject: Re: Sending a message to a single address
  5. Message-ID: <1992Dec15.180518.9418@cs.cornell.edu>
  6. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  7. References: <1992Dec15.154046.20778@comp.lancs.ac.uk>
  8. Date: Tue, 15 Dec 1992 18:05:18 GMT
  9. Lines: 55
  10.  
  11. In article <1992Dec15.154046.20778@comp.lancs.ac.uk> jonathan@comp.lancs.ac.uk (Mr J J Trevor) writes:
  12. >Im using isis 2.2.7 and have the following problem:
  13. >Given the following groups...
  14. >G={a,b,c}        Group G contains addresses a b and c
  15. >F={d}
  16. >
  17. >What is the most elegant way using ISIS to send a message from "d" in
  18. >group F to a specific member of G, given that "d" has the address of
  19. >this member? Also, this message must arrive at a specified entry point
  20. >(this is why bcast_l("l" is unsuitable) since in Isis v.2.1 this
  21. >delivered to entry point 0).
  22.  
  23. Actually, you have this slightly wrong.  First, the normal way would
  24. be just to do:
  25.     bcast(his_addr, entry, ....)
  26. where his_entry is of type address*, for example:
  27.     gv = pg_getview(pg_lookup("G"));
  28.     bcast(&gv->gv_members[1], DOSOMETHING, ...);
  29. You can use bcast_l for this but you need to set the addr_entry
  30. values by hand:
  31.     address list[2];
  32.     list[0] = gv->gv_members[1];
  33.     list[0].addr_entry = DOSOMETHING;
  34.     list[1] = NULLADDRESS;
  35.     bcast_l("l", list, ....);
  36.  
  37. >
  38. >The only way I can easily see of doing this is to make "d" a client of
  39. >G, and create a subgroup of G containing the single members address that
  40. >"d" wants to send to. "d" then leaves G as a client and the newly
  41. >created subgroup (of one address) is then destroyed. This seems rather
  42. >heavyweight for a single cast.
  43.  
  44. Well, that would work, and it might actually give good performance
  45. (subject to the comments about switching back and forth between groups
  46. discussed in a prior posting).  But, you don't need to do anything so
  47. elaborate.
  48.  
  49. >On a related note, is their a convienience function I have missed that
  50. >will copy an address? For example, I may want to record the result of
  51. >msg_getsender(msg_p) for much longer than the duration of the message or
  52. >function.
  53.  
  54. You just need to allocate something of type address (as opposed to address*)
  55. and copy explicitly:
  56.     address copy;
  57.     copy = *msg_getsender(mp);
  58.     ....
  59. Later, use © to refer to this copy of the address.  Be careful to
  60. use storage that will be safe for as long as you might need a reference
  61. to the copy...
  62. -- 
  63. Kenneth P. Birman                              E-mail:  ken@cs.cornell.edu
  64. 4105 Upson Hall, Dept. of Computer Science     TEL:     607 255-9199 (office)
  65. Cornell University Ithaca, NY 14853 (USA)      FAX:     607 255-4428
  66.