PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ps2netfs - TCP fs driver

Data Structures

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_tdevscan_getmodule (const char *name)
 
int devscan_setup (int devtype)
 
int devscan_gettype (char *name)
 
int devscan_getdevlist (char *buffer)
 
static void fdh_setup ()
 
static int fdh_getfd (int devtype, int fd)
 
static void fdh_freefd (int fd)
 
static int convmode_to_iomanx (int stat)
 
static int convmode_from_iomanx (int stat)
 
int ps2netfs_close_socket (void)
 
void ps2netfs_close_fsys (void)
 
static int ps2netfs_op_info (char *buf, int len)
 
static int ps2netfs_op_fstype (char *buf, int len)
 
static int ps2netfs_op_devlist (char *buf, int len)
 
static int ps2netfs_op_open (char *buf, int len)
 
static int ps2netfs_op_close (char *buf, int len)
 
static int ps2netfs_op_read (char *buf, int len)
 
static int ps2netfs_op_write (char *buf, int len)
 
static int ps2netfs_op_lseek (char *buf, int len)
 
static int ps2netfs_op_ioctl (char *buf, int len)
 
static int ps2netfs_op_remove (char *buf, int len)
 
static int ps2netfs_op_mkdir (char *buf, int len)
 
static int ps2netfs_op_rmdir (char *buf, int len)
 
static int ps2netfs_op_dopen (char *buf, int len)
 
static int ps2netfs_op_dclose (char *buf, int len)
 
static int ps2netfs_op_dread (char *buf, int len)
 
static int ps2netfs_op_getstat (char *buf, int len)
 
static int ps2netfs_op_chstat (char *buf, int len)
 
static int ps2netfs_op_rename (char *buf, int len)
 
static int ps2netfs_op_chdir (char *buf, int len)
 
static int ps2netfs_op_sync (char *buf, int len)
 
static int ps2netfs_op_mount (char *buf, int len)
 
static int ps2netfs_op_umount (char *buf, int len)
 
static int ps2netfs_op_lseek64 (char *buf, int len)
 
static int ps2netfs_op_devctl (char *buf, int len)
 
static int ps2netfs_op_symlink (char *buf, int len)
 
static int ps2netfs_op_readlink (char *buf, int len)
 
static int ps2netfs_op_ioctl2 (char *buf, int len)
 
static void ps2netfs_Listener (int sock)
 
int ps2netfs_serv (void *argv)
 
int ps2netfs_Init (void)
 
int ps2fs_Destroy (void)
 
int _start (int argc, char *argv[])
 

Variables

static dev_table_t dev_info_list [DEVSCAN_MAX+1]
 

Detailed Description


Data Structure Documentation

◆ dev_table_t

struct dev_table_t

Device type structure.

Definition at line 31 of file devscan.h.

Data Fields
char name[256]
int devtype
int len

◆ fd_table_t

struct fd_table_t

File Descriptor Handler functions

Handles upto FDH_MAXFD open files concurrently.

Definition at line 63 of file ps2_fio.c.

Data Fields
int used
int realfd
int devtype

Macro Definition Documentation

◆ DEVSCAN_MAX

#define DEVSCAN_MAX   (DEVSCAN_IOMAX+DEVSCAN_IOXMAX+1)

#include <iop/fs/netfs/src/devscan.h>

Maximum number of devices handled.

Definition at line 21 of file devscan.h.

◆ DEVSCAN_MASK

#define DEVSCAN_MASK   (IOP_DT_FS | IOP_DT_BLOCK)

#include <iop/fs/netfs/src/devscan.h>

Device scan mask.

Definition at line 26 of file devscan.h.

◆ PFS_ZONE_SIZE

#define PFS_ZONE_SIZE   8192

#include <iop/fs/netfs/src/ps2_fio.c>

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

◆ devscan_getmodule()

ModuleInfo_t * devscan_getmodule ( const char *  name)

#include <iop/fs/netfs/src/devscan.c>

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.

References tag_LC_internals::image_info.

Referenced by _start(), and devscan_setup().

◆ devscan_setup()

int devscan_setup ( int  devtype)

#include <iop/fs/netfs/src/devscan.c>

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.

References count, dev_info_list, devscan_getmodule(), and IOP_DT_FSEXT.

Referenced by devscan_getdevlist(), and ps2netfs_serv().

◆ devscan_gettype()

int devscan_gettype ( char *  name)

#include <iop/fs/netfs/src/devscan.c>

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.

