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) |
Protected Attributes | |
---|---|
TUint | iSapCount |
Private Attributes | |
---|---|
CProviderInet6Base * | iSAP |
Inherited Attributes | |
---|---|
CProtocolInet6Binder::iNetwork |
void | BindL | ( | CProtocolBase * | aProtocol, |
TUint | aId | |||
) | [virtual] |
CProtocolBase * aProtocol | |
TUint aId |
void | BindProvider | ( | CProviderInet6Base * | aSAP | ) | [virtual] |
CProviderInet6Base * aSAP |
void | Error | ( | TInt | anError, |
CProtocolBase * | aSourceProtocol = NULL | |||
) | [virtual] |
TInt anError | |
CProtocolBase * aSourceProtocol = NULL |
TUint | ProviderHashKey | ( | TUint | aPort | ) | [protected, inline, virtual] |
TUint aPort |
void | QueueBindProvider | ( | CProviderInet6Base * | aSAP | ) | [virtual] |
CProviderInet6Base * aSAP |
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.
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. |
void | UnbindProvider | ( | CProviderInet6Base * | aSAP | ) | [virtual] |
CProviderInet6Base * aSAP |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.