PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
packet.h File Reference
#include <tamtypes.h>
+ Include dependency graph for packet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  packet_t
 

Macros

#define QWC_MAX   65535
 
#define PACKET_NORMAL   0x00
 
#define PACKET_UCAB   0x01
 
#define PACKET_SPR   0x02
 

Functions

packet_tpacket_init (int qwords, int type)
 
void packet_reset (packet_t *packet)
 
void packet_free (packet_t *packet)
 
qword_t * packet_increment_qwc (packet_t *packet, int num)
 
static qword_t * packet_get_qword (packet_t *packet)
 

Detailed Description

Packet library functions.

Definition in file packet.h.

Macro Definition Documentation

◆ QWC_MAX

#define QWC_MAX   65535

Maximum number allowed, but each channel has its own limitations.

Definition at line 12 of file packet.h.

◆ PACKET_NORMAL

#define PACKET_NORMAL   0x00

Definition at line 14 of file packet.h.

◆ PACKET_UCAB

#define PACKET_UCAB   0x01

Definition at line 15 of file packet.h.

◆ PACKET_SPR

#define PACKET_SPR   0x02

Definition at line 16 of file packet.h.

Function Documentation

◆ packet_init()

packet_t * packet_init ( int  qwords,
int  type 
)

Allocate a new packet for use, size in quadwords.

Definition at line 8 of file packet.c.

References packet_init().

Referenced by packet_init().

◆ packet_reset()

void packet_reset ( packet_t packet)

Reset the packet quadword counter and zero out data.

Definition at line 89 of file packet.c.

References packet_reset().

Referenced by packet_reset().

◆ packet_free()

void packet_free ( packet_t packet)

Free the space allocated by packet.

Definition at line 63 of file packet.c.

References packet_free().

Referenced by packet_free().

◆ packet_increment_qwc()

qword_t * packet_increment_qwc ( packet_t packet,
int  num 
)

Advances the qwc and returns the current qword count.

◆ packet_get_qword()

static qword_t * packet_get_qword ( packet_t packet)
inlinestatic

For those that like getters and setters

Definition at line 47 of file packet.h.