move_addr_to_user
Prev | Socket Buffer Functions | Next

## Name

move_addr_to_user — copy an address to user space

## Synopsis

`int move_addr_to_user (` | void * | kaddr,
| int | klen,
| void __user * | uaddr,
| int __user * | ulen`)`;

## Arguments

`kaddr`

  kernel space address

`klen`

  length of address in kernel

`uaddr`

  user space address

`ulen`

  pointer to user length field

## Description

The value pointed to by ulen on entry is the buffer length available. This is overwritten with the buffer space used. -EINVAL is returned if an overlong buffer is specified or a negative buffer size. -EFAULT is returned if either the buffer or the length field are not accessible. After copying the data up to the limit the user specifies, the true length of the data is written over the length limit the user specified. Zero is returned for a success.

Prev | Up | Next
move_addr_to_kernel | Home | sockfd_lookup