raw packets

[email protected] Mon, 24 May 2004 10:02:29 +0530
Newsgroups gmane.comp.security.libnet
Message-ID <[email protected]>



Hi,

      I had this doubt about raw packets :
                              suppose I inject a raw packet into ip using
libnet_write, the packet was made using libnet_autobuild_ipv4. now once I
run that .out file, it says "written 20 bytes to the wire, check the wire".
     Whats does this mean, writing raw packets to the wire, iirespective of
   what that means, what actually happens (as far as i know) is that
   writing raw packet cause the packet to be handed to ip, and not directly
   written to the wire (i.e not directly written to the ethernet interface,
   supposing the link level protocol is ethernet.). Now, my doubt is what
   path does this packet take?, once ip gets this packet a routing decision
   is made for this and depending on the routing decision the packet either
   goes out of the machine(to the wire) or to the applications, if it was
   meant for a particular application on the same machine. Am I right here
   ?
     Also, when this packet is wriiten to IP the kernel surely allocates an
   skbuff, so what does skb->sock->type point to for such packets, should
   be SOCK_RAW for raw packets. Am i right ?

Pls correct me if I am wrong.

thanks
Amit