× 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.


  • Subject: RE: TCP/IP sockets - Getservbyname
  • From: Tim McCarthy <TimM@xxxxxxxxxxxxxxxxxx>
  • Date: Fri, 23 Jul 1999 12:55:35 -0400

If you just want the service name, define the first subelement in your
structure as a pointer then define a long alpha field based on this
pointer. The contents of this alpha field will be the service name
terminated with a NULL. 

> -----Original Message-----
> From: leif@ibm.net [SMTP:leif@ibm.net]
> Sent: Thursday, July 22, 1999 5:17 PM
> To:   MIDRANGE-L@midrange.com
> Subject:      Re: TCP/IP sockets - Getservbyname
> 
> 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   - Ø.......0¿1÷..W.
>  00010     80000000 00000000 F0ABF1E1 1900E650   - Ø.......0¿1÷..W&
>  00020     0000A41C 00000000 00000000 00000000   - ..u.............
>  00030     80000000 00000000 F0ABF1E1 1900E621   - Ø.......0¿1÷..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   - Ø.......0¿1÷..Wµ
>  000A0     80000000 00000000 F0ABF1E1 1900E6C1   - Ø.......0¿1÷..WA
>  000B0     80000000 00000000 F0ABF1E1 1900E6E2   - Ø.......0¿1÷..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 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
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.