diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2012-03-09 00:23:16 -0600 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2012-03-09 00:23:16 -0600 |
commit | 6ea21d76494202f3f443ff87a0181a7ada847bc3 (patch) | |
tree | 69375366d2798ee15778b6adb2aaf36feb516670 /src | |
parent | 9d64d61326a2a1116c1c93a24aadf098e9eb2b59 (diff) |
Added socketpair and recvmsg JNA functions.
Diffstat (limited to 'src')
-rw-r--r-- | src/clojure/foofs/fuse/jna.clj | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/clojure/foofs/fuse/jna.clj b/src/clojure/foofs/fuse/jna.clj index 31c0a8c..00bfe6b 100644 --- a/src/clojure/foofs/fuse/jna.clj +++ b/src/clojure/foofs/fuse/jna.clj @@ -87,16 +87,22 @@ (def-jna getgid ["c" "getgid"] []) -;; This is the type signature for Linux, BSD is different. -(def-jna mount ["c" "mount" Function/THROW_LAST_ERROR] - [source target filesystemtype mountflags data] - (assert-args mount - (string? source) "source is a String" - (string? target) "target is a String" - (string? filesystemtype) "filesystemtype is a String" - (integer? mountflags) "mountflags is an integer" - (string? data) "data is a String") - [source target filesystemtype (int32_t mountflags) data]) +(def-jna socketpair ["c" "socketpair" Function/THROW_LAST_ERROR] + [domain type protocol sv] + (assert-args socketpair + (integer? domain) "domain is an integer" + (integer? type) "type is an integer" + (integer? protocol) "protocol is an integer" + (pointer? sv) "sv is a pointer") + [(int32_t domain) (int32_t type) (int32_t protocol) sv]) + +(def-jna recvmsg ["c" "recvmsg" Function/THROW_LAST_ERROR] + [sockfd, msg, flags] + (assert-args recvmsg + (integer? sockfd) "sockfd is an integer" + (pointer? msg) "msg is a pointer" + (integer? flags) "flags is an integer") + [(int32_t sockfd) msg (int32_t flags)]) (def-jna posix_spawn ["c" "posix_spawn"] [pid path file_actions attrp argv envp] |