Search the web
Sign In
New User? Sign Up
netburner_group · NetBurner - Embedded Ethernet
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
TCP Fragmentation   Message List  
Reply | Forward Message #6220 of 6234 |
RE: [netburner_group] TCP Fragmentation

Thom,

I am not wokking on the client side. I do the netburner that send the info. My
side work's ok :) But I'm trying to change my to to help the guy that does the
client PC side.

From what I saw up to now is that is code should be changed to work with this
beavior

________________________________

From: netburner_group@yahoogroups.com on behalf of Thomas Taranowski
Sent: Thu 4/2/2009 7:03 PM
To: netburner_group@yahoogroups.com
Subject: Re: [netburner_group] TCP Fragmentation



Are you looping on the recv() call? You may not recv all of the pending data in
a single recv, as you have seen. Usually you need to do something like the
following:

int expectedDataSizeInBytes= val_grabbed_from_start_header;
//recv until all expected data has been received.
while(expectedDataSizeInBytes > 0)
dataSizeInBytes -= recv(...);
}

It's not uncommon to require more than a single recv call to get what you want.


On Thu, Apr 2, 2009 at 3:35 PM, Rheault, Denis <DRheault@...
<mailto:DRheault@...> > wrote:


The paylod already as a start header with frame lenght. So normaly the Recv
should be able to re-assemble the data if the data rx in te packet is less then
what the paylod says. Also I am stuck with the defived protocol since it's the
recv how made the requirement.

UDP would required a additionnal layer in my code to deal with packet loss but
this would take care of the segmentation problem.

Thanks
Denis

________________________________

From: netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> on behalf of Thomas Taranowski
Sent: Thu 4/2/2009 4:35 PM


To: netburner_group@yahoogroups.com <mailto:netburner_group%40yahoogroups.com>

Subject: Re: [netburner_group] TCP Fragmentation


It sounds like you want to use UDP, as your protocol is structure/datagram
oriented, and your sending packets of data around. TCP doesn't really work that
well for this type of application, as it's stream oriented. You could use a
unique termination string at the end of your packet to indicate EOT for your
data. Your recv()'r can listen for this and assemble what it's received into
your data structure. If you really need to control segmentation, you would need
to hack something into the TCP layer of the stack to control outgoing packet
segmentation in the precise manner you need.


On Thu, Apr 2, 2009 at 12:07 PM, Rheault, Denis <DRheault@...
<mailto:DRheault%40telesat.com> <mailto:DRheault@...
<mailto:DRheault%40telesat.com> > > wrote:




#1 already do this.

I thought there was a flag I could set in the TCP to stop this..

NULL could still create fragmentation, I will go with you last opinion.
Specially that there is no way for me of controlling the performance of the end
PC..

Thanks



-----Original Message-----

From: netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
[mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> > ] On Behalf Of chris ruff

Sent: Thursday, April 02, 2009 2:41 PM

To: netburner_group@yahoogroups.com <mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
Subject: RE: [netburner_group] TCP Fragmentation





Denis:

1. have you tried the trick of

writeall(fd,buf,len)

?

Have you tried punching a bunch of NULLs out after your packet to force the NB
stack to assemble and send a packet

Who is responsible for the Windows end? On the windows apps I write I have
always had to take this very problem into consideration. Basically, everybody
needs to be able to handle packet fragmentation. IMO it is essentially a
marginal hack to force some host to squeak complete packets to make other host
algorithms happy

Chris



-----Original Message-----

From: netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
[mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> > ]On Behalf Of Rheault, Denis
Sent: Thursday, April 02, 2009 2:10 PM

To: netburner_group@yahoogroups.com <mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
Subject: RE: [netburner_group] TCP Fragmentation





No, opposite.

The problem I have is that I sent fix length packet of 1224 bytes of payload.
Sometime the receiving end TCP get's full and some fragmentation happen. since
the receiving end (PC) is looking for a fix payload format in the ip frame it
can't recognize the payload data.

What I would like is a way to only send the same type of frame to the PC. For a
unknown reason the Netburner can process faster then the PC. Other thing, I am
not writing the PC application ..

Here is a TCP dump of what happen. 232 is the netburner. Goal is to keep all
packet to 1224



Denis


-----Original Message-----

From: netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
[mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> > ] On Behalf Of chris ruff
Sent: Thursday, April 02, 2009 1:30 PM

