]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix.vapi: add inet_addr(3), inet_ntoa(3), htonl(3), htons(3), ntohl(3), ntohs(3...
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>
Sat, 24 Oct 2009 12:40:36 +0000 (14:40 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 31 Oct 2009 13:12:56 +0000 (14:12 +0100)
Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
vapi/posix.vapi

index af9227f80c35a85627b3faf74a336bb9aace5fa1..f2267a329b9fc97c34e46f69089feea657b668ff 100644 (file)
@@ -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 {
        }