#include <SCTPSerializer.h>
Public Member Functions | |
SCTPSerializer () | |
int32 | serialize (SCTPMessage *msg, uint8 *buf, uint32 bufsize) |
void | parse (uint8 *buf, uint32 bufsize, SCTPMessage *dest) |
Static Public Member Functions | |
static uint32 | checksum (uint8 *buf, register uint32 len) |
int32 SCTPSerializer::serialize | ( | 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.
void SCTPSerializer::parse | ( | uint8 * | buf, | |
uint32 | bufsize, | |||
SCTPMessage * | dest | |||
) |
Puts a packet sniffed from the wire into an SCTPMessage.
static uint32 SCTPSerializer::checksum | ( | uint8 * | buf, | |
register uint32 | len | |||
) | [static] |