brady@MGMT4.NCSL.NIST.GOV (Kevin Brady) (02/14/90)
I am involved in a project that will build a network management system using the encoder/decoder of ISODE. The use of the CMIP/CMIS protocol is required, using PEPY to create the structures and encode/decode routines. The problem: PEPY creates structures with pointers to other structures containing pointers and so on. We need to pass a "message" between processes composed of these struc- tures. To accomplish this over a socket leaves a "piece- meal" approach as the only alternative for a bcopy. This is totally unacceptable, does anyone know of a way to have PEPY generate "instances" rather than pointers?? Kevin Brady brady@osi.ncsl.nist.gov
brady@MGMT4.NCSL.NIST.GOV (Kevin Brady) (02/14/90)
> I am involved in a project that will build a network >management system using the encoder/decoder of ISODE. The >use of the CMIP/CMIS protocol is required, using PEPY to >create the structures and encode/decode routines. > The problem: PEPY creates structures with pointers to >other structures containing pointers and so on. We need to >pass a "message" between processes composed of these struc- >tures. To accomplish this over a socket leaves a "piece- >meal" approach as the only alternative for a bcopy. This is >totally unacceptable, does anyone know of a way to have PEPY >generate "instances" rather than pointers?? Let me try to be a little more specific: We will run the ASN.1 code for CMIP/CMIS thru PEPY to create the encoder/decoder code and data structures to be used. These data structures must then be filled in before handing them to the encoder/decoder for processing. The problem is that a "USER" process fills in these data structures and must pass this message to the process that contains the encoder/decoder (SMAE). The "passing" I am talking about is between two processes, not the encoded PDU that goes out on the network. Kevin Brady
david@ms.uky.edu (David Herron -- NonResident E-Mail Hack) (02/15/90)
Kevin, > The problem: PEPY creates structures with pointers to > other structures containing pointers and so on. We need to > pass a "message" between processes composed of these struc- > tures. To accomplish this over a socket leaves a "piece- > meal" approach as the only alternative for a bcopy. This is > totally unacceptable, does anyone know of a way to have PEPY > generate "instances" rather than pointers?? This sounds like a general purpose data structures problem. In fact, I once faced a similar problem long ago while writing a BASIC interpretor. Had a compiler in one process (This was PDP-11 days..) which was generating a data structure and the interpretor in another process. Problem was how to communicate that data structure since the pointers were only good for that address space. At the time I punted and turned the data structure into an ASCII file containing an intermediate language which looked a whole lot like FORTH. I also wrote a forth-ish interpretor for it. Now that I think about it again.. you can treat the packet of data you send across the socket as an "address space". That is, it's an array of bytes just like any other address space, just quite a bit smaller. You copy the PEPY structure & all the subsidiary structures into this array and while doing so translate the pointers into offsets within the array (or new addresses in a new virtual address space). You should also keep a translation table of other mappings already done in case you use the same pointer multiple times. When communicating it over the socket you'll need a header giving which data structure it is and how many bytes follow. On the receiving end you have another address-space translation. I'm afraid that this doesn't generalize well into a general purpose routine. But at least it's only two routines to write. (Yes! I know! two routines per data structure! And ISODE has a *LOT* of data structures!) -- <- David Herron; an MMDF guy <david@ms.uky.edu> <- ska: David le casse\*' {rutgers,uunet}!ukma!david, david@UKMA.BITNET <- Coming to a nameserver near you --SOON--: david@davids.mmdf.com <- (until then, david%davids.mmdf.com@rutgers.edu will work) -- <- David Herron; an MMDF guy <david@ms.uky.edu> <- ska: David le casse\*' {rutgers,uunet}!ukma!david, david@UKMA.BITNET <- Coming to a nameserver near you --SOON--: david@davids.mmdf.com <- (until then, david%davids.mmdf.com@rutgers.edu will work)
mrose@CHEETAH.NYSER.NET (Marshall Rose) (02/17/90)
At the risk of being simplistic: If the structs are generated by posy and you already have the pepy routines to in/out of ASN.1, why not just use the BER to pass the structures between processes. What a novel concept: use the same mechanisms for communications between open systems and *inside* open systems... /mtr
galvin@TIS.COM (James M Galvin) (02/21/90)
At the risk of being simplistic: If the structs are generated by posy and you already have the pepy routines to in/out of ASN.1, why not just use the BER to pass the structures between processes. What a novel concept: use the same mechanisms for communications between open systems and *inside* open systems... Does anyone have any experience doing this? In particular, what were the performance consequences of what you did? Jim