mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-02-25 18:55:38 -06:00
add veilid_api logging to debug calls through the api
This commit is contained in:
@@ -14,7 +14,7 @@ cfg_if::cfg_if! {
|
||||
use self::windows::PlatformSupportWindows as PlatformSupport;
|
||||
} else if #[cfg(any(target_os = "macos", target_os = "ios"))] {
|
||||
use self::apple::PlatformSupportApple as PlatformSupport;
|
||||
} else if #[cfg(any(target_os = "openbsd"))] {
|
||||
} else if #[cfg(target_os = "openbsd")] {
|
||||
use self::openbsd::PlatformSupportOpenBSD as PlatformSupport;
|
||||
} else {
|
||||
compile_error!("No network interfaces support for this platform!");
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#![cfg(any(target_os = "openbsd"))]
|
||||
#![cfg(target_os = "openbsd")]
|
||||
#![allow(non_camel_case_types)]
|
||||
use super::*;
|
||||
|
||||
use libc::{
|
||||
close, freeifaddrs, getifaddrs, if_nametoindex, ifaddrs, ioctl, pid_t, sockaddr, sockaddr_in6, c_short,
|
||||
socket, sysctl, time_t, AF_INET6, CTL_NET, IFF_BROADCAST, IFF_LOOPBACK, IFF_POINTOPOINT,
|
||||
IFF_RUNNING, IFNAMSIZ, NET_RT_FLAGS, PF_ROUTE, SOCK_DGRAM,
|
||||
c_short, close, freeifaddrs, getifaddrs, if_nametoindex, ifaddrs, ioctl, pid_t, sockaddr,
|
||||
sockaddr_in6, socket, sysctl, time_t, AF_INET6, CTL_NET, IFF_BROADCAST, IFF_LOOPBACK,
|
||||
IFF_POINTOPOINT, IFF_RUNNING, IFNAMSIZ, NET_RT_FLAGS, PF_ROUTE, SOCK_DGRAM,
|
||||
};
|
||||
use sockaddr_tools::SockAddr;
|
||||
use std::ffi::CStr;
|
||||
@@ -29,7 +29,6 @@ const RTA_DST: c_int = 1;
|
||||
const RTA_GATEWAY: c_int = 2;
|
||||
const RTF_GATEWAY: c_int = 2;
|
||||
|
||||
|
||||
macro_rules! set_name {
|
||||
($name_field:expr, $name_str:expr) => {{
|
||||
let name_c = &::std::ffi::CString::new($name_str.to_owned()).map_err(|_| {
|
||||
@@ -364,7 +363,7 @@ impl PlatformSupportOpenBSD {
|
||||
Some(a) => a,
|
||||
None => continue,
|
||||
};
|
||||
|
||||
|
||||
let src_ipaddr = match saddr_src.as_ipaddr() {
|
||||
Some(a) => a,
|
||||
None => continue,
|
||||
|
||||
Reference in New Issue
Block a user