summaryrefslogtreecommitdiff
path: root/libc/src/redox/net.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/redox/net.rs')
-rw-r--r--libc/src/redox/net.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/libc/src/redox/net.rs b/libc/src/redox/net.rs
index 0916916..fcbb181 100644
--- a/libc/src/redox/net.rs
+++ b/libc/src/redox/net.rs
@@ -9,8 +9,10 @@ s! {
pub s_addr: in_addr_t,
}
+ #[cfg_attr(feature = "align", repr(align(4)))]
pub struct in6_addr {
pub s6_addr: [u8; 16],
+ #[cfg(not(feature = "align"))]
__align: [u32; 0],
}
@@ -107,4 +109,16 @@ extern {
pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int,
value: *const ::c_void,
option_len: socklen_t) -> ::c_int;
+ pub fn getpeername(socket: ::c_int, address: *mut sockaddr,
+ address_len: *mut socklen_t) -> ::c_int;
+ pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
+ flags: ::c_int, addr: *const sockaddr,
+ addrlen: socklen_t) -> ::ssize_t;
+ pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
+ flags: ::c_int) -> ::ssize_t;
+ pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+ flags: ::c_int, addr: *mut ::sockaddr,
+ addrlen: *mut ::socklen_t) -> ::ssize_t;
+ pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+ flags: ::c_int) -> ::ssize_t;
}