× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Shouldn't IPAddr be 878 892 rather than 877 891?  I suspect you may have an
unintended leading byte from the network protocol address.




                                                                                
                                                     
                      "McBride, Lane                                            
                                                     
                      (Artco)"                  To:       "'RPG programming on 
the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>         
                      <lmcbride@xxxxxxxx        cc:                             
                                                     
                      ate.com>                  Subject:  RE: How retrieve 
remote IP address                                         
                      Sent by:                                                  
                                                     
                      rpg400-l-bounces@x                                        
                                                     
                      idrange.com                                               
                                                     
                                                                                
                                                     
                                                                                
                                                     
                      05/05/2003 08:03                                          
                                                     
                      AM                                                        
                                                     
                      Please respond to                                         
                                                     
                      RPG programming on                                        
                                                     
                      the AS400 /                                               
                                                     
                      iSeries                                                   
                                                     
                                                                                
                                                     
                                                                                
                                                     




This is how I get the IP of the current session.  You could change the
subprocedure to receive a workstation rather than pull the current one from
the program status data structure:

     D                SDS
     D  gWorkStation         244    253A
     D  gUserID              254    263A

     P getCurrentIP    B                   Export
       //------------------------------------------------------------------
       //   <getCurrentIP> Get current session IP address
       //
       //   @Usage: IPAddr 15A = getCurrentIP()
       //------------------------------------------------------------------
     D getCurrentIP    Pi            15A

       // Stand Alones
     D Error           S            256A

       // Data Structures
     D DevicDescr      DS          1024
     D  IPAddr               877    891A

       // API Prototypes
     D getDeviceDesc   PR                  ExtPgm('QDCRDEVD')
     D  Reciever                   1024A
     D  RecvLen                       5I 0 Const
     D  FormatName                    8A   Const
     D  DeviceName                   10A   Const
     D  Error                       256A

      /Free
       getDeviceDesc(DevicDescr : 1024 : 'DEVD0600' : gWorkStation :
Error);
       Return IPAddr;
      /End-Free

     P getCurrentIP   E

-----Original Message-----
From: vinciamo@xxxxxx [mailto:vinciamo@xxxxxx]
Sent: Monday, May 05, 2003 5:33 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: How retrieve remote IP address

Is there an api for retrieving remote ip address of a session connected
by Client Access Express(telnet)??

Thanks in advance!

Vincenzo Amoruso
System Project s.r.l.
Andria(BA) - Italy



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.