mbuf: clarify definition of fragment packet types

An IPv4 packet is considered as a fragment if:
- MF (more fragment) bit is set
- or Fragment_Offset field is non-zero

Update the API documentation of packet types to reflect this.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
Olivier Matz 2016-10-03 10:38:55 +02:00 committed by Thomas Monjalon
parent 288541c8ff
commit 8c5cb94993

View File

@ -227,7 +227,7 @@ extern "C" {
*
* Packet format:
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=6, 'MF'=0>
* | 'version'=4, 'protocol'=6, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=6>
@ -239,7 +239,7 @@ extern "C" {
*
* Packet format:
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=17, 'MF'=0>
* | 'version'=4, 'protocol'=17, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=17>
@ -258,6 +258,9 @@ extern "C" {
* <'ether type'=0x0800
* | 'version'=4, 'MF'=1>
* or,
* <'ether type'=0x0800
* | 'version'=4, 'frag_offset'!=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=44>
*/
@ -268,7 +271,7 @@ extern "C" {
*
* Packet format:
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=132, 'MF'=0>
* | 'version'=4, 'protocol'=132, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=132>
@ -280,7 +283,7 @@ extern "C" {
*
* Packet format:
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=1, 'MF'=0>
* | 'version'=4, 'protocol'=1, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=1>
@ -296,7 +299,7 @@ extern "C" {
*
* Packet format:
* <'ether type'=0x0800
* | 'version'=4, 'protocol'!=[6|17|132|1], 'MF'=0>
* | 'version'=4, 'protocol'!=[6|17|132|1], 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'!=[6|17|44|132|1]>
@ -473,7 +476,7 @@ extern "C" {
*
* Packet format (inner only):
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=6, 'MF'=0>
* | 'version'=4, 'protocol'=6, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=6>
@ -485,7 +488,7 @@ extern "C" {
*
* Packet format (inner only):
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=17, 'MF'=0>
* | 'version'=4, 'protocol'=17, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=17>
@ -499,6 +502,9 @@ extern "C" {
* <'ether type'=0x0800
* | 'version'=4, 'MF'=1>
* or,
* <'ether type'=0x0800
* | 'version'=4, 'frag_offset'!=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=44>
*/
@ -509,7 +515,7 @@ extern "C" {
*
* Packet format (inner only):
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=132, 'MF'=0>
* | 'version'=4, 'protocol'=132, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=132>
@ -521,7 +527,7 @@ extern "C" {
*
* Packet format (inner only):
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=1, 'MF'=0>
* | 'version'=4, 'protocol'=1, 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=1>
@ -534,7 +540,7 @@ extern "C" {
*
* Packet format (inner only):
* <'ether type'=0x0800
* | 'version'=4, 'protocol'!=[6|17|132|1], 'MF'=0>
* | 'version'=4, 'protocol'!=[6|17|132|1], 'MF'=0, 'frag_offset'=0>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'!=[6|17|44|132|1]>