🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15697

Re: Raw sockets with winsock

#15697
From: Hans Galema
Date: Mon, 16 Jun 2003 11:02
34 lines
2551 bytes
Kjartan T. Hjorvar wrote:

Please wrap your lines.

> The IP_HDRINCL option allows me to generate my own IP-header (the 20 bytes). The packet is sent to another machine on the net as defined by the header (last four bytes). The packet (01234567890123456789) is obviously not valid but should be sent regardless, any other machine seeing it must discard it immediatly.

By hand:

> The IP_HDRINCL option allows me to generate my own IP-header 
> (the 20 bytes). The packet is sent to another machine on the 
 > net as defined by the header (last four bytes). The packet
> (01234567890123456789) is obviously not valid but should be sent
 > regardless, any other machine seeing it must discard it immediatly.

Don't understand much of this. First you state that the IP header
is 20 bytes. Then that they are the last four bytes. (Are they "6789" ? )
The 20 bytes would be the packet too. See that you try to send an
integer int on = 1; of 4 buytes.

> The expected outcome was the result 0 in the first and second line, 
 > 20 in the third and 0 in the last.

Sorry, about which lines are you speaking ?

I would think that the expected outcome would be "01234567890123456789".
What comes out ?

 > This implies that the opening of
 > the socket and setting of the IP_HDRINCL option were successful (first two)
 > and 20 bytes were sent (last two).

???? first two ? last two ?

Hans.
Technical Details
Message-ID: <3eeda3b6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3eebcb3d$1@newsgroups.borland.com> <3eec0f4d@newsgroups.borland.com> <3eed9e62$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,37b140341e7bf2c2
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-16 04:16:48 PST
Date: Mon, 16 Jun 2003 13:02:27 +0200
From: Hans Galema <j.m.galema.dontusethis@maartens.nl>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425
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>
In-Reply-To: <3eed9e62$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.108.11
Message-ID: <3eeda3b6@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1055761334 129.125.108.11 (16 Jun 2003 04:02:14 -0700)
Lines: 35
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail