Discussion:
question on RFC791
(too old to reply)
Mark
2013-04-30 15:25:51 UTC
Permalink
Hi All,

Reading RFC791:
"Every internet module must be able to forward a datagram of 68 octets
without further fragmentation. This is because an internet
header may be up to 60 octets, and the minimum fragment is 8 octets."

Does it mean that it's possible to have IP packet carrying UDP payload of
size 0 ?

Thanks.

Mark
Martijn Lievaart
2013-05-01 09:59:11 UTC
Permalink
Post by Mark
Hi All,
"Every internet module must be able to forward a datagram of 68 octets
without further fragmentation. This is because an internet header may be
up to 60 octets, and the minimum fragment is 8 octets."
Does it mean that it's possible to have IP packet carrying UDP payload
of size 0 ?
Yes.

M4
Barry Margolin
2013-05-01 15:15:19 UTC
Permalink
Post by Mark
Hi All,
"Every internet module must be able to forward a datagram of 68 octets
without further fragmentation. This is because an internet header may be
up to 60 octets, and the minimum fragment is 8 octets."
Does it mean that it's possible to have IP packet carrying UDP payload
of size 0 ?
Yes.
But that's not implied by the above requirement. RFC 791 is about IP,
which may be used by many different transport protocols. Even if UDP
didn't allow zero-length payloads, some other protocol might.
--
Barry Margolin
Arlington, MA
Martijn Lievaart
2013-05-01 20:06:49 UTC
Permalink
Post by Barry Margolin
Post by Mark
Hi All,
"Every internet module must be able to forward a datagram of 68
octets without further fragmentation. This is because an internet
header may be up to 60 octets, and the minimum fragment is 8 octets."
Does it mean that it's possible to have IP packet carrying UDP
payload of size 0 ?
Yes.
But that's not implied by the above requirement. RFC 791 is about IP,
which may be used by many different transport protocols. Even if UDP
didn't allow zero-length payloads, some other protocol might.
You're correct, you cannot conclude UDP allows a 0 byte payload from the
text above. However, UDP does allow for a 0 byte payload.

M4
Jorgen Grahn
2013-05-02 21:23:07 UTC
Permalink
Post by Martijn Lievaart
Post by Mark
Hi All,
"Every internet module must be able to forward a datagram of 68
octets without further fragmentation. This is because an internet
header may be up to 60 octets, and the minimum fragment is 8 octets."
Does it mean that it's possible to have IP packet carrying UDP
payload of size 0 ?
...
Post by Martijn Lievaart
You're correct, you cannot conclude UDP allows a 0 byte payload from the
text above. However, UDP does allow for a 0 byte payload.
And also it should come as no surprise. It's about as natural as a
programming language allowing zero-sized arrays/vectors/lists.

I once helped implement a proprietary protocol which (among other
things) allowed transmitting arrays of N data items. It didn't
support N==0. When I asked, the designer said "well, if you want
to send 0 items, just don't send anything!". I think he saw the
assymetry in the end, because he allowed me to implement the
missing edge case.

/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
glen herrmannsfeldt
2013-05-02 22:10:47 UTC
Permalink
Jorgen Grahn <grahn+***@snipabacken.se> wrote:
(snip, someone wrote)
Post by Jorgen Grahn
Post by Mark
Does it mean that it's possible to have IP packet carrying UDP
payload of size 0 ?
(snip)
Post by Jorgen Grahn
And also it should come as no surprise. It's about as natural as a
programming language allowing zero-sized arrays/vectors/lists.
About that natural, but it has been slow in coming.

Fortran now does, but it didn't used to.

Many still don't.

-- glen
Barry Margolin
2013-05-03 07:03:19 UTC
Permalink
Post by glen herrmannsfeldt
(snip, someone wrote)
Post by Jorgen Grahn
Post by Mark
Does it mean that it's possible to have IP packet carrying UDP
payload of size 0 ?
(snip)
Post by Jorgen Grahn
And also it should come as no surprise. It's about as natural as a
programming language allowing zero-sized arrays/vectors/lists.
About that natural, but it has been slow in coming.
Fortran now does, but it didn't used to.
Many still don't.
Many? Examples?
--
Barry Margolin
Arlington, MA
Jorgen Grahn
2013-05-03 09:24:36 UTC
Permalink
Post by Barry Margolin
Post by glen herrmannsfeldt
(snip, someone wrote)
Post by Jorgen Grahn
Post by Mark
Does it mean that it's possible to have IP packet carrying UDP
payload of size 0 ?
(snip)
Post by Jorgen Grahn
And also it should come as no surprise. It's about as natural as a
programming language allowing zero-sized arrays/vectors/lists.
About that natural, but it has been slow in coming.
Fortran now does, but it didn't used to.
Many still don't.
Many? Examples?
I guess he meant at least C. Perhaps it was a bad comparison on my
part. It just makes sense to me that when you support size 1--N cases,
for symmetry reasons it's a good idea to support size 0 too. The "null"
case, so to speak.

On the other hand, I suppose very few UDP messages with no data are
sent in practice. Higher-level protocols tend to start with
fixed-size headers.

/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Loading...