INET Framework for OMNeT++/OMNEST
|
#include <SCTPSerializer.h>
Public Member Functions | |
SCTPSerializer () | |
int32 | serialize (const SCTPMessage *msg, uint8 *buf, uint32 bufsize) |
void | parse (const uint8 *buf, uint32 bufsize, SCTPMessage *dest) |
Static Public Member Functions | |
static uint32 | checksum (const uint8 *buf, register uint32 len) |
Converts between SCTPMessage and binary (network byte order) SCTP header.
SCTPSerializer::SCTPSerializer | ( | ) | [inline] |
{}
static uint32 SCTPSerializer::checksum | ( | const uint8 * | buf, |
register uint32 | len | ||
) | [static] |
void SCTPSerializer::parse | ( | const uint8 * | buf, |
uint32 | bufsize, | ||
SCTPMessage * | dest | ||
) |
Puts a packet sniffed from the wire into an SCTPMessage.
Referenced by IPSerializer::parse().
int32 SCTPSerializer::serialize | ( | const SCTPMessage * | msg, |
uint8 * | buf, | ||
uint32 | bufsize | ||
) |
Serializes an SCTPMessage for transmission on the wire. The checksum is NOT filled in. (The kernel does that when sending the frame over a raw socket.) Returns the length of data written into buffer.
Referenced by IPSerializer::serialize().