home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.isis
- Path: sparky!uunet!caen!batcomputer!cornell!ken
- From: ken@cs.cornell.edu (Ken Birman)
- Subject: Re: Sending a message to a single address
- Message-ID: <1992Dec15.180518.9418@cs.cornell.edu>
- Organization: Cornell Univ. CS Dept, Ithaca NY 14853
- References: <1992Dec15.154046.20778@comp.lancs.ac.uk>
- Date: Tue, 15 Dec 1992 18:05:18 GMT
- Lines: 55
-
- In article <1992Dec15.154046.20778@comp.lancs.ac.uk> jonathan@comp.lancs.ac.uk (Mr J J Trevor) writes:
- >Im using isis 2.2.7 and have the following problem:
- >Given the following groups...
- >G={a,b,c} Group G contains addresses a b and c
- >F={d}
- >
- >What is the most elegant way using ISIS to send a message from "d" in
- >group F to a specific member of G, given that "d" has the address of
- >this member? Also, this message must arrive at a specified entry point
- >(this is why bcast_l("l" is unsuitable) since in Isis v.2.1 this
- >delivered to entry point 0).
-
- Actually, you have this slightly wrong. First, the normal way would
- be just to do:
- bcast(his_addr, entry, ....)
- where his_entry is of type address*, for example:
- gv = pg_getview(pg_lookup("G"));
- bcast(&gv->gv_members[1], DOSOMETHING, ...);
- You can use bcast_l for this but you need to set the addr_entry
- values by hand:
- address list[2];
- list[0] = gv->gv_members[1];
- list[0].addr_entry = DOSOMETHING;
- list[1] = NULLADDRESS;
- bcast_l("l", list, ....);
-
- >
- >The only way I can easily see of doing this is to make "d" a client of
- >G, and create a subgroup of G containing the single members address that
- >"d" wants to send to. "d" then leaves G as a client and the newly
- >created subgroup (of one address) is then destroyed. This seems rather
- >heavyweight for a single cast.
-
- Well, that would work, and it might actually give good performance
- (subject to the comments about switching back and forth between groups
- discussed in a prior posting). But, you don't need to do anything so
- elaborate.
-
- >On a related note, is their a convienience function I have missed that
- >will copy an address? For example, I may want to record the result of
- >msg_getsender(msg_p) for much longer than the duration of the message or
- >function.
-
- You just need to allocate something of type address (as opposed to address*)
- and copy explicitly:
- address copy;
- copy = *msg_getsender(mp);
- ....
- Later, use © to refer to this copy of the address. Be careful to
- use storage that will be safe for as long as you might need a reference
- to the copy...
- --
- Kenneth P. Birman E-mail: ken@cs.cornell.edu
- 4105 Upson Hall, Dept. of Computer Science TEL: 607 255-9199 (office)
- Cornell University Ithaca, NY 14853 (USA) FAX: 607 255-4428
-