home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / programs / programming / aol / !JFShared / ISvcs / h / iservices
Encoding:
Text File  |  1997-05-31  |  2.1 KB  |  53 lines

  1. /*******************************************************************
  2.  File:     IServices.h
  3.  Purpose:  Internet services veneer
  4.  Author:   Justin Fletcher
  5.  Date:     02 Dec 1992
  6.  ******************************************************************/
  7.  
  8. #ifndef __ISERVICES_H
  9. #define __ISERVICES_H
  10. #define Internet_GetServiceByPort 0x46440
  11. #define Internet_GetServiceByName 0x46441
  12. #define Internet_DecodeError      0x46442
  13.  
  14. typedef struct servent {
  15.   char *servname;
  16.   char **aliases;
  17.   int  port;
  18.   char *protocol; /* tcp or udp usually */
  19. } servent;
  20.  
  21. /*********************************************** <c> Gerph *********
  22.  Function:     getservbyport
  23.  Description:  Reads the servent block for a service, given it's port
  24.                This block is not guarenteed to remain constant, so
  25.                copy it quickly.
  26.  Parameters:   port = port number
  27.                proto-> protocol name (tcp/udp), or 0 for default
  28.  Returns:      pointer to servent block, or 0 if not known
  29.  ******************************************************************/
  30. servent *getservbyport(int port,char *proto);
  31.  
  32. /*********************************************** <c> Gerph *********
  33.  Function:     getservbyname
  34.  Description:  Reads the servent block for a service, given it's name
  35.                This block is not guarenteed to remain constant, so
  36.                copy it quickly.
  37.  Parameters:   name-> name of the service (textual, or numeric)
  38.                proto-> protocol name (tcp/udp), or 0 for default
  39.  Returns:      pointer to servent block, or 0 if not known
  40.  ******************************************************************/
  41. servent *getservbyname(char *name,char *proto);
  42.  
  43. /*********************************************** <c> Gerph *********
  44.  Function:     decodeerror
  45.  Description:  Returns the textual version of the errno variable
  46.                This should not be modified.
  47.  Parameters:   errno = errno value
  48.  Returns:      pointer to the textual version of the error, or 0
  49.                if not known
  50.  ******************************************************************/
  51.    char *decodeerror(int errno);
  52. #endif
  53.