1 /* $NetBSD: valid_hostname.h,v 1.1.1.1 2009/06/23 10:09:01 tron Exp $ */ 2 3 #ifndef _VALID_HOSTNAME_H_INCLUDED_ 4 #define _VALID_HOSTNAME_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* valid_hostname 3h 9 /* SUMMARY 10 /* validate hostname 11 /* SYNOPSIS 12 /* #include <valid_hostname.h> 13 /* DESCRIPTION 14 /* .nf 15 16 /* External interface */ 17 18 #define VALID_HOSTNAME_LEN 255 /* RFC 1035 */ 19 #define VALID_LABEL_LEN 63 /* RFC 1035 */ 20 21 #define DONT_GRIPE 0 22 #define DO_GRIPE 1 23 24 extern int valid_hostname(const char *, int); 25 extern int valid_hostaddr(const char *, int); 26 extern int valid_ipv4_hostaddr(const char *, int); 27 extern int valid_ipv6_hostaddr(const char *, int); 28 29 /* LICENSE 30 /* .ad 31 /* .fi 32 /* The Secure Mailer license must be distributed with this software. 33 /* AUTHOR(S) 34 /* Wietse Venema 35 /* IBM T.J. Watson Research 36 /* P.O. Box 704 37 /* Yorktown Heights, NY 10598, USA 38 /*--*/ 39 40 #endif 41