References count, and dev_info_list.

Referenced by ps2netfs_op_chdir(), ps2netfs_op_dopen(), ps2netfs_op_fstype(), ps2netfs_op_mkdir(), ps2netfs_op_mount(), ps2netfs_op_open(), ps2netfs_op_readlink(), ps2netfs_op_remove(), ps2netfs_op_rename(), ps2netfs_op_rmdir(), ps2netfs_op_symlink(), ps2netfs_op_sync(), and ps2netfs_op_umount().

◆ devscan_getdevlist()

int devscan_getdevlist ( char *  buffer)

#include <iop/fs/netfs/src/devscan.c>

Get device list.

Parameters
bufferPointer to dest buffer
Returns
number of devices returned.

Definition at line 162 of file devscan.c.

References count, dev_info_list, DEVSCAN_MASK, and devscan_setup().

Referenced by ps2netfs_op_devlist().

◆ fdh_setup()

static void fdh_setup ( )
inlinestatic

#include <iop/fs/netfs/src/ps2_fio.c>

Initialise the file descriptor table.

This initialises the file descriptor table that we use to translate to numbers passed to client, and to enable quick lookups on handler type.

Definition at line 79 of file ps2_fio.c.

Referenced by ps2netfs_serv().

◆ fdh_getfd()

static int fdh_getfd ( int  devtype,
int  fd 
)
inlinestatic

#include <iop/fs/netfs/src/ps2_fio.c>

Get file descriptor for client.

Parameters
devtypeDevice Manager type.
fdPS2 file descriptor.
Returns
FD to send to client.

return values: -1 if no space in list. FD if returning valid entry.

Definition at line 95 of file ps2_fio.c.

References count.

Referenced by ps2netfs_op_dopen(), and ps2netfs_op_open().

◆ fdh_freefd()

static void fdh_freefd ( int  fd)
inlinestatic

#include <iop/fs/netfs/src/ps2_fio.c>

Free file descriptor from client table.

Parameters
fdclient file descriptor.

Definition at line 117 of file ps2_fio.c.

Referenced by ps2netfs_op_close(), and ps2netfs_op_dclose().

◆ convmode_to_iomanx()

static int convmode_to_iomanx ( int  stat)
inlinestatic

◆ convmode_from_iomanx()

static int convmode_from_iomanx ( int  stat)
inlinestatic

#include <iop/fs/netfs/src/ps2_fio.c>

changes mode from iomanx to ioman format

Definition at line 161 of file ps2_fio.c.

◆ ps2netfs_close_socket()

int ps2netfs_close_socket ( void  )

#include <iop/fs/netfs/src/ps2_fio.c>

Shortcut to close the socket and cleanup.

Returns
disconnect return value.

Definition at line 171 of file ps2_fio.c.

Referenced by ps2netfs_serv().

◆ ps2netfs_close_fsys()

void ps2netfs_close_fsys ( void  )

#include <iop/fs/netfs/src/ps2_fio.c>

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_op_info()

static int ps2netfs_op_info ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_INFO_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: -1 if error. 0 if handled ok.

Definition at line 314 of file ps2_fio.c.

References count.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_fstype()

static int ps2netfs_op_fstype ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_FSTYPE_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: -1 if error. 0 if handled ok.

Definition at line 367 of file ps2_fio.c.

References devscan_gettype().

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_devlist()

static int ps2netfs_op_devlist ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_DEVLIST_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: -1 if error. 0 if handled ok.

Definition at line 416 of file ps2_fio.c.

References count, and devscan_getdevlist().

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_open()

static int ps2netfs_op_open ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_OPEN_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 484 of file ps2_fio.c.

References devscan_gettype(), ENODEV, and fdh_getfd().

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_close()

static int ps2netfs_op_close ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_CLOSE_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 >=0 if handled ok. -X if error.

Definition at line 545 of file ps2_fio.c.

References fdh_freefd(), and fdh_get.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_read()

static int ps2netfs_op_read ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_READ_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 >=0 if handled ok , bytes read. -X if error.

Definition at line 605 of file ps2_fio.c.

References fdh_get.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_write()

static int ps2netfs_op_write ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_WRITE_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 >=0 if handled ok , bytes written. -X if error.

Definition at line 677 of file ps2_fio.c.

References fdh_get, and ps2netfs_recv_bytes().

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_lseek()

static int ps2netfs_op_lseek ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_LSEEK_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 >=0 if handled ok , position. -X if error.

Definition at line 751 of file ps2_fio.c.

