Re: About the function "recvfrom" and NIC

Posted by jadewang on 2012/3/27 13:52:05
(⊙o⊙)…
I mean the NIC(Network Interface Card) is turned off after running this program .I have to use the command

ifconfig eth1 up


to turn on the NIC so I can catch packets.I debug the program using gdb and I find that after this sentence

n=recvfrom(sock,buffer,2048,0,NULL,NULL);


the NIC is off.

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=58&topic_id=36585&post_id=158719