On Thu, 31 Aug 2000, Alan Cox wrote:
> > What I still don't understand is how the network layer will pass the
> > request directly to the driver _without_ goind through the INET (IP)
> > layer ... Do you know of any src code that I could use as a reference??
> > Src code that does the "request passing" would be good too ... :)
>
> AF_PACKET sockets allocate an sk_buff, copy the data into it and call
> dev_queue_xmit() to hand the packet as is to the driver
Ok, so please comment on the description below:
- Userspace:
sd = socket(AF_PACKET, SOCK_RAW, 0); (Is this correct??)
bind(how do I bind this socket to the interface, if I don't have
an address?? Can I just make one up??);
send(sd, data, len);
- Kernel:
"send" makes kernel call dev_queue_xmit(), which will call the
driver's hard_start_xmit function.
Questions:
- Do I need to bring the interface up with ifconfig before being able to
do this?? My question is because ifconfig doesn't have a "raw mode"
address family ...
- Who opens the interface, if not ifconfig??
Sorry for my dumb questions, and thanks for your help!!
Later,
Ivan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:27 EST