unix - Whether UDP packets received will pass to raw sockets and whether we can print UDP header using raw sockets -
this question raw sockets. in book given received udp , tcp packets never passed raw socket , cannot read udp , tcp headers in raw sockets , read udp , tcp header should read @ "data link layer" .
i created raw socket using "sfd=socket(af_inet,sock_raw,ipproto_udp)" test whether receive udp packets not , tried print source port , destination port members of udp header. program printing out both ports i.e it's receiving udp packets , can read udp header.
i didn't understand book say's , program printing out . plzz me wrong.
i working on ubuntu os.
socket created socket(af_inet,sock_raw,ipproto_udp)
receive incoming udp packets. should notify packets not received method (see here).
Comments
Post a Comment