xref: /netbsd-src/external/bsd/libbind/dist/isc/ctl_p.h (revision b5677b36047b601b9addaaa494a58ceae82c2a6c)
1 /*	$NetBSD: ctl_p.h,v 1.1.1.1 2009/04/12 15:33:47 christos Exp $	*/
2 
3 struct ctl_buf {
4 	char *			text;
5 	size_t			used;
6 };
7 
8 #define	MAX_LINELEN		990	/*%< Like SMTP. */
9 #ifndef NO_SOCKADDR_UN
10 #define MAX_NTOP			PATH_MAX
11 #else
12 #define	MAX_NTOP		(sizeof "[255.255.255.255].65535")
13 #endif
14 
15 #define	allocated_p(Buf) ((Buf).text != NULL)
16 #define	buffer_init(Buf) ((Buf).text = 0, (Buf.used) = 0)
17 
18 #define	ctl_bufget	__ctl_bufget
19 #define	ctl_bufput	__ctl_bufput
20 #define	ctl_sa_ntop	__ctl_sa_ntop
21 #define	ctl_sa_copy	__ctl_sa_copy
22 
23 int			ctl_bufget(struct ctl_buf *, ctl_logfunc);
24 void			ctl_bufput(struct ctl_buf *);
25 const char *		ctl_sa_ntop(const struct sockaddr *, char *, size_t,
26 				    ctl_logfunc);
27 void			ctl_sa_copy(const struct sockaddr *,
28 				    struct sockaddr *);
29 
30 /*! \file */
31