File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ ifndef Ps4Sdk
2+ ifdef ps4sdk
3+ Ps4Sdk := $(ps4sdk )
4+ endif
5+ ifdef PS4SDK
6+ Ps4Sdk := $(PS4SDK )
7+ endif
8+ ifndef Ps4Sdk
9+ $(error Neither PS4SDK, Ps4Sdk nor ps4sdk set)
10+ endif
11+ endif
12+
13+ target ?= ps4_elf
14+ Cf := -Wno-zero-length-array # sysproto.h
15+
16+ include $(Ps4Sdk ) /make/ps4sdk.mk
Original file line number Diff line number Diff line change 1+ #define _XOPEN_SOURCE 700
2+ #define __BSD_VISIBLE 1
3+ #define _KERNEL
4+ #define _STANDALONE
5+ #define _WANT_UCRED
6+ #include <sys/cdefs.h>
7+ #include <sys/types.h>
8+ #include <sys/param.h>
9+ #include <sys/kernel.h>
10+ //#include <sys/libkern.h>
11+ #include <sys/systm.h>
12+ #include <sys/syscallsubr.h>
13+
14+ #undef offsetof
15+ #include <ps4/kernel.h>
16+ #include <ps4/kern.h>
17+
18+ #define SERVER_PORT 5057
19+ #define SERVER_BACKLOG 10
20+
21+ int main (int argc , char * * argv )
22+ {
23+ // send this elf to 5054, connect, see connection get closed
24+ // send this elf to 5055, close browser, connect, see connection get closed ^^
25+ struct thread * td = ps4KernThreadCurrent ();
26+ int client = ps4KernUtilServerCreateSingleAccept (td , SERVER_PORT ); //other versions exits
27+ kern_close (td , client );
28+ return 0 ;
29+ }
You can’t perform that action at this time.
0 commit comments