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