Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 98 22:09:48 0100
From:      thuall <thuall@wanadoo.fr>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   pb using RAWIP socket with IP_HDRINCL option 
Message-ID:  <199803242109.WAA15348@tamaya.wanadoo.fr>

next in thread | raw e-mail | index | archive | help
Hello,

I am trying to use under FreeBSD 2.2.2 the RAW IP socket interface with IP_HDRINCL option.
The aim of this exercise is to manage at the user level the fragmentation of an ICMP packet.
My Ethernet interface has it's MTU set to 1500 bytes.
1/ What I want to do is the following :
* build an ICMP packet which length is 1000 bytes. 
* send the first half of the payload (488 bytes) in a first IP packet (with the full IP header 	constructed with MF bit set, with a self allocated ID for the IP packet, etc .....). 
* send the second half of the payload (512 bytes), in a second packet (with the full IP header 	constructed with Offset field set to 61 (488/8), with the same allocated ID for the IP packet, etc...)...

2/ What I see is the following :
* The first IP packet sent has not the MF bit set, and the Total Length of this packet is '1020 	bytes' !!.
* The second paquet is like it was supposed to be.

And if :
* If I wait some times (1 sec) between the emission of the 2 IP packets, the first (MF set, ...) and 	the second packet are like they were supposed to be.
* If I change the IP ID for the second paquet : the first paquet has it's MF set, and the both  	packets are  like they were supposed to be (unfortunately their IP ident are differents for the reassembling).


Any help would be appreciated to understand this behavior, to find a solution to my pb.
Sincerely 

Lionel

Thuall@wanadoo.fr

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803242109.WAA15348>