linux-newbie.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Doubt related to using iovec/kvec for kernel_sendmsg()
@ 2017-01-21  8:53 Suraj Choudhari
  0 siblings, 0 replies; only message in thread
From: Suraj Choudhari @ 2017-01-21  8:53 UTC (permalink / raw)
  To: linux-newbie

Hi,

I have few doubts related to iovec & kvec structures, in particular
related to using these strucutes for sending the data over the socket
using kernel_sendmsg()/sock_sendmsg().

Doubts -
1) Can we pass iovec to kernel_sendmsg() instead of kvecs?  Is it
recommended to use kvec instead of iovec ?

2) What are differences between kvec vs iovec ?
From the definition of these structures, I see that iovec has _user
type, so it may point to a user buffer.  Are there some other
differences between kvec or iovec ?

3) When shall we use kvec instead of iovec ?

4) For iterating the iovecs, I could find one macro -- 'iov_for_each'
which uses iov_iterator.
Is there similar easy way to iterate the kvec ?

Thanks & Regards,
Suraj
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-21  8:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-21  8:53 Doubt related to using iovec/kvec for kernel_sendmsg() Suraj Choudhari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).