PxPlus User Forum

Twitter Twitter Twitter

Author Topic: TCP/IP address  (Read 550 times)

michaelgreer

  • Diamond Member
  • *****
  • Posts: 129
    • View Profile
TCP/IP address
« on: January 16, 2023, 05:06:04 PM »
Is there anything in the PxPlus environment that stores/returns the IP address of a telnet or raw tcp connection on a *nix box.  I can get the value from the telnet login but it is ugly.  Same thing with the mac address (parse arp -a).

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: TCP/IP address
« Reply #1 on: January 16, 2023, 05:16:14 PM »
For telnet we really only have a logical connection to the pseudo /dev device and as such the IP address is not known.
For a raw TCP server (i.e. OPEN(nn) "[TCP];port") once the user is connected you can get its IP address from KEY(nn)).

However it should be mentioned that the IP address you will see will vary based on your network setup.  For example if my home PC connects to a machine at our office the IP address returned will be the same for my PC or any PC in my home that connects will come from the same Internet address.  Same for VPN access or any number of other network steups.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com