CProtocolInet6Base Class Reference

class CProtocolInet6Base : public CProtocolInet6Binder
Public Member Functions
CProtocolInet6Base ()
~CProtocolInet6Base ()
void BindL ( CProtocolBase *, TUint )
void BindProvider ( CProviderInet6Base *)
void DecSAPs ()
void Error ( TInt , CProtocolBase *)
void IncSAPs ()
void InitL ( TDesC &)
MInterfaceManager * Interfacer ()
CProviderInet6Base * LocateProvider ( TUint )
void QueueBindProvider ( CProviderInet6Base *)
TUint SapCount ()
void StartL ()
void Unbind ( CProtocolBase *, TUint )
void UnbindProvider ( CProviderInet6Base *)
Protected Member Functions
TUint ProviderHashKey ( TUint )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CProtocolBase::CProtocolBase()
CProtocolBase::CanClose()
CProtocolBase::Close()
CProtocolBase::CloseNow()
CProtocolBase::GetOption(TUint,TUint,TDes8 &,CProtocolBase *)
CProtocolBase::Identify(TServerProtocolDesc *)const
CProtocolBase::NewSAPL(TUint)
CProtocolBase::Open()
CProtocolBase::Process(RMBufChain &,CProtocolBase *)
CProtocolBase::Process(TDes8 &,TSockAddr *,TSockAddr *,CProtocolBase *)
CProtocolBase::ProtocolFamily()
CProtocolBase::RefCount()const
CProtocolBase::Send(RMBufChain &,CProtocolBase *)
CProtocolBase::Send(TDes8 &,TSockAddr *,TSockAddr *,CProtocolBase *)
CProtocolBase::SetOption(TUint,TUint,const TDesC8 &,CProtocolBase *)
CProtocolBase::StartSending(CProtocolBase *)
CProtocolBase::Tag()
CProtocolBase::~CProtocolBase()
CProtocolInet6Binder::BindToL(CProtocolBase *)
CProtocolInet6Binder::DoBindTo(CProtocolBase *)
CProtocolInet6Binder::NetworkService()const
CProtocolInet6Binder::NewHostResolverL()
CProtocolInet6Binder::NewNetDatabaseL()
CProtocolInet6Binder::NewServiceResolverL()
CProtocolInet6Binder::~CProtocolInet6Binder()
Protected Attributes
TUint iSapCount
Private Attributes
CProviderInet6Base * iSAP
Inherited Attributes
CProtocolInet6Binder::iNetwork

Constructor & Destructor Documentation

CProtocolInet6Base()

CProtocolInet6Base ( )

~CProtocolInet6Base()

~CProtocolInet6Base ( ) [virtual]

Member Functions Documentation

BindL(CProtocolBase *, TUint)

void BindL ( CProtocolBase * aProtocol,
TUint aId
) [virtual]

Parameters

CProtocolBase * aProtocol
TUint aId

BindProvider(CProviderInet6Base *)

void BindProvider ( CProviderInet6Base * aSAP ) [virtual]

Parameters

CProviderInet6Base * aSAP

DecSAPs()

void DecSAPs ( )

Error(TInt, CProtocolBase *)

void Error ( TInt anError,
CProtocolBase * aSourceProtocol = NULL
) [virtual]

Parameters

TInt anError
CProtocolBase * aSourceProtocol = NULL

IncSAPs()

void IncSAPs ( )

InitL(TDesC &)

void InitL ( TDesC & aTag ) [virtual]

Parameters

TDesC & aTag

Interfacer()

MInterfaceManager * Interfacer ( ) const [inline]

LocateProvider(TUint)

CProviderInet6Base * LocateProvider ( TUint aPort ) [virtual]

Parameters

TUint aPort

ProviderHashKey(TUint)

TUint ProviderHashKey ( TUint aPort ) [protected, inline, virtual]

Parameters

TUint aPort

QueueBindProvider(CProviderInet6Base *)

void QueueBindProvider ( CProviderInet6Base * aSAP ) [virtual]

Parameters

CProviderInet6Base * aSAP

SapCount()

TUint SapCount ( ) const [inline]

StartL()

void StartL ( ) [virtual]

Unbind(CProtocolBase *, TUint)

void Unbind ( CProtocolBase * aProtocol,
TUint aId = 0
) [virtual]

Unbinds from a specified protocol.

Unbind is a reverse of the BindL() . Unbind does nothing if there is no matching bind. It is safe to call Unbind "just to be sure". The rationale for Unbind is explained using the UDP protocol as an example.

When UDP protocol is active, it needs to receive IP packets with protocol=17 from the IP layer. To achieve this, the UDP will call IP protocol instance with BindL(UDP, 17). This registers UDP instance as a receiver of the UDP packets. IP records the UDP instance pointer and uses UDP-> Process() method to pass received packets to the UDP protocol instance.

Before UDP protocol instance is destroyed, the UDP registration in IP layer must be cancelled. Otherwise the IP layer would be using a dangling pointer after UDP destruction. The registration is cancelled by use of Unbind.

The similar reasoning applies to any hook that registers with the IP layer with BindL.

Parameters

CProtocolBase * aProtocol Protocol instance being unregistered.
TUint aId = 0 Identify the binding that is to be unregistered. The exact interpretation of this depends on protocol implementation, but generally, the aId value used in BindL can be used to unregister that specific binding. In addition to that, the TCPIP IP layer supports generic unbind: if aId is ZERO, then all bindings made by aProtocol are canceled and cleared.

UnbindProvider(CProviderInet6Base *)

void UnbindProvider ( CProviderInet6Base * aSAP ) [virtual]

Parameters

CProviderInet6Base * aSAP

Member Data Documentation

CProviderInet6Base * iSAP

CProviderInet6Base * iSAP [private]

TUint iSapCount

TUint iSapCount [protected]