change PAD_ScanPads()s behaviour. the return value now contains a bitmask of the...
[libogc.git] / libdb / tcpip.h
blob99f9db73e26ca2dabf1523e9cca70aa76f386456
1 #ifndef __TCPIP_H__
2 #define __TCPIP_H__
4 #include "uIP/uip.h"
5 #include <sys/time.h>
6 #include <sys/types.h>
8 #define AF_UNSPEC 0
9 #define AF_INET 2
10 #define PF_INET AF_INET
11 #define PF_UNSPEC AF_UNSPEC
13 #define INADDR_ANY 0
14 #define INADDR_BROADCAST 0xffffffff
16 #ifndef socklen_t
17 #define socklen_t u32_t
18 #endif
20 #ifndef HAVE_IN_ADDR
21 #define HAVE_IN_ADDR
22 struct in_addr {
23 u32 s_addr;
25 #endif
27 struct sockaddr_in {
28 u8 sin_len;
29 u8 sin_family;
30 u16 sin_port;
31 struct in_addr sin_addr;
32 s8 sin_zero[8];
35 struct sockaddr {
36 u8 sa_len;
37 u8 sa_family;
38 s8 sa_data[14];
41 struct dbginterface* tcpip_init(struct uip_ip_addr *localip,struct uip_ip_addr *netmask,struct uip_ip_addr *gateway,u16 port);
43 void tcpip_close(s32_t s);
44 void tcpip_starttimer(s32_t s);
45 void tcpip_stoptimer(s32_t s);
46 s32_t tcpip_socket();
47 s32_t tcpip_listen(s32_t s,u32_t backlog);
48 s32_t tcpip_bind(s32_t s,struct sockaddr *name,socklen_t *namelen);
49 s32_t tcpip_accept(s32_t s);
50 s32_t tcpip_read(s32_t s,void *buffer,u32_t len);
51 s32_t tcpip_write(s32_t s,const void *buffer,u32_t len);
53 #endif