netmsgs/libnetmsgs/nmLibPack.c
int nmUnpackP32(byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian)
{
  static size_t fvalLen = NMFVAL_LEN_P32;     // message field value length

  ulong_t  *pluVal;   // longs are same size as pointers on 32/64 bit machines
  uint_t    uP32;

  _NM_CHK_MEM(bufSize, fvalLen);
  
  pluVal = (ulong_t *)pVal;

  UNPACKNATIVE(buf, &uP32);

  *pluVal = (ulong_t)uP32;

  return (int)fvalLen;

}
/*!
 * \brief Unpack a 32-bit pointer from the message buffer.
 *
 * If the machine architecture has 64-bit pointers, then only the 
 * LSB 4 bytes are packed.
 *
 * \note Pointer is always unpacked in native byte order.
 *
 * \copydoc doc_params_unpack_std
 * \copydoc doc_return_unpack_std 
 */
\brief Unpack a 32-bit pointer from the message buffer.
If the machine architecture has 64-bit pointers, then only the
LSB 4 bytes are packed.

\note Pointer is always unpacked in native byte order.


\ brief Unpack a 32 - bit pointer from the message buffer . If the machine architecture has 64 - bit pointers then only the LSB 4 bytes are packed . \ note Pointer is always unpacked in native byte order .
int nmUnpackP32(byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian)
{
  static size_t fvalLen = NMFVAL_LEN_P32;     
  ulong_t  *pluVal;   
  uint_t    uP32;
  _NM_CHK_MEM(bufSize, fvalLen);
  pluVal = (ulong_t *)pVal;
  UNPACKNATIVE(buf, &uP32);
  *pluVal = (ulong_t)uP32;
  return (int)fvalLen;
}
int nmUnpackP32 ( byte_t buf [ ] , size_t bufSize , void * pVal , NMEndian_T eEndian ) { static size_t fvalLen = NMFVAL_LEN_P32 ; ulong_t * pluVal ; uint_t uP32 ; _NM_CHK_MEM ( bufSize , fvalLen ) ; pluVal = ( ulong_t * ) pVal ; UNPACKNATIVE ( buf , & uP32 ) ; * pluVal = ( ulong_t ) uP32 ; return ( int ) fvalLen ; }
\brief Unpack a 32-bit pointer from the message buffer.
\ brief Unpack a 32 - bit pointer from the message buffer .
// message field value length // longs are same size as pointers on 32/64 bit machines