#starttype struct apr_os_sock_info_t
# field os_sock , Ptr <apr_os_sock_t>
--- FIXME
+-- FIXME: sockaddr
-- # field local , Ptr <sockaddr>
-- # field remote , Ptr <sockaddr>
# field family , CInt
--- /dev/null
+#include <bindings.dsl.h>
+#include <apr_random.h>
+
+module Bindings.APR.Random where
+#strict_import
+import Bindings.APR
+import Bindings.APR.ErrNo
+import Bindings.APR.Pools
+import Bindings.APR.Thread.Proc
+
+#opaque_t apr_crypto_hash_t
+
+#callback apr_crypto_hash_init_t , Ptr <apr_crypto_hash_t> -> IO ()
+#callback apr_crypto_hash_add_t , Ptr <apr_crypto_hash_t> -> Ptr () -> <apr_size_t> -> IO ()
+#callback apr_crypto_hash_finish_t, Ptr <apr_crypto_hash_t> -> Ptr CUChar -> IO ()
+
+#ccall apr_crypto_sha256_new, Ptr <apr_pool_t> -> IO (Ptr <apr_crypto_hash_t>)
+
+#opaque_t apr_random_t
+
+#ccall apr_random_init , Ptr <apr_random_t> -> Ptr <apr_pool_t> -> Ptr <apr_crypto_hash_t> -> Ptr <apr_crypto_hash_t> -> Ptr <apr_crypto_hash_t> -> IO ()
+#ccall apr_random_standard_new , Ptr <apr_pool_t> -> IO (Ptr <apr_random_t>)
+#ccall apr_random_add_entropy , Ptr <apr_random_t> -> Ptr () -> <apr_size_t> -> IO ()
+#ccall apr_random_insecure_bytes, Ptr <apr_random_t> -> Ptr () -> <apr_size_t> -> IO <apr_status_t>
+#ccall apr_random_secure_bytes , Ptr <apr_random_t> -> Ptr () -> <apr_size_t> -> IO <apr_status_t>
+#ccall apr_random_barrier , Ptr <apr_random_t> -> IO ()
+#ccall apr_random_secure_ready , Ptr <apr_random_t> -> IO <apr_status_t>
+#ccall apr_random_insecure_ready, Ptr <apr_random_t> -> IO <apr_status_t>
+#ccall apr_random_after_fork , Ptr <apr_proc_t> -> IO ()