References ENODEV, and fdh_get.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_ioctl()

static int ps2netfs_op_ioctl ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_IOCTL_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 >=0 if handled ok. -X if error.

Definition at line 809 of file ps2_fio.c.

References ENODEV, and fdh_get.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_remove()

static int ps2netfs_op_remove ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_REMOVE_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 >=0 if handled ok. -X if error.

Definition at line 867 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_mkdir()

static int ps2netfs_op_mkdir ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_MKDIR_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 >=0 if handled ok. -X if error.

Definition at line 926 of file ps2_fio.c.

References devscan_gettype().

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_rmdir()

static int ps2netfs_op_rmdir ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_RMDIR_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 >=0 if handled ok. -X if error.

Definition at line 985 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_dopen()

static int ps2netfs_op_dopen ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_DOPEN_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 1044 of file ps2_fio.c.

References devscan_gettype(), ENODEV, and fdh_getfd().

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_dclose()

static int ps2netfs_op_dclose ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_DCLOSE_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 >=0 if handled ok. -X if error.

Definition at line 1105 of file ps2_fio.c.

References ENODEV, fdh_freefd(), and fdh_get.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_dread()

static int ps2netfs_op_dread ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_DREAD_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 >=0 if handled ok. -X if error.

Definition at line 1165 of file ps2_fio.c.

References convmode_to_iomanx(), ENODEV, and fdh_get.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_getstat()

static int ps2netfs_op_getstat ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_GETSTAT_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 1255 of file ps2_fio.c.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_chstat()

static int ps2netfs_op_chstat ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_CHSTAT_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 1279 of file ps2_fio.c.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_rename()

static int ps2netfs_op_rename ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_RENAME_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 1373 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_chdir()

static int ps2netfs_op_chdir ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_CHDIR_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 1431 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_sync()

static int ps2netfs_op_sync ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_SYNC_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 1485 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_mount()

static int ps2netfs_op_mount ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_MOUNT_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 1539 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_umount()

static int ps2netfs_op_umount ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_UMOUNT_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 1593 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_lseek64()

static int ps2netfs_op_lseek64 ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_LSEEK64_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 1647 of file ps2_fio.c.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_devctl()

static int ps2netfs_op_devctl ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_DEVCTL_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 1671 of file ps2_fio.c.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_symlink()

static int ps2netfs_op_symlink ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_SYMLINK_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 1695 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_readlink()

static int ps2netfs_op_readlink ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_READLINK_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 1753 of file ps2_fio.c.

References devscan_gettype(), and ENODEV.

Referenced by ps2netfs_Listener().

◆ ps2netfs_op_ioctl2()

static int ps2netfs_op_ioctl2 ( char *  buf,
int  len 
)
static

#include <iop/fs/netfs/src/ps2_fio.c>

Handles a PS2NETFS_IOCTL2_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 1808 of file ps2_fio.c.

Referenced by ps2netfs_Listener().

◆ ps2netfs_Listener()

static void ps2netfs_Listener ( int  sock)
static

◆ ps2netfs_serv()

int ps2netfs_serv ( void *  argv)

#include <iop/fs/netfs/src/ps2_fio.c>

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.

status returns: 0 if exiting and finished. -1 if error starting thread.

Definition at line 1968 of file ps2_fio.c.

References DEVSCAN_MASK, devscan_setup(), fdh_setup(), INADDR_ANY, ps2netfs_close_socket(), and ps2netfs_Listener().

Referenced by ps2netfs_Init().

◆ ps2netfs_Init()

int ps2netfs_Init ( void  )

#include <iop/fs/netfs/src/ps2_fio.c>

Init ps2netfs.

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

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

Definition at line 2070 of file ps2_fio.c.

References ps2netfs_serv().

Referenced by _start().

◆ ps2fs_Destroy()

int ps2fs_Destroy ( void  )

#include <iop/fs/netfs/src/ps2_fio.c>

Shutdown ps2netfs.

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

Definition at line 2114 of file ps2_fio.c.

◆ _start()

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

#include <iop/fs/netfs/src/ps2netfs.c>

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.

References devscan_getmodule(), and ps2netfs_Init().

Variable Documentation

◆ dev_info_list

dev_table_t dev_info_list[DEVSCAN_MAX+1]
static

#include <iop/fs/netfs/src/devscan.c>

Device type structure.

Definition at line 35 of file devscan.c.

Referenced by devscan_getdevlist(), devscan_gettype(), and devscan_setup().