Re: [tcpdump-workers] regarding usage of recv calls in mmap code

2012-11-11 Thread Guy Harris
On Nov 7, 2012, at 10:28 AM, abhinav narain wrote: > 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 des

[tcpdump-workers] regarding usage of recv calls in mmap code

2012-11-11 Thread abhinav narain
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 disc