Hi, all!
        
        I've a little trouble with packet socket.
        Creating socket like this:
        
                ps=socket(PF_PACKET,SOCK_RAW,ETH_P_ALL);
                
        Evrything is ok still (ps>0). Then I want to bind it so that it only
receive packets directed to me. I'm doing:

                struct sockaddr_ll q;
                q.sll_family=AF_PACKET;
                q.sll_ifindex=0;
                q.sll_protocol=htons(ETH_P_ALL);
                q.sll_hatype=ARPHRD_ETHER;
                q.sll_pkttype=PACKET_HOST;
                
                bind(rs,(struct sockaddr *)&q,sizeof(struct sockaddr_ll));
                
                
        Binding also returns success, but when i monitor received from this 
socket packets, i see that it also receives broadcasts. And when device in
promisc-mode it receives all packets. 

        The question is: What then means (and affects) sockaddr_ll.sll_pkttype?
        
        
        Thanks a lot.
                
P.S. Kernel is 2.2.14
-- 
                    Good luck!
                                         Yuri G. Polyanski
  ICQ #52224443      mailto: [EMAIL PROTECTED]       IRC Dalnet: Kalhown         
                                                     Mar 8

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to