Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IAsn1_2::decodeIPAddr_2 ( P6UINT8 pBuffer,
P6UINT32  bufSize,
P6UINT32 pIndex,
P6UINT32 pIpAddress 
)
pure virtual

The IP address value uses an application specific tag but is encoded/decoded as a 4 byte OCTET STRING.

That is there is no universal tag or format for this data type. Each byte of the ipAddress parameter represents one of the 4 numbers that comprise an IP address. Refer to the encodeIPAddr function above for details.

NOTE, that "pBuffer[ index ]" MUST point to the start of the length field of the IP address. That is the tag associated with the ASN.1 type should have already been processed by the caller and skipped. This function does not understand BER tags, but assumes that the caller does and has positioned pBuffer[ index ] to decode the length and value of the ip address.

Parameters
pBuffer[ in ] Byte array containg the ASN.1 encoded data to decode
bufSize[ in ] the amount of data (in bytes) pointed to by pBuffer
pIndex[ in ] current offset into pBuffer, should be pointing to the length field of an integer tagged value [ out ] this index moves down the pBuffer data as the data is decoded
pIpAddress[ out ] the extracted 32 bit IP address in network byte order.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eInvalidArgOne of the parameters is NULL.
P6R::eFormatErrorCould not properly decode type into IP address.
errors from decodeLength()This function calls decodeLength.