Get Source System Ip address

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Get Source System Ip address

  • Creator
    Topic
  • #49771
    Keith McLeod
    Participant

    I am looking for a tcl way of getting the source systems ip address.  I hope someone has invented this wheel already. Short of using the multiserver configuration, I would like to get the source systems ip address. Not sure where to look for this information.  Would prefer not grepping from netstat bbut will accept any reliable method.  Anybody have any ideas on this….

Viewing 5 reply threads
  • Author
    Replies
    • #63519
      Rob Abbott
      Keymaster

      What’s wrong with using multiserver?  If you set “Maximum Clients” to 1 it will behave just like the legacy “single server” protocol and you’ll be able to pull the client’s IP from DRIVERCTL.

      Rob Abbott
      Cloverleaf Emeritus

    • #63520
      Keith McLeod
      Participant

      With new threads using multiserver would not be an issue. It is for gathering the information from existing threads.  I actually like that I can get that info from multiserver.  I am looking for a reliable way to extract that information until I can consider going forward with the use of mutliserver.  I am only guessing that there is a command out there or a variable location that could reliably pull this information.  Possibly something like fconfigure $sock -peername, but it requires the socket id which opens up a different issue, like how to get the socket id.

      If I have say a thread configured to listen on port 5090.  I am guesssing there is a socket id established. The question here would be how do I get the particualr socket id for thet port? and can I query it?

      Or does anyone have the easy way?  I’m open….

      This is to help me document existing servers….I appreciate any help I can get on this.. Thanks…

    • #63521
      Rob Abbott
      Keymaster

      The file handle to the socket belongs to the engine and is not exposed to Tcl.

      I think your only other option is to fool around with netstat.  Best of luck.

      Rob Abbott
      Cloverleaf Emeritus

    • #63522
      Jim Kosloskey
      Participant

      Keith,

      There is a client global available when the protocol is tcp/pdl. I am not sure if it is available with straight TCP/IP.

      Thanks,

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #63523
      Keith McLeod
      Participant

      Is the client global available with mlp_tcp.pdl? And where would I find this?  I don’t see it in [info global] list.

    • #63524
      Jim Kosloskey
      Participant

      Keith,

      When we did it it was with mlp pdl.

      If you are looking for the global in hcitcl you won’t find it because it gets set in the engine (I think pdl sets it but I could be wrong).

      Look for it in an IB Tps proc. (we acquired it in the start mode).

      We don’t use it because it really had no use for us once we located it.

      We did that work back on 3.5.5 and I have not tried it since upgrading to 5.x.

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 5 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10