Logo Search packages:      
Sourcecode: libnl version File versions  Download package

int nla_memcpy ( void *  dest,
struct nlattr src,
int  count 
)

Copy a netlink attribute into another memory area

  • dest where to copy to memcpy
  • src netlink attribute to copy from
  • count size of the destination area
Note: The number of bytes copied is limited by the length of attribute's payload. memcpy

Returns:
the number of bytes copied.

Definition at line 376 of file attr.c.

References nla_data(), and nla_len().

Referenced by nla_get_u64().

{
      int minlen;

      if (!src)
            return 0;
      
      minlen = min_t(int, count, nla_len(src));
      memcpy(dest, nla_data(src), minlen);

      return minlen;
}


Generated by  Doxygen 1.6.0   Back to index