🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3566

Send socket raw on winXP (visual c++)

#3566
From: ThrillseekaMiguel
Date: Thu, 01 Sep 2005 21:19
39 lines
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
Technical Details
Message-ID: <1125609567.624733.178260@o13g2000cwo.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,1143b2088cc5da76,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail
From: ThrillseekaMiguel@gmail.com
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Send socket raw on winXP (visual c++)
Date: 1 Sep 2005 14:19:27 -0700
Organization: http://groups.google.com
Lines: 40
Message-ID: <1125609567.624733.178260@o13g2000cwo.googlegroups.com>
NNTP-Posting-Host: 81.203.208.38
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1125609572 21311 127.0.0.1 (1 Sep 2005 21:19:32 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 1 Sep 2005 21:19:32 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.8) Gecko/20050511 Firefox/1.0.4,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: o13g2000cwo.googlegroups.com; posting-host=81.203.208.38;
   posting-account=_GqiZgwAAAAKVUq46YHNG2r1Z-RuaiVZ