Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* DCE: Obtaining IP address
@ 1994-09-08 15:31 Steve Melchert
  1994-09-08 17:54 ` Jon Mauney
  1994-09-08 20:24 ` Jim Wade
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Melchert @ 1994-09-08 15:31 UTC (permalink / raw)


I would like to capture the IP address of a calling client from the 
server layer.  I want this information so that I can store certain
information related to specific IP's.  Is it part of the context
handle?  Can it be captured?

I have been told that there is no API to directly obtain this data.
Does anyone have any idea how to capture the IP address from the server?
Would like to avoid a lot of messy code if possible, as my product is
to be cross-platform portable.

Thanks for any input you can provide.

Stephen Melchert


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DCE: Obtaining IP address
  1994-09-08 15:31 DCE: Obtaining IP address Steve Melchert
@ 1994-09-08 17:54 ` Jon Mauney
  1994-09-08 20:24 ` Jim Wade
  1 sibling, 0 replies; 3+ messages in thread
From: Jon Mauney @ 1994-09-08 17:54 UTC (permalink / raw)


smelch01@cps.plnin.gmeds.com (Steve Melchert) writes:

>I would like to capture the IP address of a calling client from the 
>server layer.  I want this information so that I can store certain
>information related to specific IP's.  Is it part of the context
>handle?  Can it be captured?

>I have been told that there is no API to directly obtain this data.
>Does anyone have any idea how to capture the IP address from the server?
>Would like to avoid a lot of messy code if possible, as my product is
>to be cross-platform portable.

The Client's address is part of the binding handle delivered to
the server (assuming an explicit handle is delivered to the server).
This handle can be converted to a string binding using
  rpc_binding_to_string_binding
and the string binding deconstructed using
  rpc_string_binding_parse
Notice, though, that in the general case this is not guaranteed to
be an IP address, since the transport may have been something other
than an IP protocol.  Portable code should take this into account.
-- 
Jon Mauney 			 	jon@mauney.com
Mauney Computer Consulting	 	(919) 828-8053
Raleigh NC
		"Have TGT, will travel."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DCE: Obtaining IP address
  1994-09-08 15:31 DCE: Obtaining IP address Steve Melchert
  1994-09-08 17:54 ` Jon Mauney
@ 1994-09-08 20:24 ` Jim Wade
  1 sibling, 0 replies; 3+ messages in thread
From: Jim Wade @ 1994-09-08 20:24 UTC (permalink / raw)


Steve Melchert (smelch01@cps.plnin.gmeds.com) wrote:
: I would like to capture the IP address of a calling client from the 
: server layer.  I want this information so that I can store certain
: information related to specific IP's.  Is it part of the context
: handle?  Can it be captured?

: I have been told that there is no API to directly obtain this data.
: Does anyone have any idea how to capture the IP address from the server?
: Would like to avoid a lot of messy code if possible, as my product is
: to be cross-platform portable.

: Thanks for any input you can provide.

: Stephen Melchert

Steve,

You can use a combination of rpc_binding_server_from_client and 
rpc_binding_to_string_binding to get the information according
to the documentation.  The rpc_binding_server_from_client call 
only provides a partially bound handle so you will not have
an endpoint for the client but you will have the IP address.

Hope this helps.

Jim
--
-------------------------------------------------------------------------------
| Jim Wade, DCE 1.0.3 Tech Lead      | Token-ring = jwade@rebel.austin.ibm.com|
| T/L 678-3723, Austin, TX           | VNET       = JWADE@AUSTIN              |
| 512-838-3723                       | Internet   = jwade@austin.ibm.com      |
-------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-09-08 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-09-08 15:31 DCE: Obtaining IP address Steve Melchert
1994-09-08 17:54 ` Jon Mauney
1994-09-08 20:24 ` Jim Wade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox