• Subject: Re: TCP/IP sockets - Getservbyname
  • From: leif@xxxxxxx
  • Date: Thu, 22 Jul 1999 19:17:13 -0500

all the values beginning with F0ABF1E1 are pointers.

----- Original Message -----
From: Chris Bipes <ChrisB@cross-check.com>
To: 'RPG400 Help (E-mail)' <RPG400-L@midrange.com>; 'Midrange Mailing List'
(E-mail) <MIDRANGE-L@midrange.com>
Sent: Thursday, July 22, 1999 5:59 PM
Subject: TCP/IP sockets - Getservbyname


I am trying to add the ability to look up a service name using the
Getservbyname function provided in TCO/IP Sockets.  I am using RPGLE under
V3R7.  I suppose I could just open the file qusrsys/qatocls1 and chain to
receive but that would be cheating.... Has any one else attempted this feat?

Here is what I have achieved so far:

1. The function is working and returning the pointer.  The file is pointing
to the correct record, (wrkjob open files rrn while in debug).

2. I have defined the structure to be a 200 character field based on the
returned pointer.  The field though seem to have garbage in it.  See
following:

 00000     80000000 00000000 F0ABF1E1 1900E600   - .......01..W.
 00010     80000000 00000000 F0ABF1E1 1900E650   - .......01..W&
 00020     0000A41C 00000000 00000000 00000000   - ..u.............
 00030     80000000 00000000 F0ABF1E1 1900E621   - .......01..W.
 00040     96856081 A4A38800 40404040 40404040   - oe-auth.
 00050     40404040 40404040 40404040 40404040   -
 00060     00A38397 00404040 40404040 40404040   - .TCP.
 00070     40404040 40404040 40404040 40404040   -
 00080     40000000 00000000 00000000 00000000   -  ...............
 00090     80000000 00000000 F0ABF1E1 1900E6A0   - .......01..W
 000A0     80000000 00000000 F0ABF1E1 1900E6C1   - .......01..WA
 000B0     80000000 00000000 F0ABF1E1 1900E6E2   - .......01..WS
 000C0     00000000 00000000 00000000 00000000   - ................

The service name is "oe-auth" and protocol = "tcp".  I have highlight them.
The port number = 42012 or A41C which I also highlighted.  There are several
aliases that do not show up in the 200 byte string but are further down the
line.  Now for the question, is this function returning pointers or the
values?  It looks like F0ABF1E11900E600 might be a pointer to the data.
The pointer returned is SPP:F0ABF1E11900E5C0

Can one of you "C" programmers tell this RPGer what I am getting?  How to
use this function?
What I am doing wrong?

Thanks in advance,


Christopher K. Bipes mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc. http://www.cross-check.com
6119 State Farm Drive Phone: 707 586-0551 x 1102
Rohnert Park  CA  94928 Fax: 707 586-1884
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].