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

Go to the source code of this file.

Data Structures

union  .__attribute__
 

Functions

struct { 
 
   union { 
 
s32 result
 
s32 s
 
cmd_pkt cmd_pkt
 
listen_pkt listen_pkt
 
s_recv_pkt s_recv_pkt
 
r_recv_pkt r_recv_pkt
 
send_pkt send_pkt
 
socket_pkt socket_pkt
 
t_ip_info ip_info
 
char netif_name [8]
 
select_pkt select_pkt
 
ioctl_pkt ioctl_pkt
 
getsockopt_pkt getsockopt_pkt
 
getsockopt_res_pkt getsockopt_res_pkt
 
setsockopt_pkt setsockopt_pkt
 
char hostname [256]
 
gethostbyname_res_pkt gethostbyname_res_pkt
 
dns_setserver_pkt dns_setserver_pkt
 
dns_getserver_res_pkt dns_getserver_res_pkt
 
u8 numdns
 
u8 buffer [512]
 
   } __attribute__ 
 
__attribute__ ((aligned(64))) 
 
void _ps2sdk_ps2ipc_init (void)
 
void _ps2sdk_ps2ipc_deinit (void)
 
int ps2ip_init (void)
 
void ps2ip_deinit (void)
 
int ps2ipc_accept (int s, struct sockaddr *addr, int *addrlen)
 
int ps2ipc_bind (int s, const struct sockaddr *name, int namelen)
 
int ps2ipc_disconnect (int s)
 
int ps2ipc_connect (int s, const struct sockaddr *name, int namelen)
 
int ps2ipc_listen (int s, int backlog)
 
static void recv_intr (void *data_raw)
 
int ps2ipc_recv (int s, void *mem, int len, unsigned int flags)
 
int ps2ipc_recvfrom (int s, void *mem, int len, unsigned int flags, struct sockaddr *from, int *fromlen)
 
int ps2ipc_send (int s, const void *dataptr, int size, unsigned int flags)
 
int ps2ipc_sendto (int s, const void *dataptr, int size, unsigned int flags, const struct sockaddr *to, int tolen)
 
int ps2ipc_socket (int domain, int type, int protocol)
 
int ps2ipc_ps2ip_setconfig (const t_ip_info *ip_info)
 
int ps2ipc_ps2ip_getconfig (char *netif_name, t_ip_info *ip_info)
 
int ps2ipc_select (int maxfdp1, struct fd_set *readset, struct fd_set *writeset, struct fd_set *exceptset, struct timeval *timeout)
 
int ps2ipc_ioctl (int s, long cmd, void *argp)
 
int ps2ipc_getsockname (int s, struct sockaddr *name, int *namelen)
 
int ps2ipc_getpeername (int s, struct sockaddr *name, int *namelen)
 
int ps2ipc_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen)
 
int ps2ipc_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen)
 

Variables

static int _init_check = 0
 
static int lock_sema = -1
 
static SifRpcClientData_t _ps2ip
 
union { 
 
s32 result
 
s32 s
 
cmd_pkt cmd_pkt
 
listen_pkt listen_pkt
 
s_recv_pkt s_recv_pkt
 
r_recv_pkt r_recv_pkt
 
send_pkt send_pkt
 
socket_pkt socket_pkt
 
t_ip_info ip_info
 
char netif_name [8]
 
select_pkt select_pkt
 
ioctl_pkt ioctl_pkt
 
getsockopt_pkt getsockopt_pkt
 
getsockopt_res_pkt getsockopt_res_pkt
 
setsockopt_pkt setsockopt_pkt
 
char hostname [256]
 
gethostbyname_res_pkt gethostbyname_res_pkt
 
dns_setserver_pkt dns_setserver_pkt
 
dns_getserver_res_pkt dns_getserver_res_pkt
 
u8 numdns
 
u8 buffer [512]
 
};  
 
static ip_addr_t dns_servers [DNS_MAX_SERVERS]
 
const ip_addr_t ip_addr_any = IPADDR4_INIT(IPADDR_ANY)
 

Detailed Description

ps2ip ee client to iop ps2ip.

Definition in file ps2ipc.c.


Data Structure Documentation

◆ .__attribute__

union .__attribute__

Definition at line 28 of file ps2ipc.c.

Data Fields
s32 result
s32 s
cmd_pkt cmd_pkt
listen_pkt listen_pkt
s_recv_pkt s_recv_pkt
r_recv_pkt r_recv_pkt
send_pkt send_pkt
socket_pkt socket_pkt
t_ip_info ip_info
char netif_name[8]
select_pkt select_pkt
ioctl_pkt ioctl_pkt
getsockopt_pkt getsockopt_pkt
getsockopt_res_pkt getsockopt_res_pkt
setsockopt_pkt setsockopt_pkt
char hostname[256]
gethostbyname_res_pkt gethostbyname_res_pkt
dns_setserver_pkt dns_setserver_pkt
dns_getserver_res_pkt dns_getserver_res_pkt
u8 numdns
u8 buffer[512]

