1HESIOD(3)                  Library Functions Manual                  HESIOD(3)
2
3
4

NAME

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

SYNOPSIS

10       #include <hesiod.h>
11
12       struct hesiod_postoffice *hesiod_getmailhost(void *context,
13            const char *user)
14       void hesiod_free_postoffice(void *context,
15            struct hesiod_postoffice *po)
16
17       cc file.c -lhesiod
18

DESCRIPTION

20       This family of functions allows you to retrieve user to postoffice map‐
21       pings using Hesiod.  To perform lookups, you need an initialized Hesiod
22       context; see hesiod(3) for details.  Information is returned in a  hes‐
23       iod_postoffice structure, which has the following fields:
24
25       hesiod_po_type
26              The type of postoffice box, typically ``POP''.
27
28       hesiod_po_host
29              The hostname where the postoffice box resides.
30
31       hesiod_po_name
32              The account name on the given postoffice server.
33
34       It  is  the caller's responsibility to call hesiod_free_postoffice with
35       the returned postoffice entry to free the resources used by the postof‐
36       fice entry.
37
38       Hesiod  queries for postoffice information are made using the ``pobox''
39       Hesiod type, using the username as the Hesiod name.  The  corresponding
40       entries  should  be space-separated lists of strings giving the type of
41       postoffice box, the hostname, and the account name.
42

RETURN VALUES

44       On failure, hesiod_getservbyname returns NULL and sets the global vari‐
45       able errno to indicate the error.
46

ERRORS

48       hesiod_getmailhost  may  fail  for  any of the reasons the routine hes‐
49       iod_resolve may fail.
50

SEE ALSO

52       hesiod(3)
53
54
55
56                               30 November 1996                      HESIOD(3)
Impressum