class RMBufRecvInfo : public RMBufPktInfo |
Information for incoming packets.
This extends the packet information class to record progress of processing the received IPv4 or IPv6 packet.
The RMBufChain contains a full IPv6 (or IPv4) packet starting from the beginning. The position of the current (upper layer or extension header) is indicated by the iOffset field.
iProtocol is always the internet protocol number corresponding to the header incidated by iOffset.
iLength is the length of the FULL packet, starting from the IP header. The upper layer length (that includes the uppler layer header) is always: (iLength - iOffset) >= 0. Note that this can be ZERO!
iIcmp == 0, for normal packet
iIcmp =! 0, for ICMP error report
The addresses are always in IPv6 format. If the packet was IPv4 packet, the addresses are presented in IPv4 mapped format.
The fact that address is IPv4 mapped DOES NOT mean that the packet is IPv4. It could as well be an IPv6 packet with mapped addresses!
RMBufRecvInfo is assuming that it fits into the single RMBuf block.
Public Member Functions | |
---|---|
TInt | CheckL ( TInt ) |
Public Attributes | |
---|---|
TUint8 | iCode |
TUint8 | iIcmp |
TUint32 | iInterfaceIndex |
TInt | iOffset |
TUint16 | iOffsetIp |
TUint32 | iOriginalIndex |
TUint32 | iParameter |
TUint16 | iPrevNextHdr |
TUint8 | iType |
TUint8 | iVersion |
Inherited Attributes | |
---|---|
RMBufPktInfo::iDstAddr | |
RMBufPktInfo::iFlags | |
RMBufPktInfo::iLength | |
RMBufPktInfo::iProtocol | |
RMBufPktInfo::iSrcAddr |
TInt | CheckL | ( | TInt | aLength | ) | const [inline] |
Tests that the specified length field does not exceed the remaining space in the buffer.
Verify that there is enough data after in the packet after the iOffset octets. This simply tests whether (aLength > iLength - iOffset ), and leaves with KErrInet6ShortPacket , if true.
TInt aLength | Length to test. |
TUint8 | iCode |
ICMP Code (0..255).
This applies to both ICMPv4 and ICMPv6.
(only defined if the field iIcmp != 0)
TUint8 | iIcmp |
ICMP packet flag.
This determines the interpretation of the information fields: iType, iCode, and iParameter.
iIcmp == 0, The buffer contains normal upper layer packet, the header starting from the indicated iOffset. The values of the iType, iCode and iParameter are undefined..
iIcmp != 0, The buffer contains an ICMP error report for the upper layer protocol, the returned upper layer header starting from the indicated iOffset. The iOffsetIp indicates the start of the problem packet.
TInt | iOffset |
An offset that indicates the beginning of the current header being processed.
Inbound hooks must update this if they consume a header within the packet.
It initially points to the first header after the IP header. Offset to the header being processed.
TUint16 | iOffsetIp |
Offset to the related IP header.
This is usually zero, but is non-zero for ICMP error reports, and could be non-zero for tunneled packets.
TUint32 | iParameter |
The last 32 bits from the ICMP header.
(only defined if the field iIcmp != 0)
TUint16 | iPrevNextHdr |
Offset of the previous Next Header field.
If a hook consumes an extension header and advances iOffset to the next header, it must also set this to point to the Next Header field of the former header.
This is initialized to refer the next header field of the IP header.
This can be used by header handlers which remove the header from the packet. For example, IPSEC does this for AH and ESP headers. IPSEC must be able to correct the protocol/next header field of the previous header.
TUint8 | iType |
ICMP Type (0..255).
This applies to both ICMPv4 and ICMPv6.
(only defined if the field iIcmp != 0)
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.