Function Documentation

◆ _ps2sdk_ps2ipc_init()

void _ps2sdk_ps2ipc_init ( void  )
extern

Definition at line 390 of file ps2ipc_ps2sdk.c.

◆ _ps2sdk_ps2ipc_deinit()

void _ps2sdk_ps2ipc_deinit ( void  )
extern

Definition at line 396 of file ps2ipc_ps2sdk.c.

◆ ps2ip_init()

int ps2ip_init ( void  )

Definition at line 64 of file ps2ipc.c.

◆ ps2ip_deinit()

void ps2ip_deinit ( void  )

Definition at line 92 of file ps2ipc.c.

◆ ps2ipc_accept()

int ps2ipc_accept ( int  s,
struct sockaddr addr,
int *  addrlen 
)

Definition at line 103 of file ps2ipc.c.

◆ ps2ipc_bind()

int ps2ipc_bind ( int  s,
const struct sockaddr name,
int  namelen 
)

Definition at line 133 of file ps2ipc.c.

◆ ps2ipc_disconnect()

int ps2ipc_disconnect ( int  s)

Definition at line 159 of file ps2ipc.c.

◆ ps2ipc_connect()

int ps2ipc_connect ( int  s,
const struct sockaddr name,
int  namelen 
)

Definition at line 182 of file ps2ipc.c.

◆ ps2ipc_listen()

int ps2ipc_listen ( int  s,
int  backlog 
)

Definition at line 208 of file ps2ipc.c.

◆ recv_intr()

static void recv_intr ( void *  data_raw)
static

Definition at line 233 of file ps2ipc.c.

◆ ps2ipc_recv()

int ps2ipc_recv ( int  s,
void *  mem,
int  len,
unsigned int  flags 
)

Definition at line 248 of file ps2ipc.c.

◆ ps2ipc_recvfrom()

int ps2ipc_recvfrom ( int  s,
void *  mem,
int  len,
unsigned int  flags,
struct sockaddr from,
int *  fromlen 
)

Definition at line 281 of file ps2ipc.c.

◆ ps2ipc_send()

int ps2ipc_send ( int  s,
const void *  dataptr,
int  size,
unsigned int  flags 
)

Definition at line 318 of file ps2ipc.c.

◆ ps2ipc_sendto()

int ps2ipc_sendto ( int  s,
const void *  dataptr,
int  size,
unsigned int  flags,
const struct sockaddr to,
int  tolen 
)

Definition at line 362 of file ps2ipc.c.

◆ ps2ipc_socket()

int ps2ipc_socket ( int  domain,
int  type,
int  protocol 
)

Definition at line 410 of file ps2ipc.c.

◆ ps2ipc_ps2ip_setconfig()

int ps2ipc_ps2ip_setconfig ( const t_ip_info ip_info)

Definition at line 436 of file ps2ipc.c.

◆ ps2ipc_ps2ip_getconfig()

int ps2ipc_ps2ip_getconfig ( char *  netif_name,
t_ip_info ip_info 
)

Definition at line 460 of file ps2ipc.c.

◆ ps2ipc_select()

int ps2ipc_select ( int  maxfdp1,
struct fd_set readset,
struct fd_set writeset,
struct fd_set exceptset,
struct timeval timeout 
)

Definition at line 484 of file ps2ipc.c.

◆ ps2ipc_ioctl()

int ps2ipc_ioctl ( int  s,
long  cmd,
void *  argp 
)

Definition at line 535 of file ps2ipc.c.

◆ ps2ipc_getsockname()

int ps2ipc_getsockname ( int  s,
struct sockaddr name,
int *  namelen 
)

Definition at line 566 of file ps2ipc.c.

◆ ps2ipc_getpeername()

int ps2ipc_getpeername ( int  s,
struct sockaddr name,
int *  namelen 
)

Definition at line 593 of file ps2ipc.c.

◆ ps2ipc_getsockopt()

int ps2ipc_getsockopt ( int  s,
int  level,
int  optname,
void *  optval,
socklen_t *  optlen 
)

Definition at line 620 of file ps2ipc.c.

◆ ps2ipc_setsockopt()

int ps2ipc_setsockopt ( int  s,
int  level,
int  optname,
const void *  optval,
socklen_t  optlen 
)

Definition at line 650 of file ps2ipc.c.

Variable Documentation

◆ _init_check

int _init_check = 0
static

Definition at line 24 of file ps2ipc.c.

◆ lock_sema

int lock_sema = -1
static

Definition at line 25 of file ps2ipc.c.

◆ _ps2ip

SifRpcClientData_t _ps2ip
static

Definition at line 26 of file ps2ipc.c.

◆ dns_servers

ip_addr_t dns_servers[DNS_MAX_SERVERS]
static

Definition at line 54 of file ps2ipc.c.

◆ ip_addr_any

const ip_addr_t ip_addr_any = IPADDR4_INIT(IPADDR_ANY)

Definition at line 58 of file ps2ipc.c.