/*
- * Copyright (c) 2004-2017 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2018 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
@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;
};
*/
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