* 5. Modifications may be freely made to this file providing the above
* conditions are met.
*
- * $Id: libutil.h,v 1.18 1998/10/08 23:10:41 jkh Exp $
+ * $FreeBSD$
*/
#ifndef _LIBUTIL_H_
struct termios;
struct winsize;
struct utmp;
+struct in_addr;
__BEGIN_DECLS
-void setproctitle __P((const char *_fmt, ...));
+void setproctitle __P((const char *_fmt, ...)) __printf0like(1, 2);
void login __P((struct utmp *_ut));
int login_tty __P((int _fd));
int logout __P((char *_line));
int uu_unlock __P((const char *_ttyname));
int uu_lock_txfr __P((const char *_ttyname, pid_t _pid));
int _secure_path __P((const char *_path, uid_t _uid, gid_t _gid));
-properties properties_read __P((FILE *fp));
+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)
#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_ */