29 #endif |
29 #endif |
30 |
30 |
31 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
31 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
32 #include <in_sock_internal.h> |
32 #include <in_sock_internal.h> |
33 #endif |
33 #endif |
|
34 |
|
35 // Constants and typedef's for domain suffix support on interface |
|
36 const TInt KMaxDomainSuffixLength = 254; // Leaving space for minimum 1 letter hostname + '.' on maximum hostname length |
|
37 const TInt KMaxHostNameLength = 256; |
|
38 typedef TBuf<KMaxDomainSuffixLength> TSuffixName; |
|
39 typedef RArray<TSuffixName> RInetSuffixList; |
|
40 |
|
41 // Enumeration on type of operation done on the interface |
|
42 // for the domain suffix using RSocket::SetOpt |
|
43 enum TSoInetDomainSuffixFunction |
|
44 { |
|
45 EInetFunctionUndefined, |
|
46 EInetAddSuffix, |
|
47 EInetDeleteSuffix, |
|
48 EInetDeleteAllSuffixes |
|
49 }; |
|
50 |
|
51 /** |
|
52 * Interface domain name structure |
|
53 * Used in TSoInetInterfaceInfoExtnDnsSuffix for adding/removing |
|
54 * Domain name suffices to an active interface using RSocket::SetOpt |
|
55 * |
|
56 * @publishedAll |
|
57 * @released |
|
58 */ |
|
59 class TInetSuffix |
|
60 { |
|
61 private: |
|
62 inline TInt AssignValue(const TDesC& aValue) |
|
63 { |
|
64 if (aValue.Length() > KMaxDomainSuffixLength) |
|
65 return KErrTooBig; |
|
66 iSuffixName.Copy(aValue); |
|
67 return KErrNone; |
|
68 } |
|
69 |
|
70 public: |
|
71 TInetSuffix() { iDomainSuffixFunction = EInetFunctionUndefined; } |
|
72 |
|
73 inline TInt Copy(const TDesC& aValue) |
|
74 { |
|
75 TInt err = AssignValue(aValue); |
|
76 if (err == KErrNone) |
|
77 iDomainSuffixFunction = EInetAddSuffix; |
|
78 return err; |
|
79 } |
|
80 |
|
81 inline TInt Delete(const TDesC& aValue) |
|
82 { |
|
83 TInt err = AssignValue(aValue); |
|
84 if (err == KErrNone) |
|
85 iDomainSuffixFunction = EInetDeleteSuffix; |
|
86 return err; |
|
87 } |
|
88 |
|
89 inline void DeleteAll() |
|
90 { |
|
91 iDomainSuffixFunction = EInetDeleteAllSuffixes; |
|
92 } |
|
93 |
|
94 public: |
|
95 TSuffixName iSuffixName; |
|
96 TUint8 iDomainSuffixFunction; |
|
97 |
|
98 }; |
34 |
99 |
35 /** |
100 /** |
36 * @name TCP/IP Protocol and address family |
101 * @name TCP/IP Protocol and address family |
37 * |
102 * |
38 * The TCP/IP stack supports two different address formats |
103 * The TCP/IP stack supports two different address formats |
737 * @ref RSocket::SetOpt() |
802 * @ref RSocket::SetOpt() |
738 */ |
803 */ |
739 const TUint KSoInetStartInterface = 0x217; |
804 const TUint KSoInetStartInterface = 0x217; |
740 |
805 |
741 /** |
806 /** |
|
807 * @name Interface control socket options |
|
808 * |
|
809 * Level: #KSolInetIfCtrl |
|
810 * |
|
811 * Enumerating & Configuring Domain suffix on an using TSoInetInterfaceInfoExtnDnsSuffix |
|
812 */ |
|
813 //@{ |
|
814 /** |
|
815 * Begin enumeration of domain suffixes on an enumerated interface. |
|
816 * |
|
817 * This option should be set before enumerating domain suffices with #KSoInetNextDomainSuffix. |
|
818 * As a pre-condition, the enumeration should be initiated on an active enumeration of interface |
|
819 * |
|
820 * This option is for use with RSocket::SetOpt() only. |
|
821 */ |
|
822 const TUint KSoInetEnumDomainSuffix = 0x218; |
|
823 |
|
824 /** |
|
825 * Return details of the next domain suffix in an enumeration started by setting the |
|
826 * option #KSoInetEnumDomainSuffix. |
|
827 * |
|
828 * This option is for use with RSocket::GetOpt() only. |
|
829 * |
|
830 * Option data type is TSoInetInterfaceInfoExtnDnsSuffix. |
|
831 * |
|
832 * @note |
|
833 * If the interface has multiple domain suffices, then each domain name |
|
834 * is returned as a separate instance of TSoInetInterfaceInfoExtnDnsSuffix |
|
835 * (only domain suffix name is different each time). |
|
836 * @note |
|
837 * If the interface has no domain suffix, then SetOpt call |
|
838 * returns with error KErrNotFound |
|
839 */ |
|
840 const TUint KSoInetNextDomainSuffix = 0x219; |
|
841 |
|
842 /** |
742 * Trigger link local creation. |
843 * Trigger link local creation. |
743 * |
844 * |
744 * Option data type is TSoInet6InterfaceInfo. |
845 * Option data type is TSoInet6InterfaceInfo. |
745 * |
846 * |
746 * The interface is specified by setting the TSoInetInterfaceInfo::iName and any state |
847 * The interface is specified by setting the TSoInetInterfaceInfo::iName and any state |
1056 * |
1157 * |
1057 * @since 7.0s |
1158 * @since 7.0s |
1058 */ |
1159 */ |
1059 TUint iDoProxy:1; |
1160 TUint iDoProxy:1; |
1060 }; |
1161 }; |
1061 //@} |
1162 |
|
1163 /** |
|
1164 * Extension class for TSoInet6InterfaceInfo. Available in Symbian OS vtb92 and later. |
|
1165 * |
|
1166 * Optionally used with the following interface level #KSolInetIfCtrl options: |
|
1167 * @li #KSoInetConfigInterface |
|
1168 * @li #KSoInetChangeInterface |
|
1169 * @li #KSoInetEnumInterface |
|
1170 * |
|
1171 * Provides specialised fields for the interface object that generally |
|
1172 * supplement extended behaviors for certain applications |
|
1173 * |
|
1174 * @publishedAll |
|
1175 * @released |
|
1176 */ |
|
1177 class TSoInetInterfaceInfoExtnDnsSuffix : public TSoInet6InterfaceInfo |
|
1178 { |
|
1179 public: |
|
1180 /** Interface domain suffix (if any). Used by DND for name resolution */ |
|
1181 TInetSuffix iDomainSuffix; |
|
1182 }; |
1062 |
1183 |
1063 /** |
1184 /** |
1064 * @name Interface query socket options |
1185 * @name Interface query socket options |
1065 * |
1186 * |
1066 * Level: #KSolInetIfQuery |
1187 * Level: #KSolInetIfQuery |
1169 * @li output: The scope id vector |
1290 * @li output: The scope id vector |
1170 * @since 7.0s |
1291 * @since 7.0s |
1171 */ |
1292 */ |
1172 TInetScopeIds iZone; |
1293 TInetScopeIds iZone; |
1173 }; |
1294 }; |
|
1295 |
|
1296 /*class TSoInetSupplIfQuery : public TSoInetIfQuery |
|
1297 { |
|
1298 TInetSuffixList iSuffixList; |
|
1299 };*/ |
|
1300 |
1174 /** |
1301 /** |
1175 * Get information for the interface specified by the destination address (iDstAddr) |
1302 * Get information for the interface specified by the destination address (iDstAddr) |
1176 * field of the passed packaged TSoInetIfQuery. |
1303 * field of the passed packaged TSoInetIfQuery. |
1177 * |
1304 * |
1178 * This allows the caller to find out what interface would be used (without invoking |
1305 * This allows the caller to find out what interface would be used (without invoking |
1837 * set <b>after bind</b>, the stack will not select a new address. |
1964 * set <b>after bind</b>, the stack will not select a new address. |
1838 * |
1965 * |
1839 * @since 7.0s |
1966 * @since 7.0s |
1840 */ |
1967 */ |
1841 const TUint KSoNoSourceAddressSelect = 0x40b; |
1968 const TUint KSoNoSourceAddressSelect = 0x40b; |
|
1969 |
|
1970 /** |
|
1971 * Store the port number on which application to the Hook listens to. |
|
1972 * |
|
1973 * This port number will be used to be set as the destination address which |
|
1974 * performing the UDP encapsulation from tunnel nif application to third party application. |
|
1975 * The same port number if used to identify the packets orignated from the application towards |
|
1976 * the Tunnel Nif. |
|
1977 */ |
|
1978 const TUint KSoTunnelPort = 0x40c; |
|
1979 |
1842 /** |
1980 /** |
1843 * Retrieve last error information. |
1981 * Retrieve last error information. |
1844 * |
1982 * |
1845 * This option is for use with GetOpt() only. |
1983 * This option is for use with GetOpt() only. |
1846 * |
1984 * |