How to get IPv4 Connection Status to JAVA (JT400)

2019-09-06 20:58发布

问题:

  • I want to know how to get IPv4 Connection Status to java application

                    Work with IPv4 Connection Status                        
                                                         System:   V172172  
Type options, press Enter.                                                     
3=Enable debug   4=End   5=Display details   6=Disable debug                 
8=Display jobs                                                               

Remote           Remote     Local                                         
Opt  Address          Port       Port       Idle Time  State                   
  *                *          ftp-con >  092:54:32  Listen                  
  *                *          ssh        092:25:07  Listen                  
  *                *          telnet     000:01:20  Listen                  
  *                *          smtp       092:25:36  Listen                  
  *                *          netbios >  092:25:36  Listen                  
  *                *          netbios >  000:00:01  *UDP                    
  *                *          netbios >  000:00:01  *UDP                    
  *                *          netbios >  092:25:32  Listen                  
  *                *          ldap       092:25:31  Listen                  
  *                *          427        000:00:09  *UDP                    
  *                *          427        000:00:01  *UDP                    
  *                *          cifs       092:25:32  Listen                  
                                                                    More... 
F3=Exit   F5=Refresh   F9=Command line   F11=Display byte counts   F12=Cancel  
F20=Work with IPv6 connections   F22=Display entire field   F24=More keys      

  • I want to know how to get All IP address (to jlistBox or jTable), display details of that every IP address (option 5) and display job detals of IP adress (option 8) to my Java Application

==========================================================================

回答1:

You will want to call the List Network Connections (QtocLstNetCnn) API. I expect you will want a server side program to interface the API for you, and then call that program using the ProgramCall class.

See How to get PSF Settings in an AS400 Server using Java