Wireshark mailing list archives

regarding recv() in mmap calls


From: abhinav narain <abhinavnarain10 () gmail com>
Date: Wed, 7 Nov 2012 13:26:14 -0500

hi,
  I wanted to know why is MSG_PEEK used in the recv() call in mmap code and
not recvfrom() with MSG_TRUNC flag.
The reason i am asking is .. because I see my code takes a lot of CPU which
is due to more looping, I suppose.
The flag description for MSG_PEEK shows it doesn't discard the bytes even
after reading from the queue.
Can someone please explain.
I would like to use recvfrom with MSG_TRUNC .. is that fine ?
-Abhinav
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: