xref: /titanic_50/usr/src/lib/libresolv2/common/isc/ctl_p.h (revision 8a3c961b6b8e22607c570d092514b791eb1519e9)
1 /*
2  * Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
7 
8 struct ctl_buf {
9 	char *			text;
10 	size_t			used;
11 };
12 
13 #define	MAX_LINELEN		990	/* Like SMTP. */
14 #ifndef NO_SOCKADDR_UN
15 #define MAX_NTOP			PATH_MAX
16 #else
17 #define	MAX_NTOP		(sizeof "[255.255.255.255].65535")
18 #endif
19 
20 #define	allocated_p(Buf) ((Buf).text != NULL)
21 #define	buffer_init(Buf) ((Buf).text = 0, (Buf.used) = 0)
22 
23 #define	ctl_bufget	__ctl_bufget
24 #define	ctl_bufput	__ctl_bufput
25 #define	ctl_sa_ntop	__ctl_sa_ntop
26 #define	ctl_sa_copy	__ctl_sa_copy
27 
28 int			ctl_bufget(struct ctl_buf *, ctl_logfunc);
29 void			ctl_bufput(struct ctl_buf *);
30 const char *		ctl_sa_ntop(const struct sockaddr *, char *, size_t,
31 				    ctl_logfunc);
32 void			ctl_sa_copy(const struct sockaddr *,
33 				    struct sockaddr *);
34