Discussion:
[omniORB] Extracting some information out of a *_ptr
Martin Trappel
2008-08-08 14:04:02 UTC
Permalink
Hi all.

I have a IDL where the initial call from a client hands a Client
Reference to the server:
interface Client {
// ...
};
interface Server {
void initial_connect(in client c);
};

It would now be very nice to extract some information out of the
Client_ptr at the server side for logging purposes.
As far as I could see there is no standard way of getting, e.g. the
clients IP-address/port/... (or other endpoint information) out of the
_ptr. Is there any way with omniORB?

thanks,
Martin
Michael
2008-08-08 14:10:53 UTC
Permalink
Hi Martin,

you might want to check the catior source code in the omniORB source
tree. It extracts a lot of information from an omniorb generated ior
(like you would get by calling orb->object_to_string)

cheers
michael
Post by Martin Trappel
Hi all.
I have a IDL where the initial call from a client hands a Client
interface Client {
// ...
};
interface Server {
void initial_connect(in client c);
};
It would now be very nice to extract some information out of the
Client_ptr at the server side for logging purposes.
As far as I could see there is no standard way of getting, e.g. the
clients IP-address/port/... (or other endpoint information) out of the
_ptr. Is there any way with omniORB?
thanks,
Martin
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Martin Trappel
2008-08-08 19:25:34 UTC
Permalink
Post by Michael
Post by Martin Trappel
...
It would now be very nice to extract some information out of the
Client_ptr at the server side for logging purposes.
...
Hi Martin,
you might want to check the catior source code in the omniORB source
tree. It extracts a lot of information from an omniorb generated ior
(like you would get by calling orb->object_to_string)
Thanks. I had looked at catior but completely forgot about
object_to_string ::)

Unfortunately, it appears that catior is published under the GPL (not
LGPL) so I fear wont be able to use the sources of catior ...


cheers,
Martin
Duncan Grisby
2008-08-08 19:01:51 UTC
Permalink
Post by Martin Trappel
Thanks. I had looked at catior but completely forgot about
object_to_string ::)
object_to_string won't do you any good. It just gives you a hex form of
the IOR. I suppose you could use that to run catior as an external
program, but that's a little silly.
Post by Martin Trappel
Unfortunately, it appears that catior is published under the GPL (not
LGPL) so I fear wont be able to use the sources of catior ...
If you look at catior, all it really does is call functions in the
omniORB library, which is LGPL. You can use catior as documentation to
help you write your own code that calls the same functions.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...