logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hesiod_getmailhost, hesiod_free_postoffice - Hesiod functions for retrieving user to postoffice mappings

Description

       This  family  of  functions  allows you to retrieve user to postoffice mappings using Hesiod.  To perform
       lookups, you need an initialized Hesiod context; see hesiod(3) for details.  Information is returned in a
       hesiod_postoffice structure, which has the following fields:

       hesiod_po_type
              The type of postoffice box, typically ``POP''.

       hesiod_po_host
              The hostname where the postoffice box resides.

       hesiod_po_name
              The account name on the given postoffice server.

       It is the caller's responsibility to call hesiod_free_postoffice with the returned  postoffice  entry  to
       free the resources used by the postoffice entry.

       Hesiod queries for postoffice information are made using the ``pobox'' Hesiod type, using the username as
       the Hesiod name.  The corresponding entries should be space-separated lists of strings giving the type of
       postoffice box, the hostname, and the account name.

Errors

hesiod_getmailhost may fail for any of the reasons the routine hesiod_resolve may fail.

Name

       hesiod_getmailhost, hesiod_free_postoffice - Hesiod functions for retrieving user to postoffice mappings

Return Values

       On failure, hesiod_getservbyname returns NULL and sets the global variable errno to indicate the error.

See Also

hesiod(3)

                                                30 November 1996                                       HESIOD(3)

Synopsis

#include<hesiod.h>structhesiod_postoffice*hesiod_getmailhost(void*context,constchar*user)voidhesiod_free_postoffice(void*context,structhesiod_postoffice*po)ccfile.c-lhesiod

See Also