1 /* GNet - Networking library
2  * Copyright (C) 2002  David Helder
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA  02111-1307, USA.
18  */
19 
20 #ifndef _GNET_IPV6_H
21 #define _GNET_IPV6_H
22 
23 #include <glib.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28 
29 
30 /**
31  *  GIPv6Policy
32  *  @GIPV6_POLICY_IPV4_THEN_IPV6: Use IPv4, then IPv6
33  *  @GIPV6_POLICY_IPV6_THEN_IPV4: Use IPv6, then IPv4
34  *  @GIPV6_POLICY_IPV4_ONLY: Use IPv4 only
35  *  @GIPV6_POLICY_IPV6_ONLY: Use IPv6 only
36  *
37  *  Policy for IPv6 use in GNet.  This affects domain name resolution
38  *  and server binding.  gnet_init() attempts to set a reasonable
39  *  default based on environment variables or the interfaces available
40  *  on the host.
41  *
42  **/
43 typedef enum {
44   GIPV6_POLICY_IPV4_THEN_IPV6,
45   GIPV6_POLICY_IPV6_THEN_IPV4,
46   GIPV6_POLICY_IPV4_ONLY,
47   GIPV6_POLICY_IPV6_ONLY
48 } GIPv6Policy;
49 
50 
51 GIPv6Policy	gnet_ipv6_get_policy (void);
52 void       	gnet_ipv6_set_policy (GIPv6Policy policy);
53 
54 #ifdef __cplusplus
55 }
56 #endif				/* __cplusplus */
57 
58 #endif /* _GNET_IPV6_H */
59