You might look at this API. I used to use it to log IP addresses of the workstations. It appears the system IP interface is in the returned info as well.
Retrieve Device Description (QDCRDEVD) API
pgm
dcl &rtninfo *char 2048
dcl &devd *char 10
dcl &err *char 16
rtvjoba job(&devd)
call qdcrdevd parm(&rtninfo +
x'00000800' +
'DEVD0600' +
&devd +
&err)
dmpclpgm
endpgm
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of gio.cot via MIDRANGE-L
Sent: Tuesday, August 29, 2023 4:15 AM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Subject: How to log the local IP used from the Clients to connect to IBM i
Hi all
In my Ibm i have two ip adress in the "IPv4 interface state management"
beyond the Ip 127.0.0.1
This is my situation
127.0.0.1 127.0.0.0 *LOOPBACK Active
192.168.0.120 192.168.0.0 ETHLINE06 Active
192.168.0.130 192.168.0.0 ETHLINE06 Active
In this moment there are some clients the use the ip adress 192.168.0.120
and other 192.168.0.130 and i would uniform all the clients to connect
using alny 192.168.0.120 ; now, as i'm not able to physically check all the
clients (Pc), which ip adress is stored in ACS/Client Access
configuration, i was asking me, if is there is a way to log/register when
the user logon to ibm i , the ip adress remote and local and the workstation
Id, so i can easily find the Clients that i have update, before disable
interface 192.168.0.130
In pratically, i would need to capture with a program this data that i see
in netstat option 5
TCP connection status display
System: MYIBM
Connection identification:
Remote hostname. . . . . . . . . . . . . . : SHIPPING BILLS.my >
Remote internet address. . . . . . . . . : 192.168.0.54
Remote port . . . . . . . . . . . . . . . : 61773
Local hostname. . . . . . . . . . . . . . : myibm.my.com
Local internet address. . . . . . . . . : 192.168.0.120
Local port. . . . . . . . . . . . . . . :telnet
Associated user profile. . . . . . . . . . : QTCP
Thanks in advance
Gio
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.