Bug 750 - Small Ethernet frames do not get padded
Small Ethernet frames do not get padded
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: devices
ns-3-dev
All All
: P3 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-25 05:09 UTC by Florian Schmidt
Modified: 2009-12-02 19:28 UTC (History)
1 user (show)

See Also:


Attachments
patch to pad ethernet frames (622 bytes, patch)
2009-11-25 05:09 UTC, Florian Schmidt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Schmidt 2009-11-25 05:09:26 UTC
Created attachment 676 [details]
patch to pad ethernet frames

When packets that are less than 46 bytes long reach CsmaNetDevice, it will add header and trailer and send them out. However, these packets will be less than the required minimum frame size of 64 bytes. This also influences the time that the line is used by each packet.

Solution: add a check in CsmaNetDevice::AddHeader. Before adding the header and trailer, check for the length of the packet and pad it if necessary. Small and simple patch is attached.
Comment 1 Craig Dowell 2009-12-02 19:28:03 UTC
Changeset aa78abc9c10d