MPacketContext Class Reference

class MPacketContext : public MInetBase

Provides a packet context as a number of (key, value) pairs.

The rules for construction of the key are:
  • The low eight bits of the key contain always the protocol number (extension header) being implemented by the hook.

  • If the protocol is destination option or hop-by-hop option, the implemented option types are communicated to the default handler by adding a non-zero value to the packet context with a key computed as "(option-type << 8) | protocol".

Since
v7.0

Inherits from

Member Functions Documentation

HookValue(const TUint32)

TUint32 HookValue ( const TUint32 aId ) const [pure virtual]

Gets the value associated with the specified key.

Return the current value associated with aId. If aId does not exist, ZERO is returned [=> there is no way to differentiate between non-existing value and a value that is explicitly set to zero. Implementation may interpret setting value to ZERO as request to delete the association, if it exists].

Parameters

const TUint32 aId Key

SetHookValue(const TUint32, const TUint32)

TInt SetHookValue ( const TUint32 aId,
const TUint32 aValue
) [pure virtual]

Sets a (key,value) pair.

If a setting already exists for the key, the value is just replaced.

Parameters

const TUint32 aId Key
const TUint32 aValue Value associated with the key