pspsdk-1.0+beta2
pspnet_inet.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * pspnet_inet.h - PSP networking libraries.
7  *
8  * Copyright (c) 2005 Marcus R. Brown <mrbrown@0xd6.org>
9  *
10  * Portions based on PspPet's wifi_03 sample code.
11  *
12  * $Id: pspnet_inet.h 1541 2005-12-08 05:49:20Z mrbrown $
13  */
14 
15 #ifndef PSPNET_INET_H
16 #define PSPNET_INET_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 int sceNetInetInit(void);
23 int sceNetInetTerm(void);
24 
25 /* The real sceNetInet socket prototypes are in <sys/socket.h>. */
26 #ifdef DOXYGEN
27 int sceNetInetAccept(int s, struct sockaddr *addr, socklen_t *addrlen);
28 int sceNetInetBind(int s, const struct sockaddr *my_addr, socklen_t addrlen);
29 int sceNetInetConnect(int s, const struct sockaddr *serv_addr, socklen_t addrlen);
30 int sceNetInetGetsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
31 int sceNetInetListen(int s, int backlog);
32 size_t sceNetInetRecv(int s, void *buf, size_t len, int flags);
33 size_t sceNetInetRecvfrom(int s, void *buf, size_t flags, int, struct sockaddr *from, socklen_t *fromlen);
34 size_t sceNetInetSend(int s, const void *buf, size_t len, int flags);
35 size_t sceNetInetSendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
36 int sceNetInetSetsockopt(int s, int level, int optname, const void *optval, socklen_t optlen);
37 int sceNetInetShutdown(int s, int how);
38 int sceNetInetSocket(int domain, int type, int protocol);
39 int sceNetInetClose(int s);
40 int sceNetInetGetErrno(void);
41 #endif /* DOXYGEN */
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif /* PSPNET_INET_H */