Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages
Started by ThrillseekaMiguel
Thu, 01 Sep 2005 21:19
Send socket raw on winXP (visual c++)
Author: ThrillseekaMiguel
Date: Thu, 01 Sep 2005 21:19
Date: Thu, 01 Sep 2005 21:19
39 lines
2209 bytes
2209 bytes
I've a problem...
First, sorry for my bad english...
I will send a raw packet with sockets, with winsock2.h
...
s = socket( AF_INET, SOCK_RAW, IPPROTO_RAW);//htons(ETH_P_ALL));
...
socket_address.sin_addr.s_addr = inet_addr("10.10.1.69");
socket_address.sin_family = PF_INET;
socket_address.sin_port = htons(1);
...
int sent = sendto(s, (char *)buffer, 26 + 14 + 8, NULL, (sockaddr
*)&socket_address, sizeof(socket_address));
...
but when I analize (with ethereal) the datagram that I send, the
datagram include a header that I don't want.
I send:
00 0e 83 05 95 ... 01 04
and continue with the datagram that i create [ (char*) buffer ]
00 05 c2 12 6b 45 00 02 44 4a 29 02 00 22 aa aa 03 00 13 ...
----------------- ----------------- ----- ----------------------
mac dest mac source type SNAP + Data
I don't want send this header that the system add automaticly.
I've installed the driver winpcap1.3, but the examples for send packet
not executes.. 8| I don't know.
Anybody can help me for anything of this problem...
Thanks...
Miki
Re: Send socket raw on winXP (visual c++)
Author: ThrillseekaMiguel
Date: Thu, 01 Sep 2005 21:30
Date: Thu, 01 Sep 2005 21:30
1 lines
1277 bytes
1277 bytes
sorry, I use winpcap 3.1, not 1.3 :P
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads