In my SHOWIP programs
http://home.columbus.rr.com/jbmmdietz/iseries.html

there is  IPCONNSTS which uses the APIs except for QtocRtvNetCnnDta.

you should be able to google that and find and example.

The source is included and maybe you could modify it to see the data you
want.
If you do and want to share that code I will include it.

         TCP/IP Connection Status for Address  192.168.x.xxx
F-5 to Refresh F-3/F-12 to exit
Loc Port  Rmt Port  Bytes In  Bytes Out  Conn State  Local Ip Address
    23     1397        4284      265067  Established  192.168.xxx.xxx
    23     1399         159         124  Established  192.168.xxx.xxx


This is my telnet session and its associated printer session .

_____________________________
Bryan Dietz
Aktion Associates

"i want an i"




midrange-l-bounces@xxxxxxxxxxxx wrote on 09/01/2006 12:16:30 PM:

-> This sound like it would do whay we wanted. In addition we are moving
-> from telnet to web apps and have been trying to figure out a way to
-> associate a web server logon with a local printer session and this might
-> work for that also. We continue to load Client Access and just run a
-> printer session and not display session. Users connect to the web site
-> and we use the IP address from the web session to find the printer
-> attached from the same IP address. Guess I need to look closer at the
-> APIs he referenced...
->
-> >>> ptykodi@xxxxxxxxx 9/1/2006 11:55 AM >>>
-> Dear Mike and Mark,
->
-> In the late 1990's, I participated in the IETF working
-> group that created the TN5250E specification. The
-> participation in the work group allowed me to
-> establish some contacts with developers at IBM who are
-> responsible for the Telnet server implementation in
-> i5/OS and OS/400, which I have maintained to this day.
->
->
-> I was wondering whether what you wanted to accomplish
-> was possible so I forwarded your e-mail to Paul Rieth
-> at IBM:
->
-> His suggestion on one way to accomplish the task is
-> outlined below in the section marked with the >
-> character.
->
-> HTH
->
-> Best Regards,
->
-> /Paul
->
-> > Sorry this response took so long, almost fell
-> through
-> > the cracks. I don't know about a single API, but I
-> > think I can do it in 2. Basically using the Netstat
-> > API's, you could list all connections associated
-> > with a particular IP address (QtocLstNetCnn API),
-> > then use the results of that to net out the
-> > associated jobs (QtocRtvNetCnnDta API). This second
-> > API returns way more information than you're
-> > interested in, and it will return associated telnet
-> > server jobs (qtvdevice and qtvtelnet if SSL,
-> > so your program would need to ignore those) as well
-> > as the interactive job. It would  take a little bit
-> > of programming, but definitely do-able. There could
-> > be easier ways as well, but this should work.
-> >
-> > I also looked at the Retrieve Device Description API
-> > which can return the IP address associated with a
-> > device, but the IP address is not a search key
-> > so there's no easy way to use it without
-> > iterating through every device on the system.
-> >
-> > By the way, the Telnet server does support an
-> > associated printer negotiation/parm (its in our
-> > latest RFC), not sure if that would help in this
-> > case as that would cause all printed output to
-> > automatically (no wrksplf, chgsplfa operations)
-> > go to their bar code printer. Maybe you could
-> > manage it by creating the spool files held and
-> > only releasing what you want printed. Newer
-> > versions of PCOMM support it, but I don't think
-> > Client Access does yet.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.