|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // dnd_ini.h - INI File literals |
|
15 // |
|
16 |
|
17 #ifndef __DND_INI_H__ |
|
18 #define __DND_INI_H__ |
|
19 /** |
|
20 @file dnd_ini.h |
|
21 Define the literals and defaults for DND ini file. |
|
22 |
|
23 The "dnd.ini" content defined by this is currently included |
|
24 in "tcpip.ini" as [resolver] and [llmnr] sections. |
|
25 |
|
26 The current "dnd.ini" file is a different thing, more like resolv.conf |
|
27 (choice of name "dnd.ini" for that is unfortunate accident, but |
|
28 too late to change) |
|
29 |
|
30 @internalComponent Domain Name Resolver |
|
31 */ |
|
32 |
|
33 // |
|
34 // INI File literals |
|
35 // ***************** |
|
36 // |
|
37 |
|
38 _LIT(DND_INI_DATA, "resolver.ini"); //< the name of the ini-file |
|
39 |
|
40 _LIT(DND_INI_RESOLVER, "resolver"); //< [resolver] |
|
41 _LIT(DND_INI_RETRIES, "retries"); //< retries= 3 |
|
42 _LIT(DND_INI_MINTIME, "mintime"); //< mintime= 1 |
|
43 _LIT(DND_INI_MAXTIME, "maxtime"); //< maxtime= 30 |
|
44 _LIT(DND_INI_SETUPTIME, "setuptime"); //< setuptime= 120 |
|
45 _LIT(DND_INI_SETUPPOLL, "setuppoll"); //< setuppoll= 5 |
|
46 _LIT(DND_INI_SPRAYMODE, "spraymode"); //< spraymode= 0 |
|
47 _LIT(DND_INI_SKIPNOTFOUND,"skipnotfound"); //< skipnotfound= 0 |
|
48 _LIT(DND_INI_QUERYHACK, "queryhack"); //< queryhack= 1 |
|
49 _LIT(DND_INI_QUERYORDER, "queryorder"); //< queryorder= 0 |
|
50 _LIT(DND_INI_FLUSHONCONFIG, "flushonconfig"); //< flushonconfig= 0 |
|
51 _LIT(DND_INI_EDNS0, "edns0"); //< edns0= 0 (payload length for received DNS packets, if > 512) |
|
52 |
|
53 _LIT(DND_INI_HOST, "host"); //< [host] |
|
54 _LIT(DND_INI_HOSTNAME, "hostname"); //< hostname= localhost |
|
55 |
|
56 #ifdef LLMNR_ENABLED |
|
57 _LIT(DND_INI_LLMNR, "llmnr"); //< [llmnr] |
|
58 _LIT(LLMNR_INI_ENTRIES, "llmnrentries"); //< llmnrentries= 0..KLlmnrMaxEnabled |
|
59 _LIT(LLMNR_INI_ENTRY, "llmnrentry"); //< prefix for llmnrentryN, 1<=N<=llmnrentries. LLMNR enabled hostname string, no default value |
|
60 _LIT(LLMNR_INI_LLONLY, "llmnrllonly"); //< llmnrllonly= 0 |
|
61 _LIT(LLMNR_INI_PORT, "llmnrport"); //< llmnrport= 5353 |
|
62 _LIT(LLMNR_INI_RETRIES, "llmnrretries"); //< llmnrretries= 3 |
|
63 _LIT(LLMNR_INI_MINTIME, "llmnrmintime"); //< llmnrmintime= 1 |
|
64 _LIT(LLMNR_INI_MAXTIME, "llmnrmaxtime"); //< llmnrmaxtime= 8 |
|
65 _LIT(LLMNR_INI_NOTIFYTIME, "llmnrnotifytime"); //< llmnrnotifytime= 5 |
|
66 _LIT(LLMNR_INI_RESCANS, "llmnrrescans"); //< llmnrrescans= 4 |
|
67 _LIT(LLMNR_INI_TTL, "llmnrttl"); //< llmnrttl= 10 (TTL for RR records!) |
|
68 _LIT(LLMNR_INI_IPV4ADDR,"llmnripv4addr"); //< llmnripv4addr= 224.0.0.251 |
|
69 _LIT(LLMNR_INI_IPV6ADDR,"llmnripv6addr"); //< llmnripv6addr= ff02::fb |
|
70 _LIT(LLMNR_INI_HOPLIMIT,"llmnrhoplimit"); //< llmnrhoplimit= 255 (TTL for IP packets!) |
|
71 #endif |
|
72 // |
|
73 // Many file parameters will have a hard coded default, |
|
74 // if the value is not specified in the ini file. Some of the |
|
75 // default constants are defined below. |
|
76 // |
|
77 // The name of the constant is generated directly from the string |
|
78 // literal name according to the following template |
|
79 // |
|
80 // DND_INI_PARAMETER_NAME => KDndIni_ParameterName |
|
81 // |
|
82 _LIT(KDndIni_Hostname, "localhost"); // default host name |
|
83 |
|
84 const TInt KDndIni_Retries = 3; //< [1..255] |
|
85 const TInt KDndIni_MinTime = 1; //< [1..maxint] [seconds] |
|
86 const TInt KDndIni_MaxTime = 30; //< [0..maxint] [seconds] |
|
87 const TInt KDndIni_SetupPoll = 5; //< [0..maxint] [seconds] |
|
88 const TInt KDndIni_QueryHack = 1; //< [0..1] (off/on) |
|
89 const TInt KDndIni_EDNS0 = 0; //< [0..65000] |
|
90 /** |
|
91 * How to send A and AAAA queries [0..3]. |
|
92 * |
|
93 * @li = 0, AAAA and A sequentially |
|
94 * @li = 1, A and AAAA sequentially |
|
95 * @li = 2, AAAA and A parallel |
|
96 * @li = 3, A and AAAA parallel |
|
97 */ |
|
98 const TInt KDndIni_QueryOrder = 0; |
|
99 const TInt KDndIni_SprayMode = 0; //< [0..1] (off/on) |
|
100 const TInt KDndIni_SkipNotFound = 0; //< [0..1] (off/on) |
|
101 const TInt KDndIni_SetupTime = 30; //< [0..maxint] [seconds] |
|
102 #ifdef LLMNR_ENABLED |
|
103 const TInt KLlmnrIni_LlOnly = 0; //< [0..1] (off/on) |
|
104 const TInt KLlmnrIni_Port = 5353; //< [0..65535] |
|
105 const TInt KLlmnrIni_Retries = 3; //< [1..255] |
|
106 const TInt KLlmnrIni_MinTime = 1; //< [0..maxint] [seconds] |
|
107 const TInt KLlmnrIni_MaxTime = 8; |
|
108 const TInt KLlmnrIni_NotifyTime = 5; //< [0..maxint] [seconds] |
|
109 const TInt KLlmnrIni_Rescans = 4; //< [1..255] |
|
110 const TInt KLlmnrIni_Ttl = 10; //< [1..maxint] [seconds] |
|
111 const TInt KLlmnrIni_Hoplimit = 255; //< [-1..255] (LLMNR-31 draft) |
|
112 _LIT(KLlmnrIni_Ipv4Addr, "224.0.0.251"); |
|
113 _LIT(KLlmnrIni_Ipv6Addr, "ff02::fb"); |
|
114 #endif |
|
115 #endif |