On Sat, Apr 08, 2000 at 12:32:35PM -0700, Ben Greear wrote:
> One thing that bothers me a little bit. I have 2 4-port NICs and a
> single... The single is the one I'm trying to send messages over.
> No matter which slot I put it in (there are only 3 PCI slots in the MB),
> that interface shows up as eth8. Is that normal? I thought they probed
> based on PCI slots, so that changing the slot would change the ifname it
> showed up on...
It depends on the driver.
>
> One final question.. If I create the socket like:
> int s = socket(PF_PACKET, SOCK_RAW, htons(ether_type));
>
> bind like this:
> struct sockaddr_ll myaddr;
>
> memset(&myaddr, '\0', sizeof(myaddr));
> myaddr.sll_family = AF_PACKET;
> myaddr.sll_protocol = htons(ether_type);
> myaddr.sll_ifindex = dev_idx;
>
> r = bind(s, (struct sockaddr*)(&myaddr), sizeof(myaddr));
>
> and send like this:
> r = sendto(dev_socket, msg, msg_len, 0, NULL, 0);
>
> Should I expect to see this method in af_packet.cc called?
> static int packet_sendmsg(struct socket *sock, struct msghdr *msg, int len,
> struct scm_cookie *scm)
Yes.
>
> I was expecting to see packet_sendmsg_spkt, but it is using the one above...
This one is called for (PF_INET, SOCK_PACKET) sockets
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]