xref: /freebsd/lib/libcasper/services/cap_netdb/cap_netdb.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1*94dc5715SRyan Moeller /*-
2*94dc5715SRyan Moeller  * Copyright (c) 2020 Ryan Moeller <freqlabs@FreeBSD.org>
3*94dc5715SRyan Moeller  *
4*94dc5715SRyan Moeller  * Redistribution and use in source and binary forms, with or without
5*94dc5715SRyan Moeller  * modification, are permitted provided that the following conditions
6*94dc5715SRyan Moeller  * are met:
7*94dc5715SRyan Moeller  * 1. Redistributions of source code must retain the above copyright
8*94dc5715SRyan Moeller  *    notice, this list of conditions and the following disclaimer.
9*94dc5715SRyan Moeller  * 2. Redistributions in binary form must reproduce the above copyright
10*94dc5715SRyan Moeller  *    notice, this list of conditions and the following disclaimer in the
11*94dc5715SRyan Moeller  *    documentation and/or other materials provided with the distribution.
12*94dc5715SRyan Moeller  *
13*94dc5715SRyan Moeller  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14*94dc5715SRyan Moeller  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*94dc5715SRyan Moeller  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*94dc5715SRyan Moeller  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17*94dc5715SRyan Moeller  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*94dc5715SRyan Moeller  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*94dc5715SRyan Moeller  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*94dc5715SRyan Moeller  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*94dc5715SRyan Moeller  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*94dc5715SRyan Moeller  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*94dc5715SRyan Moeller  * SUCH DAMAGE.
24*94dc5715SRyan Moeller  */
25*94dc5715SRyan Moeller 
26*94dc5715SRyan Moeller #ifndef	_CAP_NETDB_H_
27*94dc5715SRyan Moeller #define	_CAP_NETDB_H_
28*94dc5715SRyan Moeller 
29*94dc5715SRyan Moeller #ifdef HAVE_CASPER
30*94dc5715SRyan Moeller #define WITH_CASPER
31*94dc5715SRyan Moeller #endif
32*94dc5715SRyan Moeller 
33*94dc5715SRyan Moeller #include <sys/cdefs.h>
34*94dc5715SRyan Moeller 
35*94dc5715SRyan Moeller #include <netdb.h>
36*94dc5715SRyan Moeller 
37*94dc5715SRyan Moeller #ifdef WITH_CASPER
38*94dc5715SRyan Moeller __BEGIN_DECLS
39*94dc5715SRyan Moeller 
40*94dc5715SRyan Moeller struct protoent *cap_getprotobyname(cap_channel_t *chan, const char *name);
41*94dc5715SRyan Moeller 
42*94dc5715SRyan Moeller __END_DECLS
43*94dc5715SRyan Moeller #else
44*94dc5715SRyan Moeller #define	cap_getprotobyname(chan, name)		 getprotobyname(name)
45*94dc5715SRyan Moeller #endif
46*94dc5715SRyan Moeller 
47*94dc5715SRyan Moeller #endif	/* !_CAP_NETDB_H_ */
48