summaryrefslogtreecommitdiffstats
path: root/libutil
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-04-06 23:02:35 +0000
committerBrian Somers <brian@FreeBSD.org>1999-04-06 23:02:35 +0000
commit6bbf8e8bb56f7764c4818c942709f9cc3dc71d50 (patch)
treeedd478e78b5bb688513fba1d1250e8a21ac94bc0 /libutil
parent7876747ed935db3792e45bc51fed012859a86dda (diff)
downloadpw-darwin-6bbf8e8bb56f7764c4818c942709f9cc3dc71d50.tar.gz
pw-darwin-6bbf8e8bb56f7764c4818c942709f9cc3dc71d50.tar.zst
pw-darwin-6bbf8e8bb56f7764c4818c942709f9cc3dc71d50.zip
Add realhostname() - a function to correctly lookup
a name by address and ensure that the name resolves back to the original address.
Diffstat (limited to 'libutil')
-rw-r--r--libutil/libutil.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libutil/libutil.h b/libutil/libutil.h
index dda01c1..32957d9 100644
--- a/libutil/libutil.h
+++ b/libutil/libutil.h
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file providing the above
* conditions are met.
*
- * $Id: libutil.h,v 1.20 1998/10/09 07:32:38 jkh Exp $
+ * $Id: libutil.h,v 1.21 1998/12/16 17:52:15 bde Exp $
*/
#ifndef _LIBUTIL_H_
@@ -37,6 +37,7 @@ typedef struct _property {
struct termios;
struct winsize;
struct utmp;
+struct in_addr;
__BEGIN_DECLS
void setproctitle __P((const char *_fmt, ...)) __printf0like(1, 2);
@@ -58,6 +59,7 @@ properties properties_read __P((int fd));
void properties_free __P((properties list));
char *property_find __P((properties list, const char *name));
char *auth_getval __P((const char *name));
+int realhostname __P((char *host, size_t hsize, const struct in_addr *ip));
__END_DECLS
#define UU_LOCK_INUSE (1)
@@ -70,4 +72,10 @@ __END_DECLS
#define UU_LOCK_TRY_ERR (-6)
#define UU_LOCK_OWNER_ERR (-7)
+/* return values from realhostname() */
+#define HOSTNAME_FOUND (0)
+#define HOSTNAME_INCORRECTNAME (1)
+#define HOSTNAME_INVALIDADDR (2)
+#define HOSTNAME_INVALIDNAME (3)
+
#endif /* !_LIBUTIL_H_ */