*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> getsvc (3)              



NAME    [Toc]    [Back]

       getsvc - Get a pointer to the svcinfo structure.

SYNOPSIS    [Toc]    [Back]

       #include <sys/svcinfo.h>

       struct svcinfo *getsvc(
               void );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc.so, libc.a)

DESCRIPTION    [Toc]    [Back]

       The  getsvc() function retrieves information from the system
 about the svcinfo structure by returning a pointer  to
       the  structure.  This  structure  is initialized the first
       time  a  getsvc()  call  is  made.  The  contents  of  the
       /etc/svc.conf  file  are  parsed and stored in the svcinfo
       structure. If the /etc/svc.conf file is modified, the contents
 of this structure will be updated upon the next call
       to getsvc().

       The /etc/svc.conf file contains the names of the databases
       that  can  be  served  by BIND or local files and the name
       service selection for each database. It also has  settings
       for  four security parameters. The database service selection
 and security parameters are  stored  in  the  svcinfo

       The following structure exists in the <svcinfo.h> file:

       #define  SVC_DATABASES  20  #define  SVC_PATHSIZE 8 struct
       svcinfo {
           int svcdate;       /* Last mod date  of  /etc/svc.conf

           int     svcpath[SVC_DATABASES][SVC_PATHSIZE];       /*
       indexed by
                                 databases  and  choice   0=first
                                 1=second   choice,   etc   value
       stored is
                                 source */

              struct {
                  int passlenmin;
                  int passlenmax;
                  int softexp;
                  int seclevel;
              } svcauth; };

       The svcdate field contains the date that the /etc/svc.conf
       file  was  last  modified.  The svcpath array contains the
       name service  choices  for  each  database.   The  svcauth
       structure contains the values for the four security parameters:
  password  length  minimum  (passlenmin),  password
       length  maximum  (passlenmax),  soft  expiration date of a
       password  (softexp),  and  security  mode  of   a   system

EXAMPLES    [Toc]    [Back]

       The  following  programming  example  shows how to use the
       getsvc() call to use the information in the svcinfo structure
 to process specific host information.

       #include <sys/svcinfo.h> struct svcinfo *svcinfo;

       if ((svcinfo = getsvc()) != NULL)
         for   (i=0;   (j  =  svcinfo->svcpath[SVC_HOSTS][i])  !=
       SVC_LAST; i++)       switch(j) {           case  SVC_BIND:
                      /*  process  BIND  hosts  */           case
       SVC_YP:                 /*  process  YP  hosts  */
       case SVC_LOCAL:            /* process LOCAL hosts */

FILES    [Toc]    [Back]

       Commands: svcsetup(8)

       Files: svc.conf(4)

[ Back ]
 Similar pages
Name OS Title
SSL_SESSION_print_fp Tru64 Write data in the SSL_SESSION structure to the BIO or to an I/O stream specified by the file pointer
SSL_SESSION_print Tru64 Write data in the SSL_SESSION structure to the BIO or to an I/O stream specified by the file pointer
current_task Tru64 General: Returns a pointer to the task structure associated with the currently running kernel thread
ALgetconfig IRIX (obsolete) get/set the ALconfig structure of an audio ALport structure
SSL_CTX_get_cert_store Tru64 Get the X509_STORE structure in the SSL_CTX structure
csfgss_pPtr Tru64 get a pointer to an OID or an OID set
DSA_dup_DH OpenBSD create a DH structure out of DSA structure
DSA_dup_DH NetBSD create a DH structure out of DSA structure
DSA_dup_DH Tru64 Create a DH structure out of DSA structure
glcgetpointer IRIX return pointer value
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service