1 /* This file contains definitions for use by the Hesiod name service and
7 * For copying and distribution information, see the file
8 * <gt> mit-copyright.h <lt>.
10 * Original version by Steve Dyer, IBM/Project Athena.
14 /* Configuration information. */
19 #if defined(_WINDOWS) || defined(_WIN32)
23 #if defined(_WINDOWS) || defined(_WIN32)
24 #define HESIOD_CONF "c:\\net\\tcp\\hesiod.cfg"
26 #define HESIOD_CONF "/etc/hesiod.conf" /* Configuration file. */
29 #define DEF_RHS ".Athena.MIT.EDU" /* Defaults if HESIOD_CONF */
30 #define DEF_LHS ".ns" /* file is not present. */
36 @type HES_ER_UNINIT | -1 uninitialized
37 @type HES_ER_OK | 0 no error
38 @type HES_ER_NOTFOUND | 1 Hesiod name not found by server
39 @type HES_ER_CONFIG | 2 local problem (no config file?)
40 @type HES_ER_NET | 3 network problem
44 #define HES_ER_UNINIT -1 /* uninitialized */
45 #define HES_ER_OK 0 /* no error */
46 #define HES_ER_NOTFOUND 1 /* Hesiod name not found by server */
47 #define HES_ER_CONFIG 2 /* local problem (no config file?) */
48 #define HES_ER_NET 3 /* network problem */
50 /* Declaration of routines */
56 #if defined(_WINDOWS) || defined(_WIN32)
76 char *hes_to_bind(const char *name, const char *type);
77 char **hes_resolve(const char *name, const char *type);
85 * @struct hes_postoffice | For use in getting post-office information.
87 * @field LPSTR | po_type | The post office type, e.g. POP, IMAP
88 * @field LPSTR | po_host | The post office host, e.g. PO10.MIT.EDU
89 * @field LPSTR | po_name | The account name on the post office, e.g. tom
92 #if defined(_WINDOWS) || defined(_WIN32)
93 struct hes_postoffice {
99 struct hes_postoffice {
108 #if defined(_WINDOWS) || defined(_WIN32)
109 struct hes_postoffice FAR * WINAPI hes_getmailhost(LPSTR user);
110 struct servent FAR * WINAPI hes_getservbyname(LPSTR name,
112 struct passwd FAR * WINAPI hes_getpwnam(LPSTR nam);
113 struct passwd FAR * WINAPI hes_getpwuid(int uid);
115 struct hes_postoffice *hes_getmailhost();
116 struct servent *hes_getservbyname();
117 struct passwd *hes_getpwnam();
118 struct passwd *hes_getpwuid();
125 #endif /* _HESIOD_ */