summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-02-28 11:30:45 +0100
committerLinus Färnstrand <linus@mullvad.net>2017-02-28 11:30:45 +0100
commit3b0e1c8ab01170f457965e10c72ad83e75afd7f1 (patch)
tree03a394c71c10318e79d8b6a02382fff5f6bafd2f
parent79bc647a17fb46a6a15106a514eaa215e812cacf (diff)
downloadmullvadvpn-3b0e1c8ab01170f457965e10c72ad83e75afd7f1.tar.xz
mullvadvpn-3b0e1c8ab01170f457965e10c72ad83e75afd7f1.zip
Move INTERESTING_EVENTS down to ffi module
-rw-r--r--talpid_openvpn_plugin/src/ffi/mod.rs7
-rw-r--r--talpid_openvpn_plugin/src/lib.rs8
2 files changed, 6 insertions, 9 deletions
diff --git a/talpid_openvpn_plugin/src/ffi/mod.rs b/talpid_openvpn_plugin/src/ffi/mod.rs
index d706d5b2fd..726bcae403 100644
--- a/talpid_openvpn_plugin/src/ffi/mod.rs
+++ b/talpid_openvpn_plugin/src/ffi/mod.rs
@@ -22,6 +22,11 @@ error_chain!{
}
}
+/// All the OpenVPN events this plugin will register for listening to. Edit this variable to change
+/// events.
+pub static INTERESTING_EVENTS: &'static [OpenVpnPluginEvent] = &[OpenVpnPluginEvent::Up,
+ OpenVpnPluginEvent::RoutePredown];
+
/// Struct sent to `openvpn_plugin_open_v3` containing input values.
#[repr(C)]
@@ -83,7 +88,7 @@ pub extern "C" fn openvpn_plugin_open_v3(_version: c_int,
-> c_int {
println!("openvpn_plugin_open_v3()");
unsafe {
- (*retptr).type_mask = events_to_bitmask(::INTERESTING_EVENTS);
+ (*retptr).type_mask = events_to_bitmask(INTERESTING_EVENTS);
}
OPENVPN_PLUGIN_FUNC_SUCCESS
}
diff --git a/talpid_openvpn_plugin/src/lib.rs b/talpid_openvpn_plugin/src/lib.rs
index 6308a7b373..d2d1ea9d74 100644
--- a/talpid_openvpn_plugin/src/lib.rs
+++ b/talpid_openvpn_plugin/src/lib.rs
@@ -13,11 +13,3 @@ mod ffi;
/// Publicly export the functions making up the public interface of the plugin. These are the C FFI
/// functions called by OpenVPN.
pub use ffi::{openvpn_plugin_open_v3, openvpn_plugin_close_v1, openvpn_plugin_func_v3};
-
-use ffi::consts::OpenVpnPluginEvent;
-
-
-/// All the OpenVPN events this plugin will register for listening to. Edit this variable to change
-/// events.
-pub static INTERESTING_EVENTS: &'static [OpenVpnPluginEvent] = &[OpenVpnPluginEvent::Up,
- OpenVpnPluginEvent::RoutePredown];