#include "data.h"
#include "nack.h"
#include "tlv-encoder.h"
Go to the source code of this file.
◆ PacketPriv
mbuf private data for NDN packet.
◆ Packet_Clone()
Clone packet to new mbufs.
- Return values
-
- Returns
- new mbufs that fulfill
align
requirements.
- Postcondition
npkt
is unaffected.
◆ Packet_Parse()
Parse layer 2 and layer 3 in mbuf.
- Parameters
-
npkt | a uniquely owned, possibly segmented, direct mbuf. |
parseFor | see PInterest_Parse and PData_Parse . |
- Returns
- whether success.
- Postcondition
- If the packet is fragmented, Packet_GetType(npkt) returns
PktFragment
. Otherwise, same as Packet_ParseL3
.
◆ Packet_ParseL3()
Parse layer 3 in mbuf.
- Parameters
-
npkt | a uniquely owned, possibly segmented, direct mbuf. Its PacketPriv.lpl3 should have been initialized. |
parseFor | see PInterest_Parse and PData_Parse . |
- Returns
- whether success.
- Postcondition
- Packet_GetType(npkt) returns
PktInterest
, PktData
, or PktNack
.
-
One of
PInterest
, PData
, or PNack
is initialized.
◆ PktType_Strings_
const char* PktType_Strings_[] |
|
extern |