1/*	$NetBSD: valid_hostname.h,v 1.2 2023/12/23 20:30:46 christos 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#define DONT_WILDCARD		0
24#define DO_WILDCARD		(1<<1)
25
26extern int valid_hostname(const char *, int);
27extern int valid_hostaddr(const char *, int);
28extern int valid_ipv4_hostaddr(const char *, int);
29extern int valid_ipv6_hostaddr(const char *, int);
30extern int valid_hostport(const char *, int);
31
32/* LICENSE
33/* .ad
34/* .fi
35/*	The Secure Mailer license must be distributed with this software.
36/* AUTHOR(S)
37/*	Wietse Venema
38/*	IBM T.J. Watson Research
39/*	P.O. Box 704
40/*	Yorktown Heights, NY 10598, USA
41/*--*/
42
43#endif
44