PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
libmtap.c File Reference
#include <tamtypes.h>
#include <string.h>
#include <kernel.h>
#include <sifrpc.h>
#include <stdarg.h>
#include "libmtap.h"
+ Include dependency graph for libmtap.c:

Go to the source code of this file.

Macros

#define MTAPSERV_PORT_OPEN   0x80000901
 
#define MTAPSERV_PORT_CLOSE   0x80000902
 
#define MTAPSERV_GET_CONNECTION   0x80000903
 

Functions

static unsigned int mtapRpcBuffer[32] __attribute__ ((aligned(64)))
 
int mtapInit (void)
 
int mtapPortOpen (int port)
 
int mtapPortClose (int port)
 
int mtapGetConnection (int port)
 

Variables

static int mtapInited = 0
 

Detailed Description

Functions to provide access to multi-taps.

Definition in file libmtap.c.

Macro Definition Documentation

◆ MTAPSERV_PORT_OPEN

#define MTAPSERV_PORT_OPEN   0x80000901

Definition at line 24 of file libmtap.c.

◆ MTAPSERV_PORT_CLOSE

#define MTAPSERV_PORT_CLOSE   0x80000902

Definition at line 25 of file libmtap.c.

◆ MTAPSERV_GET_CONNECTION

#define MTAPSERV_GET_CONNECTION   0x80000903

Definition at line 26 of file libmtap.c.

Function Documentation

◆ mtapInit()

int mtapInit ( void  )

Initialise the multitap library.

Returns
1 on success; 1 on failure

Definition at line 34 of file libmtap.c.

◆ mtapPortOpen()

int mtapPortOpen ( int  port)

Open a port for the multitap.

Parameters
portspecifies the port that is to be monitored as a multitap connection destination.
Returns
1 on success; !1 on failure.

Definition at line 67 of file libmtap.c.

◆ mtapPortClose()

int mtapPortClose ( int  port)

Closes a port for the multitap.

Parameters
portis a port that is to be closed (must have been previously opened by mtapPortOpen).
Returns
1 on success; !1 on failure.

Definition at line 77 of file libmtap.c.

◆ mtapGetConnection()

int mtapGetConnection ( int  port)

Checks if a multitap is connected to an opened port.

Parameters
portis the port to be checked.
Returns
1 if a multitap exists on the specified port; !1 if there isno multitap on the specified port.

Definition at line 87 of file libmtap.c.

Referenced by pad_open().

Variable Documentation

◆ mtapInited

int mtapInited = 0
static

Definition at line 32 of file libmtap.c.