Merge branch 'master' into great-refactor
This commit is contained in:
commit
7914b41107
@ -3,15 +3,26 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#define INADDR_LOOPBACK 0x7f000001
|
||||
#define INADDR_ANY 0x00000000
|
||||
#define INADDR_BROADCAST 0xFFFFFFFF
|
||||
#define INADDR_NONE 0xFFFFFFFF
|
||||
|
||||
#define INET_ADDRSTRLEN 16
|
||||
|
||||
//#define IPPROTO_IP ???
|
||||
//#define IPPROTO_TCP ???
|
||||
//#define IPPROTO_UDP ???
|
||||
/*
|
||||
* Protocols (See RFC 1700 and the IANA)
|
||||
*/
|
||||
#define IPPROTO_IP 0 /* dummy for IP */
|
||||
#define IPPROTO_UDP 17 /* user datagram protocol */
|
||||
#define IPPROTO_TCP 6 /* tcp */
|
||||
|
||||
#define IP_TOS 7
|
||||
#define IP_TTL 8
|
||||
#define IP_MULTICAST_LOOP 9
|
||||
#define IP_MULTICAST_TTL 10
|
||||
#define IP_ADD_MEMBERSHIP 11
|
||||
#define IP_DROP_MEMBERSHIP 12
|
||||
|
||||
typedef uint16_t in_port_t;
|
||||
typedef uint32_t in_addr_t;
|
||||
@ -26,3 +37,9 @@ struct sockaddr_in {
|
||||
struct in_addr sin_addr;
|
||||
unsigned char sin_zero[8];
|
||||
};
|
||||
|
||||
/* Request struct for multicast socket ops */
|
||||
struct ip_mreq {
|
||||
struct in_addr imr_multiaddr; /* IP multicast address of group */
|
||||
struct in_addr imr_interface; /* local IP address of interface */
|
||||
};
|
||||
|
@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
//#define SOL_TCP ???
|
||||
#define SOL_TCP 6 /* TCP level */
|
||||
|
||||
//#define TCP_NODELAY ???
|
||||
enum{
|
||||
_CTRU_TCP_OPT = 0x2000, /* Flag for tcp opt values */
|
||||
TCP_NODELAY = 1 | _CTRU_TCP_OPT, /* Don't delay send to coalesce packets */
|
||||
TCP_MAXSEG = 2 | _CTRU_TCP_OPT,
|
||||
};
|
||||
|
@ -28,24 +28,29 @@
|
||||
#define SHUT_WR 1
|
||||
#define SHUT_RDWR 2
|
||||
|
||||
#define SO_DEBUG 0x0001
|
||||
#define SO_ACCEPTCONN 0x0002
|
||||
//#define SO_DEBUG 0x0001 // not working
|
||||
//#define SO_ACCEPTCONN 0x0002 // not working
|
||||
#define SO_REUSEADDR 0x0004
|
||||
#define SO_KEEPALIVE 0x0008
|
||||
#define SO_DONTROUTE 0x0010
|
||||
#define SO_BROADCAST 0x0020
|
||||
//#define SO_KEEPALIVE 0x0008 // not working
|
||||
//#define SO_DONTROUTE 0x0010 // not working
|
||||
//#define SO_BROADCAST 0x0020 // not working
|
||||
#define SO_USELOOPBACK 0x0040
|
||||
#define SO_LINGER 0x0080
|
||||
#define SO_OOBINLINE 0x0100
|
||||
#define SO_REUSEPORT 0x0200
|
||||
#define SO_SNDBUF 0x1001
|
||||
#define SO_RCVBUF 0x1002
|
||||
#define SO_SNDLOWAT 0x1003
|
||||
#define SO_RCVLOWAT 0x1004
|
||||
#define SO_SNDTIMEO 0x1005
|
||||
#define SO_RCVTIMEO 0x1006
|
||||
#define SO_ERROR 0x1007
|
||||
#define SO_TYPE 0x1008
|
||||
//#define SO_REUSEPORT 0x0200 // not working
|
||||
|
||||
/*
|
||||
* Additional options, not kept in so_options.
|
||||
*/
|
||||
#define SO_SNDBUF 0x1001 /* send buffer size */
|
||||
#define SO_RCVBUF 0x1002 /* receive buffer size */
|
||||
#define SO_SNDLOWAT 0x1003 /* send low-water mark */
|
||||
#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
|
||||
//#define SO_SNDTIMEO 0x1005 /* send timeout */ // not working
|
||||
//#define SO_RCVTIMEO 0x1006 /* receive timeout */ // not working
|
||||
|
||||
#define SO_TYPE 0x1008 /* get socket type */
|
||||
#define SO_ERROR 0x1009 /* get error status and clear */
|
||||
|
||||
typedef uint32_t socklen_t;
|
||||
typedef uint16_t sa_family_t;
|
||||
|
@ -528,7 +528,7 @@ PrintConsole* consoleInit(gfxScreen_t screen, PrintConsole* console) {
|
||||
|
||||
gfxSetScreenFormat(screen,GSP_RGB565_OES);
|
||||
gfxSetDoubleBuffering(screen,false);
|
||||
gfxSwapBuffers();
|
||||
gfxSwapBuffersGpu();
|
||||
gspWaitForVBlank();
|
||||
|
||||
console->frameBuffer = (u16*)gfxGetFramebuffer(screen, GFX_LEFT, NULL, NULL);
|
||||
|
@ -9,7 +9,14 @@ static Handle CFGU_handle = 0;
|
||||
|
||||
Result initCfgu()
|
||||
{
|
||||
return srvGetServiceHandle(&CFGU_handle, "cfg:u");
|
||||
Result ret;
|
||||
|
||||
// cfg:i has the most commands, then cfg:s, then cfg:u
|
||||
ret = srvGetServiceHandle(&CFGU_handle, "cfg:i");
|
||||
if(ret) ret = srvGetServiceHandle(&CFGU_handle, "cfg:s");
|
||||
if(ret) ret = srvGetServiceHandle(&CFGU_handle, "cfg:u");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Result exitCfgu()
|
||||
|
Loading…
Reference in New Issue
Block a user