xref: /freebsd-src/contrib/ntp/libntp/lib/isc/include/isc/netscope.h (revision a466cc55373fc3cf86837f09da729535b57e69a1)
1*a466cc55SCy Schubert /*
2*a466cc55SCy Schubert  * Copyright (C) 2004-2007, 2009  Internet Systems Consortium, Inc. ("ISC")
3*a466cc55SCy Schubert  * Copyright (C) 2002  Internet Software Consortium.
4*a466cc55SCy Schubert  *
5*a466cc55SCy Schubert  * Permission to use, copy, modify, and/or distribute this software for any
6*a466cc55SCy Schubert  * purpose with or without fee is hereby granted, provided that the above
7*a466cc55SCy Schubert  * copyright notice and this permission notice appear in all copies.
8*a466cc55SCy Schubert  *
9*a466cc55SCy Schubert  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10*a466cc55SCy Schubert  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11*a466cc55SCy Schubert  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12*a466cc55SCy Schubert  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13*a466cc55SCy Schubert  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14*a466cc55SCy Schubert  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15*a466cc55SCy Schubert  * PERFORMANCE OF THIS SOFTWARE.
16*a466cc55SCy Schubert  */
17*a466cc55SCy Schubert 
18*a466cc55SCy Schubert /* $Id: netscope.h,v 1.13 2009/06/25 23:48:02 tbox Exp $ */
19*a466cc55SCy Schubert 
20*a466cc55SCy Schubert #ifndef ISC_NETSCOPE_H
21*a466cc55SCy Schubert #define ISC_NETSCOPE_H 1
22*a466cc55SCy Schubert 
23*a466cc55SCy Schubert /*! \file isc/netscope.h */
24*a466cc55SCy Schubert 
25*a466cc55SCy Schubert ISC_LANG_BEGINDECLS
26*a466cc55SCy Schubert 
27*a466cc55SCy Schubert /*%
28*a466cc55SCy Schubert  * Convert a string of an IPv6 scope zone to zone index.  If the conversion
29*a466cc55SCy Schubert  * succeeds, 'zoneid' will store the index value.
30*a466cc55SCy Schubert  *
31*a466cc55SCy Schubert  * XXXJT: when a standard interface for this purpose is defined,
32*a466cc55SCy Schubert  * we should use it.
33*a466cc55SCy Schubert  *
34*a466cc55SCy Schubert  * Returns:
35*a466cc55SCy Schubert  * \li	ISC_R_SUCCESS: conversion succeeds
36*a466cc55SCy Schubert  * \li	ISC_R_FAILURE: conversion fails
37*a466cc55SCy Schubert  */
38*a466cc55SCy Schubert isc_result_t
39*a466cc55SCy Schubert isc_netscope_pton(int af, char *scopename, void *addr, isc_uint32_t *zoneid);
40*a466cc55SCy Schubert 
41*a466cc55SCy Schubert ISC_LANG_ENDDECLS
42*a466cc55SCy Schubert 
43*a466cc55SCy Schubert #endif /* ISC_NETSCOPE_H */
44