PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ps2ipee.h
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
11#ifndef __PS2IPEE_H__
12#define __PS2IPEE_H__
13
14#include <ps2ip.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/* From include/lwip/sockets.h: */
21int lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
22int lwip_bind(int s, const struct sockaddr *name, socklen_t namelen);
23int lwip_shutdown(int s, int how);
24int lwip_getpeername (int s, struct sockaddr *name, socklen_t *namelen);
25int lwip_getsockname (int s, struct sockaddr *name, socklen_t *namelen);
26int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen);
27int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen);
28int lwip_close(int s);
29int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen);
30int lwip_listen(int s, int backlog);
31int lwip_recv(int s, void *mem, size_t len, int flags);
32int lwip_read(int s, void *mem, size_t len);
33int lwip_recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
34int lwip_send(int s, const void *dataptr, size_t size, int flags);
35int lwip_sendto(int s, const void *dataptr, size_t size, int flags, const struct sockaddr *to, socklen_t tolen);
36int lwip_socket(int domain, int type, int protocol);
37int lwip_write(int s, const void *dataptr, size_t size);
38int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout);
39int lwip_ioctl(int s, long cmd, void *argp);
40int lwip_fcntl(int s, int cmd, int val);
41
42int ps2ip_setconfig(const t_ip_info* ip_info);
43int ps2ip_getconfig(char* netif_name,t_ip_info* ip_info);
44
45/* From include/lwip/inet.h: */
46u32 ipaddr_addr(const char *cp);
47int ip4addr_aton(const char *cp, ip4_addr_t *addr);
49char *ip4addr_ntoa(const ip4_addr_t *addr);
50char *ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen);
51
52#ifdef PS2IP_DNS
53/* From include/lwip/netdb.h: */
54struct hostent *lwip_gethostbyname(const char *name);
55int lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf,
56 size_t buflen, struct hostent **result, int *h_errnop);
57void lwip_freeaddrinfo(struct addrinfo *ai);
58int lwip_getaddrinfo(const char *nodename,
59 const char *servname,
60 const struct addrinfo *hints,
61 struct addrinfo **res);
62
63/* From include/lwip/dns.h: */
64void dns_setserver(u8 numdns, const ip_addr_t *dnsserver);
65const ip_addr_t* dns_getserver(u8 numdns);
66#endif
67
68#ifdef __cplusplus
69}
70#endif
71
72#endif // !defined(IOP_PS2IP_INTERNAL_H)
Definition time.h:29