#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.
Definition at line 26 of file SCTPSerializer.h.
SCTPSerializer::SCTPSerializer | ( | ) | [inline] |
Definition at line 29 of file SCTPSerializer.h.
{}
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.
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.