netdev
[Top] [All Lists]

any problems using read() syscall to read from raw socket?

To: netdev@xxxxxxxxxxx
Subject: any problems using read() syscall to read from raw socket?
From: Chris Friesen <cfriesen@xxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Mar 2002 12:32:53 -0500
Sender: owner-netdev@xxxxxxxxxxx
I'm reading from a raw socket, and I'm trying to decide what syscall to use.  In
increasing order of speed, we have:

read()
recv()
recvfrom()

The options in recv and recvfrom are set to zero, and the address info in
recvfrom is set to NULL.

Given this, are there any problems using read() to get the packets? It seems to
work fine, but I wanted to double-check.

Thanks,

Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@xxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • any problems using read() syscall to read from raw socket?, Chris Friesen <=