esockapiextensions/internetsockets/inc/in6_if.h
changeset 14 b33c3d136b7e
parent 0 af10295192d8
equal deleted inserted replaced
1:a579325b79dd 14:b33c3d136b7e
    26 
    26 
    27 #ifndef __IN6_IF_H__
    27 #ifndef __IN6_IF_H__
    28 #define __IN6_IF_H__
    28 #define __IN6_IF_H__
    29 
    29 
    30 #include <e32std.h>
    30 #include <e32std.h>
    31 #include "in_iface.h"	// TSoIfInfo
    31 #include <in_sock.h>
    32 
    32 
    33 //	CNifIfBase::Control(aLevel, aName, aOption, ..)
    33 //	CNifIfBase::Control(aLevel, aName, aOption, ..)
    34 //  aLevel is KSOLInterface defined in in_iface.h in standard EPOC
    34 //  aLevel is KSOLInterface defined in in_iface.h in standard EPOC
    35 
    35 
    36 //	IPv6 specific aName constants and aOption structures
    36 //	IPv6 specific aName constants and aOption structures
    80 * @since v7.0
    80 * @since v7.0
    81 * @publishedAll
    81 * @publishedAll
    82 * @released
    82 * @released
    83 */
    83 */
    84 const TUint KIfNeedsND	= 0x00000100;
    84 const TUint KIfNeedsND	= 0x00000100;
       
    85 
       
    86 const TUint KMaxInterfaceName=32;
       
    87 
       
    88 /** 
       
    89  * Holds the name of a network interface. 
       
    90  * 
       
    91  * This is used in TSoIfInfo. 
       
    92  * 
       
    93  */
       
    94 typedef TBuf<KMaxInterfaceName> TInterfaceName;
       
    95 
       
    96 class TSoIfInfo
       
    97 // Socket option structure for KSoIfInfo
       
    98 /** 
       
    99  * Current network interface operation parameters.
       
   100  * 
       
   101  * It is returned by RSocket::GetOpt(), when that function is called with anOptionLevel 
       
   102  * set to KSOLInterface and anOptionName set to KSoIfInfo. 
       
   103  *
       
   104  */
       
   105 	{
       
   106 public:
       
   107 	/** Feature flags. Possible values are defined in in_iface.h. */
       
   108 	TUint iFeatures;		// Feature flags
       
   109 	/** Maximum transmission unit. */
       
   110 	TInt iMtu;				// Max frame size
       
   111 	/** An approximation of the interface speed in Kbps. */
       
   112 	TInt iSpeedMetric;		// Indication of performance, approx to Kbps
       
   113 	/** Interface protocol name, ipcp::\<port\>. */
       
   114 	TInterfaceName iName;
       
   115 	};
       
   116 
    85 
   117 
    86 class TSoIfInfo6 : public TSoIfInfo		// aOption when aName == KSoIfInfo
   118 class TSoIfInfo6 : public TSoIfInfo		// aOption when aName == KSoIfInfo
    87 	/**
   119 	/**
    88 	* Extends the TSoIfInfo for the receive MTU.
   120 	* Extends the TSoIfInfo for the receive MTU.
    89 	*
   121 	*
   108 	*/
   140 	*/
   109 	{
   141 	{
   110 public:
   142 public:
   111 	/** Maximum transmission unit for receiving. */
   143 	/** Maximum transmission unit for receiving. */
   112 	TInt iRMtu;
   144 	TInt iRMtu;
       
   145 	};
       
   146 
       
   147 class TSoIfConfigBase
       
   148 /** 
       
   149  * Base class for TSoInetIfConfig, which simply identifies the protocol family 
       
   150  * using the interface. 
       
   151  *
       
   152  * @internalComponent
       
   153  */
       
   154 	{
       
   155 public:
       
   156 	/** The protocol family, e.g. KAfInet. */
       
   157 	TUint iFamily;
   113 	};
   158 	};
   114 
   159 
   115 class TSoInet6IfConfig : public TSoIfConfigBase
   160 class TSoInet6IfConfig : public TSoIfConfigBase
   116 	/**
   161 	/**
   117 	* IPv6 interface configuration.
   162 	* IPv6 interface configuration.