]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/kpi_interface.h
xnu-4903.221.2.tar.gz
[apple/xnu.git] / bsd / net / kpi_interface.h
index 15b7fd09fc3d64de19a7ac77694142fe3d3e5384..ba4736d593c25438fa65c25a9ca1480720c864b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2017 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2018 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  *
@@ -3133,7 +3133,7 @@ typedef errno_t (*ifnet_clone_destroy_func)(ifnet_t interface);
        @field ifc_destroy The function to destroy an interface.
 */
 struct ifnet_clone_params {
-       const char                                      *ifc_name;
+       const char                      *ifc_name;
        ifnet_clone_create_func         ifc_create;
        ifnet_clone_destroy_func        ifc_destroy;
 };
@@ -3556,6 +3556,44 @@ extern errno_t ifnet_get_buffer_status(const ifnet_t interface,
  */
 extern void ifnet_normalise_unsent_data(void);
 
+/*************************************************************************/
+/* Low Power Mode                                                        */
+/*************************************************************************/
+
+/*!
+       @function ifnet_set_low_power_mode
+       @param interface The interface.
+       @param on Set the truth value that the interface is in low power mode.
+       @result Returns 0 on success, error number otherwise.
+ */
+extern errno_t ifnet_set_low_power_mode(ifnet_t interface, boolean_t on);
+
+/*!
+       @function ifnet_get_low_power_mode
+       @param interface The interface.
+       @param on On output contains the truth value that the interface
+               is in low power mode.
+       @result Returns 0 on success, error number otherwise.
+ */
+extern errno_t ifnet_get_low_power_mode(ifnet_t interface, boolean_t *on);
+
+/*!
+ @function ifnet_touch_lastupdown
+ @discussion Updates the lastupdown value to now.
+ @param interface The interface.
+ @result 0 on success otherwise the errno error.
+ */
+extern errno_t ifnet_touch_lastupdown(ifnet_t interface);
+
+/*!
+ @function ifnet_updown_delta
+ @discussion Retrieves the difference between lastupdown and now.
+ @param interface The interface.
+ @param updown_delta A timeval struct to copy the delta between lastupdown and now.
+ to.
+ */
+extern errno_t ifnet_updown_delta(ifnet_t interface, struct timeval *updown_delta);
+
 #endif /* KERNEL_PRIVATE */
 
 __END_DECLS