1 /* $NetBSD: valid_hostname.h,v 1.1.1.2 2013/09/25 19:06:38 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 extern int valid_hostport(const char *, int); 29 30 /* LICENSE 31 /* .ad 32 /* .fi 33 /* The Secure Mailer license must be distributed with this software. 34 /* AUTHOR(S) 35 /* Wietse Venema 36 /* IBM T.J. Watson Research 37 /* P.O. Box 704 38 /* Yorktown Heights, NY 10598, USA 39 /*--*/ 40 41 #endif 42