| 1 | mod control_message; |
| 2 | pub mod interface; |
| 3 | pub mod networkaddress; |
| 4 | mod raw_socket; |
| 5 | pub mod socket; |
| 6 | |
| 7 | /// Turn a C failure (-1 is returned) into a rust Result |
| 8 | pub(crate) fn cerr(t: libc::c_int) -> std::io::Result<libc::c_int> { |
| 9 | match t { |
| 10 | -1 => Err(std::io::Error::last_os_error()), |
| 11 | _ => Ok(t), |
| 12 | } |
| 13 | } |