Article View: borland.public.cppbuilder.nativeapi
Article #15708Re: Raw sockets with winsock
From: "Kjartan T. Hjörvar"
Date: Mon, 16 Jun 2003 19:45
Date: Mon, 16 Jun 2003 19:45
19 lines
1871 bytes
1871 bytes
Hi
> I would start with a real valid header including a
> real valid destination address.
I have done that, the code below generates a vali� IP header, insert it
instead of the sendto line in the original code
unsigned char message[20] =
{0x45,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x10,0x11,0x15,0x92,0xc0,0xa8,0x00,0x05,0xc0,0xa8,0x00,0x06};
char message2[20];
memcpy(message2, message, 20);
int sentbytes = sendto(s, message2, 20, 0, (struct sockaddr *)&dest,
sizeof(dest));
This generates the same errors on the builder but works fine on visual c
Kjartan T. Hjorvar
kjartant@simnet.is
Technical Details
Message-ID:
<3eee1e43$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3eebcb3d$1@newsgroups.borland.com> <3eec0f4d@newsgroups.borland.com> <3eed9e62$1@newsgroups.borland.com> <3eeda3b6@newsgroups.borland.com> <3eedc72b$1@newsgroups.borland.com> <3eedc991$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,37b140341e7bf2c2 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-16 12:53:58 PST Date: Mon, 16 Jun 2003 19:45:12 +0000 From: "Kjartan T. Hjörvar" <kjartant@simnet.is> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Raw sockets with winsock References: <3eebcb3d$1@newsgroups.borland.com> <3eec0f4d@newsgroups.borland.com> <3eed9e62$1@newsgroups.borland.com> <3eeda3b6@newsgroups.borland.com> <3eedc72b$1@newsgroups.borland.com> <3eedc991$1@newsgroups.borland.com> In-Reply-To: <3eedc991$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 212.30.210.28 Message-ID: <3eee1e43$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1055792707 212.30.210.28 (16 Jun 2003 12:45:07 -0700) Lines: 21 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail