sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ps2netfs - TCP fs driver

Classes

struct  dev_table_t
struct  fd_table_t

Macros

#define DEVSCAN_MAX   (DEVSCAN_IOMAX+DEVSCAN_IOXMAX+1)
#define DEVSCAN_MASK   (IOP_DT_FS | IOP_DT_BLOCK)
#define PFS_ZONE_SIZE   8192

Functions

ModuleInfo_t * devscan_getmodule (const char *name)
int devscan_setup (int devtype)
int devscan_gettype (char *name)
int devscan_getdevlist (char *buffer)
int ps2netfs_close_socket (void)
void ps2netfs_close_fsys (void)
void ps2netfs_serv (void *argv)
int ps2netfs_Init (void)
int ps2fs_Destroy (void)
int _start (int argc, char *argv[])

Detailed Description

Macro Definition Documentation

◆ DEVSCAN_MASK

#define DEVSCAN_MASK   (IOP_DT_FS | IOP_DT_BLOCK)

Device scan mask.

Definition at line 26 of file devscan.h.

◆ DEVSCAN_MAX

#define DEVSCAN_MAX   (DEVSCAN_IOMAX+DEVSCAN_IOXMAX+1)

Maximum number of devices handled.

Definition at line 21 of file devscan.h.

◆ PFS_ZONE_SIZE

#define PFS_ZONE_SIZE   8192

Handles a PS2NETFS_FORMAT_CMD request.

Parameters
bufPointer to packet data.
lenLength of packet.
Returns
Status.

status returns: 0 if all request and response handled ok. -X if error.

return values for client: -19 (ENODEV) if device not found +X if handled ok, valid FD returned. -X if error.

Definition at line 1308 of file ps2_fio.c.

Function Documentation

◆ _start()

int _start ( int argc,
char * argv[] )

Entry point for IRX.

argc and argv make no difference to runstate.

Parameters
argcNumber of arguments.
argvPointer to array of arguments.
Returns
Module Status on Exit.

return values: MODULE_RESIDENT_END if loaded and registered as library. MODULE_NO_RESIDENT_END if just exiting normally.

Definition at line 47 of file ps2netfs.c.

◆ devscan_getdevlist()

int devscan_getdevlist ( char * buffer)

Get device list.

Parameters
bufferPointer to dest buffer
Returns
number of devices returned.

Definition at line 162 of file devscan.c.

◆ devscan_getmodule()

ModuleInfo_t * devscan_getmodule ( const char * name)

Get pointer to module structure for named module.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Pointer to module structure.

return values: 0 if not found. pointer to module structure for loaded module if found.

Definition at line 47 of file devscan.c.

◆ devscan_gettype()

int devscan_gettype ( char * name)

Get device handler type for path.

Parameters
nameFull pathname to check.
Returns
Device handler type.

return values: MODULE_RESIDENT_END if loaded and registered as library. MODULE_NO_RESIDENT_END if just exiting normally.

Definition at line 141 of file devscan.c.

◆ devscan_setup()

int devscan_setup ( int devtype)

Initialise the devices table

Parameters
devtypeMask for device types to return (0x10 = FS drivers).
Returns
Number of devices found.

This scans ioman and iomanx for devices, then adds them to the internal list, with basename and the handler type.

Also used to re-init the devices table

Definition at line 73 of file devscan.c.

◆ ps2fs_Destroy()

int ps2fs_Destroy ( void )

Shutdown ps2netfs.

This handles Stopping the thread and disconnecting. All shutdown for ps2netfs.

Definition at line 2105 of file ps2_fio.c.

◆ ps2netfs_close_fsys()

void ps2netfs_close_fsys ( void )

Shortcut to close the socket forcibly and set to exit (active=0).

This will close down the socket, and cause the server thread to exit.

Returns
disconnect return value.

Definition at line 189 of file ps2_fio.c.

◆ ps2netfs_close_socket()

int ps2netfs_close_socket ( void )

Shortcut to close the socket and cleanup.

Returns
disconnect return value.

Definition at line 171 of file ps2_fio.c.

◆ ps2netfs_Init()

int ps2netfs_Init ( void )

Init ps2netfs.

Returns
Status (0=success, -1 = failure).

This handles setting up the Thread, and starting it running.

Definition at line 2061 of file ps2_fio.c.

◆ ps2netfs_serv()

void ps2netfs_serv ( void * argv)

Main ps2netfs Thread.

Parameters
argvParameters to thread.
Returns
Status.

This is the main thread function for ps2netfs. It runs until 'ps2netfs_active' is set to 0. Handles accepting connections and passing them onto the listener function to handle them.

Definition at line 1963 of file ps2_fio.c.