Re: [RTnet-developers] Socket RAW
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <jan...@we...> - 2006-08-24 16:38:20
|
Jorge Almeida wrote:
> Jan,
>=20
[Even /me is sometimes busy - not with answering mails. ;)]
>=20
> I've looked in the af_packet.c file and i arrive to some conclusions fo=
r the RAW packet implementation, but i have some doubts regardind the rts=
kb struct.
>=20
> Especialy in:
>=20
> rtsckb.h - line 194
> /* link layer */
> union
> {
> struct ethhdr *ethernet;
> unsigned char *raw;
> } mac;
>=20
> i know that "struct ethhdr *ethernet; " keeps the source and destina=
tion mac address of the frame, but wath values "unsigned char *raw;" ca=
n have?
It's a union, so you could also address the MAC as plain bytes this way.
>=20
>=20
> And another question,
> Does not existe any field in the rtskb struct that has all the Ethernet=
frame inside (Destination Address, Source Address, Protocol, Data)? In t=
he driver everything is divided right?
mac.raw?
>=20
>=20
> One thing that i'm thinking is reconstruct a buffer with all this infor=
mation and return it to the user. This way the user has all the Ethernet =
frame in user space and can do anything he wants.
Please don't invent something new. Try to follow the existing
interfaces, maybe only skipping (yet) unneeded features.
Jan
|