From: Michael 'Mickey' Lauer Date: Sat, 24 Oct 2009 12:40:36 +0000 (+0200) Subject: posix.vapi: add inet_addr(3), inet_ntoa(3), htonl(3), htons(3), ntohl(3), ntohs(3... X-Git-Tag: 0.7.8~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6ba6826da5169f731eefb307a9da9ea81868fa7;p=thirdparty%2Fvala.git posix.vapi: add inet_addr(3), inet_ntoa(3), htonl(3), htons(3), ntohl(3), ntohs(3), and InAddr Signed-off-by: Michael 'Mickey' Lauer --- diff --git a/vapi/posix.vapi b/vapi/posix.vapi index af9227f80..f2267a329 100644 --- a/vapi/posix.vapi +++ b/vapi/posix.vapi @@ -470,6 +470,19 @@ namespace Posix { public unowned Group? getgrent (); public void setgrent (); + [CCode (cheader_filename = "arpa/inet.h")] + public uint32 inet_addr (string host); + [CCode (cheader_filename = "arpa/inet.h")] + public weak string inet_ntoa (InAddr addr); + [CCode (cheader_filename = "arpa/inet.h")] + public uint32 htonl (uint32 hostlong); + [CCode (cheader_filename = "arpa/inet.h")] + public uint32 ntohl (uint32 netlong); + [CCode (cheader_filename = "arpa/inet.h")] + public uint16 htons (uint16 hostshort); + [CCode (cheader_filename = "arpa/inet.h")] + public uint16 ntohs (uint16 netshort); + [CCode (cheader_filename = "math.h")] public double acos (double x); [CCode (cheader_filename = "math.h")] @@ -1239,6 +1252,11 @@ namespace Posix { [CCode (cheader_filename = "sys/socket.h")] public int socketpair (int domain, int type, int protocol, int[] sv); + [CCode (cname = "struct in_addr", cheader_filename = "sys/socket.h", destroy_function = "")] + public struct InAddr { + public uint32 s_addr; + } + [CCode (cname = "struct sock_addr", cheader_filename = "sys/socket.h", destroy_function = "")] public struct SockAddr { }