Regarding about iovec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I have some queries about iovec. Please take a look at the following
codes:

size and len are both 52. There are 2 iov in msg_iov. 
The 1st is 16 bytes and the 2nd is 36 bytes.

memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, len);
(user->kernel)

skb_copy_datagram_iovec(skb, 0, msg->iov, 52);
(kernel->user)

The funny thing is that although I did not modify skb, the returning
msg->iov gives me a zeroed structure.
Does anyone know where did I go wrong? I actually tested this by placing
the 2nd statement directly after the 1st memcpy.
In fact, I rip the 2 lines off netlink_sendmsg and netlink_recvmsg.

Thanks for any help in advance! 
Cheers,
Jonathan


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux