1 function psi\htonl(int $l) : int {
5 function psi\htons(int $s) : int {
10 function psi\ntohl(int $l) : int {
14 function psi\ntohs(int $s) : int {
20 function psi\inet_addr(string $cp) : int {
22 return to_int(inet_addr);
25 function psi\inet_ntoa(array $in) : string {
29 return to_string(inet_ntoa);
32 function psi\inet_ntop(int $af, string $src) : string {
34 let src = strval($src);
35 let size = psi\SIZEOF_STRUCT_SOCKADDR_STORAGE;
36 let dst = calloc(1, size);
37 return to_string(inet_ntop);
40 function psi\inet_pton(int $af, string $src, string &$dst) : int {
42 let src = strval($src);
43 let dst = calloc(1, psi\SIZEOF_STRUCT_SOCKADDR_STORAGE);
44 return to_int(inet_pton);
45 set $dst = to_string(dst, psi\SIZEOF_STRUCT_SOCKADDR_STORAGE);