mirror of
https://github.com/IllusionMan1212/vitasdk-odin.git
synced 2026-10-24 02:12:38 +00:00
added kernel libraries bindings and cleaned up todos
This commit is contained in:
+13
-2
@@ -2,6 +2,7 @@ package net
|
||||
|
||||
import "core:c"
|
||||
foreign import net "system:SceNet_stub"
|
||||
foreign import netps "system:SceNetPsForDriver_stub"
|
||||
|
||||
@(link_prefix = "sceNet")
|
||||
foreign net {
|
||||
@@ -74,8 +75,6 @@ foreign net {
|
||||
InetNtop :: proc(af: c.int, src: rawptr, dst: cstring, size: c.uint) -> cstring ---
|
||||
InetPton :: proc(af: c.int, src: cstring, dst: rawptr) -> c.int ---
|
||||
|
||||
//TODO : create BSD aliases ?
|
||||
|
||||
Htonll :: proc(host64: c.ulonglong) -> c.ulonglong ---
|
||||
Htonl :: proc(host32: c.uint) -> c.uint ---
|
||||
Htons :: proc(host16: c.ushort) -> c.ushort ---
|
||||
@@ -90,3 +89,15 @@ foreign net {
|
||||
*/
|
||||
ErrnoLoc :: proc() -> ^c.int ---
|
||||
}
|
||||
|
||||
foreign netps {
|
||||
ksceNetSocket :: proc(name: cstring, domain: c.int, type: c.int, protocol: c.int) -> c.int ---
|
||||
ksceNetAccept :: proc(s: c.int, addr: ^SceNetSockaddr, addrlen: ^c.uint) -> c.int ---
|
||||
ksceNetBind :: proc(s: c.int, #by_ptr addr: SceNetSockaddr, addrlen: c.uint) -> c.int ---
|
||||
ksceNetConnect :: proc(s: c.int, #by_ptr name: SceNetSockaddr, namelen: c.uint) -> c.int ---
|
||||
ksceNetListen :: proc(s: c.int, backlog: c.int) -> c.int ---
|
||||
ksceNetRecvfrom :: proc(s: c.int, buf: rawptr, len: c.uint, flags: c.int, from: ^SceNetSockaddr, fromlen: ^c.uint) -> c.int ---
|
||||
ksceNetSendto :: proc(s: c.int, msg: rawptr, len: c.uint, flags: c.int, #by_ptr to: SceNetSockaddr, tolen: c.uint) -> c.int ---
|
||||
ksceNetSetsockopt :: proc(s: c.int, level: c.int, optname: c.int, optval: rawptr, optlen: c.uint) -> c.int ---
|
||||
ksceNetClose :: proc(s: c.int) -> c.int ---
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user