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: */
21extern int lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
22extern int lwip_bind(int s, const struct sockaddr *name, socklen_t namelen);
23extern int lwip_shutdown(int s, int how);
24extern int lwip_getpeername (int s, struct sockaddr *name, socklen_t *namelen);
25extern int lwip_getsockname (int s, struct sockaddr *name, socklen_t *namelen);
26extern int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen);
27extern int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen);
28extern int lwip_close(int s);
29extern int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen);
30extern int lwip_listen(int s, int backlog);
31extern int lwip_recv(int s, void *mem, size_t len, int flags);
32extern int lwip_read(int s, void *mem, size_t len);
33extern int lwip_recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
34extern int lwip_send(int s, const void *dataptr, size_t size, int flags);
35extern int lwip_sendto(int s, const void *dataptr, size_t size, int flags, const struct sockaddr *to, socklen_t tolen);
36extern int lwip_socket(int domain, int type, int protocol);
37extern int lwip_write(int s, const void *dataptr, size_t size);
38extern int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout);
39extern int lwip_ioctl(int s, long cmd, void *argp);
40extern int lwip_fcntl(int s, int cmd, int val);
41
42extern int ps2ip_setconfig(const t_ip_info* ip_info);
43extern int ps2ip_getconfig(char* netif_name,t_ip_info* ip_info);
44
45/* From include/lwip/inet.h: */
46extern u32 ipaddr_addr(const char *cp);
47extern int ip4addr_aton(const char *cp, ip4_addr_t *addr);
49extern char *ip4addr_ntoa(const ip4_addr_t *addr);
50extern char *ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen);
51
52#ifdef PS2IP_DNS
53/* From include/lwip/netdb.h: */
54extern struct hostent *lwip_gethostbyname(const char *name);
55extern int lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf,
56 size_t buflen, struct hostent **result, int *h_errnop);
57extern void lwip_freeaddrinfo(struct addrinfo *ai);
58extern int 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: */
64extern void dns_setserver(u8 numdns, const ip_addr_t *dnsserver);
65extern const 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