class RMBufHookPacket |
Extends the received packet buffer class for hook processing.
The extension provides a packet context (MPacketContext) for the duration of the hook processing.
This extension has been created to solve the following problem:
The default option header handlers need to return ICMP error message on some unimplemented options,
The basic design idea of the stack is that functionality can be dynamically added. Thus, if a dynamically loaded module adds support for some new option type, the default handler should not report error for such options.
The rules of the context use are:
While the incoming packet is processed with hooks, the IP layer maintains a packet specific context, which can store values (32 bits) associated with a key (32 bits).
The low 8 bits of the key is defined to be the protocol number of the header, and interpretation of the rest of the key bits is up to protocol/header specific definitions.
(optiontype << 8) | (protocol)
The packet context is only available during "hook processing". It is not available for upper layer prototocols!
Public Member Functions | |
---|---|
RMBufHookPacket(MPacketContext *const ) | |
TInt | HookValue(const TUint32) |
TInt | SetHookValue(const TUint32, const TUint32) |
Private Attributes | |
---|---|
MPacketContext *const | iContext |
RMBufHookPacket | ( | MPacketContext *const | aContext | ) | [inline] |
Constructor
MPacketContext *const aContext | Packet context |
TInt | HookValue | ( | const TUint32 | aId | ) | const [inline] |
Gets the value associated with the specified key.
Note: There is no way to distinquish between 'no stored value' and 'stored value = 0'.
const TUint32 aId | Key |
TInt | SetHookValue | ( | const TUint32 | aId, |
const TUint32 | aValue | |||
) | [inline] |
Sets a (key,value) pair.
If a setting already exists for the key, the value is just replaced.
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.