PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ps2ip_rpc.h
Go to the documentation of this file.
1
7
#ifndef __PS2IP_RPC_H__
8
#define __PS2IP_RPC_H__
9
10
#include <
tamtypes.h
>
11
#include <
tcpip.h
>
12
#include <
sys/time.h
>
13
14
#define PS2IP_IRX 0xB0125F2
15
16
enum
PS2IPS_RPC_ID {
17
PS2IPS_ID_ACCEPT = 1,
18
PS2IPS_ID_BIND,
19
PS2IPS_ID_DISCONNECT,
20
PS2IPS_ID_CONNECT,
21
PS2IPS_ID_LISTEN,
22
PS2IPS_ID_RECV,
23
PS2IPS_ID_RECVFROM,
24
PS2IPS_ID_SEND,
25
PS2IPS_ID_SENDTO,
26
PS2IPS_ID_SOCKET,
27
PS2IPS_ID_SETCONFIG,
28
PS2IPS_ID_GETCONFIG,
29
PS2IPS_ID_SELECT,
30
PS2IPS_ID_IOCTL,
31
PS2IPS_ID_GETSOCKNAME,
32
PS2IPS_ID_GETPEERNAME,
33
PS2IPS_ID_GETSOCKOPT,
34
PS2IPS_ID_SETSOCKOPT,
35
PS2IPS_ID_GETHOSTBYNAME,
36
#ifdef PS2IP_DNS
37
/* Not implemented:
38
gethostbyname_r -> Redudant because it gets called over the RPC.
39
freeaddrinfo -> too complicated and probably nobody uses it?
40
getaddrinfo -> too complicated and probably nobody uses it? */
41
42
PS2IPS_ID_DNS_SETSERVER,
43
PS2IPS_ID_DNS_GETSERVER,
44
#endif
45
46
PS2IPS_ID_COUNT
47
};
48
49
typedef
struct
50
{
51
s32 domain;
52
s32 type;
53
s32 protocol;
54
}
socket_pkt
;
55
56
typedef
struct
57
{
58
s32 ssize;
59
s32 esize;
60
u8 *sbuf;
61
u8 *ebuf;
62
u8 sbuffer[64];
63
u8 ebuffer[64];
64
}
rests_pkt
;
65
66
typedef
struct
67
{
68
s32 socket;
69
s32 length;
70
s32 flags;
71
void
*ee_addr;
72
struct
sockaddr
sockaddr
;
// sizeof = 16
73
s32 malign;
75
u8 malign_buff[64];
76
}
send_pkt
;
77
78
typedef
struct
79
{
80
s32 socket;
81
s32 length;
82
s32 flags;
83
void
*ee_addr;
84
void
*intr_data;
85
}
s_recv_pkt
;
86
87
typedef
struct
88
{
89
s32 ret;
90
struct
sockaddr
sockaddr
;
91
}
r_recv_pkt
;
92
93
typedef
struct
94
{
95
s32 socket;
96
struct
sockaddr
sockaddr
;
97
s32 len;
98
}
cmd_pkt
;
99
100
typedef
struct
101
{
102
s32 retval;
103
struct
sockaddr
sockaddr
;
104
}
ret_pkt
;
105
106
typedef
struct
107
{
108
s32 s;
109
s32 backlog;
110
}
listen_pkt
;
111
112
typedef
struct
113
{
114
s32 s;
115
s32 level;
116
s32 optname;
117
}
getsockopt_pkt
;
118
119
typedef
struct
120
{
121
s32 result;
122
s32 optlen;
123
u8 buffer[128];
124
}
getsockopt_res_pkt
;
125
126
typedef
struct
127
{
128
s32 s;
129
s32 level;
130
s32 optname;
131
s32 optlen;
132
u8 buffer[128];
133
}
setsockopt_pkt
;
134
135
typedef
struct
136
{
137
union
138
{
139
s32 maxfdp1;
140
s32 result;
141
};
142
struct
timeval
*timeout_p;
143
struct
timeval
timeout;
144
struct
fd_set
*readset_p;
145
struct
fd_set
*writeset_p;
146
struct
fd_set
*exceptset_p;
147
struct
fd_set
readset;
148
struct
fd_set
writeset;
149
struct
fd_set
exceptset;
150
}
select_pkt
;
151
152
typedef
struct
153
{
154
union
155
{
156
s32 s;
157
s32 result;
158
};
159
u32 cmd;
160
void
*argp;
161
u32 value;
162
}
ioctl_pkt
;
163
164
#ifdef PS2IP_DNS
165
struct
hostent_res
166
{
167
s16 h_addrtype;
168
s16 h_length;
169
ip_addr_t
h_addr;
170
};
171
172
typedef
struct
173
{
174
s32 result;
175
struct
hostent_res
hostent
;
176
} gethostbyname_res_pkt;
177
178
typedef
struct
179
{
180
ip_addr_t
dnsserver;
181
u8 numdns;
182
} dns_setserver_pkt;
183
184
typedef
struct
185
{
186
ip_addr_t
dnsserver;
187
} dns_getserver_res_pkt;
188
189
#endif
190
191
#endif
/* __PS2IP_RPC_H__ */
cmd_pkt
Definition
ps2ip_rpc.h:94
getsockopt_pkt
Definition
ps2ip_rpc.h:113
getsockopt_res_pkt
Definition
ps2ip_rpc.h:120
ioctl_pkt
Definition
ps2ip_rpc.h:153
listen_pkt
Definition
ps2ip_rpc.h:107
r_recv_pkt
Definition
ps2ip_rpc.h:88
rests_pkt
Definition
fileXio.h:70
ret_pkt
Definition
ps2ip_rpc.h:101
s_recv_pkt
Definition
ps2ip_rpc.h:79
select_pkt
Definition
ps2ip_rpc.h:136
send_pkt
Definition
ps2ip_rpc.h:67
setsockopt_pkt
Definition
ps2ip_rpc.h:127
socket_pkt
Definition
ps2ip_rpc.h:50
tamtypes.h
tcpip.h
fd_set
Definition
tcpip.h:1809
hostent
Definition
tcpip.h:1911
ip4_addr
Definition
tcpip.h:237
sockaddr
Definition
tcpip.h:1533
time.h
timeval
Definition
time.h:29
common
include
ps2ip_rpc.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8