Vijay Thirumalai wrote:
> Hi Alan and netters...
> Based on the mail i sent before about tapping the network , i
> attempted to create a socket with AF_PACKET, SOCK_RAW (bcos SOCK_PACKET
> is obsolete) and then attempt to BIND it to the interface....thats where
> the problem is...It does not bind itself to the interface...and i see a
> couple of mails in the archive about this the end of last week ...Could
> someone give me pointers as to why this happens...or if someone has an
> application that uses this.it would be of great help.
> Thanks a lot
> -VJ
>
It does bind. Look in linux/net/packet/af_packet.c (I think that's right).
When you bind it to an interface index & protocol, that is coppied into the socket
struct
in the kernel, then when you use sendto, w/out specifying a 'to' sockaddr_ll, then
the kernel will use the previously bound values...
At least that was how I interpretted it..and it seemed to be working for me.
Ben
--
Ben Greear [EMAIL PROTECTED] Pager: 202-2717
(623) 581 4980 "More weight!" -- _The Crucible._
http://hydrogen:8080/home/greearb/public_html/index.html
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]