1.1 --- a/epoc32/include/in_iface.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,323 +0,0 @@
1.4 -/**
1.5 -* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 -* All rights reserved.
1.7 -* This component and the accompanying materials are made available
1.8 -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 -* which accompanies this distribution, and is available
1.10 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 -*
1.12 -* Initial Contributors:
1.13 -* Nokia Corporation - initial contribution.
1.14 -*
1.15 -* Contributors:
1.16 -*
1.17 -* Description:
1.18 -*
1.19 -*/
1.20 -
1.21 -
1.22 -
1.23 -
1.24 -
1.25 -/**
1.26 - @file IN_IFACE.H
1.27 -*/
1.28 -
1.29 -#if !defined(__IN_IFACE_H__)
1.30 -#define __IN_IFACE_H__
1.31 -
1.32 -#if !defined(__IN_SOCK_H__)
1.33 -#include <in_sock.h>
1.34 -#endif
1.35 -
1.36 -#if !defined(__NIFVAR_H__)
1.37 -#include <nifvar.h>
1.38 -#endif
1.39 -
1.40 -// Feature Flags
1.41 -
1.42 -/**
1.43 -Is a loopback interface
1.44 -@internalAll
1.45 -*/
1.46 -const TUint KIfIsLoopback = 0x00000001;
1.47 -
1.48 -/**
1.49 -Is single point to point
1.50 -@internalAll
1.51 -*/
1.52 -const TUint KIfIsPointToPoint = 0x00000002;
1.53 -
1.54 -/**
1.55 -Supports broadcasting
1.56 -@internalAll
1.57 -*/
1.58 -const TUint KIfCanBroadcast = 0x00000004;
1.59 -
1.60 -/**
1.61 -Supports multicasting
1.62 -@internalAll
1.63 -*/
1.64 -const TUint KIfCanMulticast = 0x00000008;
1.65 -
1.66 -/**
1.67 -Can have its MTU set
1.68 -@internalAll
1.69 -*/
1.70 -const TUint KIfCanSetMTU = 0x00000010;
1.71 -
1.72 -/**
1.73 -Has a hardware address (ie needs ARP)
1.74 -@internalAll
1.75 -*/
1.76 -const TUint KIfHasHardwareAddr = 0x00000020;
1.77 -
1.78 -/**
1.79 -Can have its hardware address changed
1.80 -@internalAll
1.81 -*/
1.82 -const TUint KIfCanSetHardwareAddr = 0x00000040;
1.83 -
1.84 -/**
1.85 -Dialup interface
1.86 -@internalAll
1.87 -*/
1.88 -const TUint KIfIsDialup = 0x00000080;
1.89 -
1.90 -// Control options level received by network interfaces
1.91 -/**
1.92 - * Option level for network interface driver options.
1.93 - * @internalTechnology
1.94 - */
1.95 -const TUint KSOLInterface = 0x203;
1.96 -
1.97 -// Option names
1.98 -/**
1.99 - * The current network interface driver operation parameters are written to the
1.100 - * passed TSoIfInfo structure.
1.101 - *
1.102 - * An interface that supports only this is assumed IPv4 only.
1.103 - *
1.104 - * anOption should be a TPckgBuf<TSoIfInfo>.
1.105 - *
1.106 - * @internalTechnology
1.107 - */
1.108 -const TUint KSoIfInfo = 0x101; // Get Interface Information
1.109 -
1.110 -/**
1.111 - * Gets the interface's local hardware address, if the link layer is using addresses.
1.112 - *
1.113 - * anOption should be a TPckgBuf<TSoIfInfo>.
1.114 - *
1.115 - * The option is not supported until v7.0.
1.116 - *
1.117 - * @internalTechnology
1.118 - */
1.119 -const TUint KSoIfHardwareAddr = 0x102; // Get Hardware Address
1.120 -
1.121 -/**
1.122 - * Gets the current network interface driver configuration options.
1.123 - *
1.124 - * There may be three kind of interfaces: IPv4 only, IPv6 only and hybrid IPv4/IPv6.
1.125 - * The last one is passing traffic for both protocols and thus accepts either
1.126 - * family in a single KSoIfConfig call. Hybrid interfaces must be queried twice,
1.127 - * once for IPv4 and once for IPv6, to get both the IPv4 and the IPv6 settings.
1.128 - *
1.129 - * For IPv4, anOption should be a TPckgBuf<TSoInetIfConfig>, for IPv6 TPckgBuf<TSoInet6IfConfig>.
1.130 - *
1.131 - * The iFamily field in either TSoInetIfConfig or TSoInet6IfConfig must be set
1.132 - * to either KAfInet for IPv4 or KAfInet6 for IPv6) before the call. If the family
1.133 - * is not supported by the interface, it returns KErrNotSupported.
1.134 - *
1.135 - * @internalTechnology
1.136 - */
1.137 -const TUint KSoIfConfig = 0x103; // Get Network parameters
1.138 -
1.139 -/**
1.140 - * For the IPv4 only stack, compares the passed address with the current local
1.141 - * address, and returns KErrBadName if not equal.
1.142 - *
1.143 - * anOption should be a TPckgBuf< TInetAddr >.
1.144 - *
1.145 - * This is not used for the IPv4/v6 stack.
1.146 - *
1.147 - * @internalTechnology
1.148 - */
1.149 -const TUint KSoIfCompareAddr = 0x104; // Compare address with one passed in
1.150 -
1.151 -/** Retrieve IAP and NID information
1.152 - *
1.153 - * @internalTechnology
1.154 - */
1.155 -const TUint KSoIfGetConnectionInfo = 0xf001; // Retrieve IAP and NID information
1.156 -
1.157 -/**
1.158 -@internalComponent
1.159 -*/
1.160 -const TUint KMaxInterfaceName=32;
1.161 -
1.162 -/**
1.163 - * Holds the name of a network interface.
1.164 - *
1.165 - * This is used in TSoIfInfo.
1.166 - *
1.167 - * @internalTechnology
1.168 - */
1.169 -typedef TBuf<KMaxInterfaceName> TInterfaceName;
1.170 -
1.171 -class TInetIfConfig
1.172 -// Information which allows IP to enter route table entries
1.173 -/**
1.174 - * Describes the IP routing options for a network interface.
1.175 - *
1.176 - * It is used in TSoInetIfConfig.
1.177 - *
1.178 - * @internalComponent
1.179 - */
1.180 - {
1.181 -public:
1.182 - /** Interface IP address. */
1.183 - TInetAddr iAddress;
1.184 - /** IP netmask. */
1.185 - TInetAddr iNetMask;
1.186 - /** IP broadcast address. */
1.187 - TInetAddr iBrdAddr;
1.188 - /** IP default gateway or peer address (if known). */
1.189 - TInetAddr iDefGate;
1.190 - /** IP primary name server (if any). */
1.191 - TInetAddr iNameSer1;
1.192 - /** IP secondary name server (if any). */
1.193 - TInetAddr iNameSer2;
1.194 - };
1.195 -
1.196 -class TSoIfInfo
1.197 -// Socket option structure for KSoIfInfo
1.198 -/**
1.199 - * Current network interface operation parameters.
1.200 - *
1.201 - * It is returned by RSocket::GetOpt(), when that function is called with anOptionLevel
1.202 - * set to KSOLInterface and anOptionName set to KSoIfInfo.
1.203 - *
1.204 - * @internalTechnology
1.205 - */
1.206 - {
1.207 -public:
1.208 - /** Feature flags. Possible values are defined in in_iface.h. */
1.209 - TUint iFeatures; // Feature flags
1.210 - /** Maximum transmission unit. */
1.211 - TInt iMtu; // Max frame size
1.212 - /** An approximation of the interface speed in Kbps. */
1.213 - TInt iSpeedMetric; // Indication of performance, approx to Kbps
1.214 - /** Interface protocol name, ipcp::\<port\>. */
1.215 - TInterfaceName iName;
1.216 - };
1.217 -
1.218 -class TSoIfHardwareAddr
1.219 -// Socket option structure for KSoIfHardwareAddr
1.220 -/**
1.221 - * An interface's local hardware address.
1.222 - *
1.223 - * This is obtained using KSoIfHardwareAddr.
1.224 - *
1.225 - * @internalComponent
1.226 - */
1.227 - {
1.228 -public:
1.229 - /** Local hardware address. */
1.230 - TSockAddr iHardwareAddr;
1.231 - };
1.232 -
1.233 -class TSoIfConfigBase
1.234 -/**
1.235 - * Base class for TSoInetIfConfig, which simply identifies the protocol family
1.236 - * using the interface.
1.237 - *
1.238 - * @internalComponent
1.239 - */
1.240 - {
1.241 -public:
1.242 - /** The protocol family, e.g. KAfInet. */
1.243 - TUint iFamily;
1.244 - };
1.245 -
1.246 -class TSoInetIfConfig : public TSoIfConfigBase
1.247 -/**
1.248 - * Describes the current interface routing configuration.
1.249 - *
1.250 - * It is returned by RSocket::GetOpt(), when this function is called with anOptionLevel
1.251 - * set to KSOLInterface and anOptionName set to KSoIfConfig.
1.252 - *
1.253 - * @internalTechnology
1.254 - */
1.255 - {
1.256 -public:
1.257 - /** Current interface routing configuration parameters. */
1.258 - TInetIfConfig iConfig;
1.259 - };
1.260 -
1.261 -enum TIfProgressNotification
1.262 -/**
1.263 - * @internalAll
1.264 - *
1.265 - * @deprecated v7.0s - maintained for compatibility with v6.1
1.266 - *
1.267 - * New software should use the progress ranges defined in nifvar.h
1.268 - *
1.269 - */
1.270 - {
1.271 - EIfProgressLinkUp = KMinInterfaceProgress,
1.272 - EIfProgressLinkDown,
1.273 - EIfProgressAuthenticationComplete
1.274 - };
1.275 -
1.276 -/**
1.277 -@internalAll
1.278 -*/
1.279 -const TInt KErrIfAuthenticationFailure = -3050;
1.280 -
1.281 -/**
1.282 -@internalComponent
1.283 -*/
1.284 -const TInt KErrIfAuthNotSecure = -3051;
1.285 -
1.286 -/**
1.287 -@internalComponent
1.288 -*/
1.289 -const TInt KErrIfAccountDisabled = -3052;
1.290 -
1.291 -/**
1.292 -@internalComponent
1.293 -*/
1.294 -const TInt KErrIfRestrictedLogonHours = -3053;
1.295 -
1.296 -/**
1.297 -@internalComponent
1.298 -*/
1.299 -const TInt KErrIfPasswdExpired = -3054;
1.300 -
1.301 -/**
1.302 -@internalComponent
1.303 -*/
1.304 -const TInt KErrIfNoDialInPermission = -3055;
1.305 -
1.306 -/**
1.307 -@internalComponent
1.308 -*/
1.309 -const TInt KErrIfChangingPassword = -3056;
1.310 -
1.311 -/**
1.312 -@internalComponent
1.313 -*/
1.314 -const TInt KErrIfCallbackNotAcceptable = -3057;
1.315 -
1.316 -/**
1.317 -@internalComponent
1.318 -*/
1.319 -const TInt KErrIfDNSNotFound = -3058;
1.320 -
1.321 -/**
1.322 -@internalComponent
1.323 -*/
1.324 -const TInt KErrIfLRDBadLine = -3059;
1.325 -
1.326 -#endif // __IN_IFACE_H__