Re: would an datagram/packet get shorter?

From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 04/03/04


Date: Sat, 03 Apr 2004 09:21:20 GMT

Kenji Chan wrote:
>>A packet could get fragmented into two packets by a router.
>>
>>Is that what you're asking about?
>
>
> no, not really. I assumed that the DF(don't fragment bit) is set, so forget
> about IP fragment
> I want to ask that, is that possible for an IP packet get shorter
>
> // for example
> sender sends 100 bytes
>
> would the receiver receive less or maybe more than 100 bytes?

The length of a non-broken IP packet is exactly what is written
in the IP header length field. The IP layer is responsible to
silently discard a packet arriving from the data link layer
with a length of less than the indicated length or a packet
with a mis-matching checksum.

It is possible that the data link layer transfers more than
the indicated IP packet length due to minimum packet length
restrictions on e.g. Ethernet. The extra padding bytes after
the IP packet are just ignored.

Most data links verify the integrity of the packet transferred
with e.g. CRC, but for example the SLIP data link does not
check the integrity of the packet in any way. In a serial
line it is possible to drop or corrupt any bytes in the
packet.

HTH

Tauno Voipio
tauno voipio @ iki fi