To: netburner_group@yahoogroups.com <mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
Subject: RE: [netburner_group] TCP Fragmentation





Google "Nagle" algorithm

I am assuming that you want the host computer to send complete packets to the
NB module

Chris




-----Original Message-----

From: netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
[mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> > ]On Behalf Of Rheault, Denis
Sent: Thursday, April 02, 2009 12:20 PM

To: netburner_group@yahoogroups.com <mailto:netburner_group%40yahoogroups.com>
<mailto:netburner_group@yahoogroups.com
<mailto:netburner_group%40yahoogroups.com> >
Subject: [netburner_group] TCP Fragmentation





Hi,

Is there a way I can disable fragmentation in the TCP stack ?

Denis Rheault
Sr. Maintenance Engineering Associate
Telesat
514-528-2207
514-527-6429 fax

drheault@... <mailto:drheault%40telesat.com>
<mailto:drheault@... <mailto:drheault%40telesat.com> >


This message and any files transmitted with it contains information from
Telesat, which may be privileged and/or confidential. If you have received this
e-mail in error or are not the intended recipient, you may not use, copy,
disseminate or distribute it; do not open any attachments, delete it immediately
from your system and notify the sender promptly by e-mail that you have done so.
Thank you.










--
Thomas Taranowski
Certified netburner consultant

baringforge.com <http://baringforge.com/> <http://baringforge.com/
<http://baringforge.com/> >






--
Thomas Taranowski
Certified netburner consultant
baringforge.com <http://baringforge.com/>





Thu Apr 2, 2009 11:23 pm

DRheault@...
Send Email Send Email

Attachment
winmail.dat
Type:
application/ms-tnef
Forward
Message #6220 of 6234 |
Expand Messages Author Sort by Date

Hi, Is there a way I can disable fragmentation in the TCP stack ? Denis Rheault Sr. Maintenance Engineering Associate Telesat 514-528-2207 514-527-6429 fax ...
Rheault, Denis
DRheault@...
Send Email
Apr 2, 2009
4:20 pm

Google "Nagle" algorithm I am assuming that you want the host computer to send complete packets to the NB module Chris ... From:...
chris ruff
cgruffcgruff
Offline Send Email
Apr 2, 2009
5:31 pm

No, opposite. The problem I have is that I sent fix length packet of 1224 bytes of payload. Sometime the receiving end TCP get's full and some fragmentation...
Rheault, Denis
DRheault@...
Send Email
Apr 2, 2009
6:11 pm

Denis: 1. have you tried the trick of writeall(fd,buf,len) ? Have you tried punching a bunch of NULLs out after your packet to force the NB stack to assemble...
chris ruff
cgruffcgruff
Offline Send Email
Apr 2, 2009
6:43 pm

#1 already do this. I thought there was a flag I could set in the TCP to stop this.. NULL could still create fragmentation, I will go with you last opinion. ...
Rheault, Denis
DRheault@...
Send Email
Apr 2, 2009
7:08 pm

It sounds like you want to use UDP, as your protocol is structure/datagram oriented, and your sending packets of data around. TCP doesn't really work that...
Thomas Taranowski
thomastarano...
Offline Send Email
Apr 2, 2009
8:36 pm

Suggest you post this at : http://forum.embeddedethernet.com. The yahoo forum is pretty much defunct, although some of us still watch it out of nostalgia. ......
Thomas Taranowski
thomastarano...
Offline Send Email
Apr 2, 2009
7:54 pm

Thanks ... From: netburner_group@yahoogroups.com [mailto:netburner_group@yahoogroups.com] On Behalf Of Thomas Taranowski Sent: Thursday, April 02, 2009 3:53 PM...
Rheault, Denis
DRheault@...
Send Email
Apr 2, 2009
7:57 pm

The paylod already as a start header with frame lenght. So normaly the Recv should be able to re-assemble the data if the data rx in te packet is less then...
Rheault, Denis
DRheault@...
Send Email
Apr 2, 2009
10:35 pm

Are you looping on the recv() call? You may not recv all of the pending data in a single recv, as you have seen. Usually you need to do something like the...
Thomas Taranowski
thomastarano...
Offline Send Email
Apr 2, 2009
11:04 pm

Thom, I am not wokking on the client side. I do the netburner that send the info. My side work's ok :) But I'm trying to change my to to help the guy that does...
Rheault, Denis
DRheault@...
Send Email
Apr 2, 2009
11:29 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help