PF_PACKET and Orinoco card

#MAI THI PHUONG THAO# pinegrass at pmail.ntu.edu.sg
Sat Mar 8 01:31:12 EST 2003


Hi, I am currently writing a program to send Raw packet( 802.3 compliance) using PF_PACKET with SOCK_RAW option. However, in using sendto() function, some strange thing happened. If I declare my data as 
char message[60]
and contruct my message as a 802.3 frame
then I call: sendto(packet_socket, message, sizeof(message), 0, (struct sockaddr *) &recv_addr, tolen)
the sendto function return normal, send out 60 bytes, however. if I check: /proc/net/dev, I have the number of packet that I have transmitted (in this case 1) at transmit/errs column. 0 at transmit/packet column
If then I declare: char *message
contruct my message
and call: sendto(packet_socket, message, sizeof(message), 0, (struct sockaddr *) &recv_addr, tolen)
the sendto function also return sucessful transmit, and /proc/net/dev then return 1 packet is transmit and no errs. However I receiver sde, I received 0 length message
Any ideas why? I am using kernel version: 2.4.18-14 and trying to send and receive data through Orinoco card (with Orinoco driver build in)
Thank you for your time
Thao
 


More information about the wireless mailing list