X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3903760236c30e3b5ace7a4eefac3a269d68957c..5ba3f43ea354af8ad55bea84372a2bc834d8757c:/bsd/netinet/in_tclass.h diff --git a/bsd/netinet/in_tclass.h b/bsd/netinet/in_tclass.h index 430de9f27..d42713162 100644 --- a/bsd/netinet/in_tclass.h +++ b/bsd/netinet/in_tclass.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016 Apple Inc. All rights reserved. + * Copyright (c) 2015-2017 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -64,6 +64,29 @@ struct so_tcdbg { #define NET_QOS_MARKING_POLICY_ENABLE QOS_MODE_MARKING_POLICY_ENABLE /* obsolete, to be removed */ #define NET_QOS_MARKING_POLICY_DISABLE QOS_MODE_MARKING_POLICY_DISABLE /* obsolete, to be removed */ +struct net_qos_param { + u_int64_t nq_transfer_size; /* transfer size in bytes */ + u_int32_t nq_use_expensive:1, /* allowed = 1 otherwise 0 */ + nq_uplink:1; /* uplink = 1 otherwise 0 */ + u_int32_t nq_unused; /* for future expansion */ +}; + +#ifndef KERNEL + +/* + * Returns whether a large upload or download transfer should be marked as + * BK service type for network activity. This is a system level + * hint/suggestion to classify application traffic based on statistics + * collected from the current network attachment + * + * @param param transfer parameters + * @param param_len parameter length + * @return returns 1 for BK and 0 for default + */ +extern int net_qos_guideline(struct net_qos_param *param, size_t param_len); + +#endif /* !KERNEL */ + #ifdef BSD_KERNEL_PRIVATE extern int net_qos_policy_restricted;