• Subject: TCP/IP sockets - Getservbyname
  • From: Chris Bipes <ChrisB@xxxxxxxxxxxxxxx>
  • Date: Thu, 22 Jul 1999 12:04:53 -0700

I am trying to add the ability to look up a service name using the
Getservbyname function.  I have defined the data structure servent with-in
my program but the pointer returned by the function is not to the data
structure I defined.  How do you retrieve the entries from the memory the
pointer is pointing to?  I would imagine that the s_name start at the
pointer and goes to the first null, followed by list of aliases, each null
terminated.  Then there should be the port number as a short integer and
that is what I am looking for.  I suppose I could just open the file
qusrsys/qatocls1 and chain to receive but that would be cheating....  I am
carious as to see if anyone else has successfully used this function.

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


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