1 of 1 people found this helpful
There are no high-level APIs for either side of this equation (monitoring or limiting network use). If you'd like to see such APIs added in the future, I encourage you to file an enhancement request describing your requirements. Please post your bug number, just for the record.
You could probably make some progress with an NKE (see the Network Kernel Extensions Programming Guide) but KEXT development presents some serious challenges:
Swift is not supported in the kernel, so your KEXT would have to be written in C or C++.
Deploying a KEXT requires special permission from Apple. See the Requesting a Certificate for Your Kext section of the Developer ID page for details.
KEXT development is hard; any mistake in your KEXT will take down the entire machine.
In addition to all of the difficulties with KEXT development in general, actually implementing these features is not easy. To start, you’d need a socket filter to track per-app usage but an IP filter to track and manage bandwidth. In addition, managing bandwith requires some gnarly TCP state machine tracking.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
Thanks eskimo for the response!
1st, I don't have any problems and therefore not encountering any bugs to report.
2nd, I really don't know the request protocol and don't have sufficient details to include in it.
So if you really believe my request will benefit MAC OS, and as you're a certified person within the apple community, I think it would be more effective if you filed it youself.
Simply a program, utility, or script that uses Nettop ability to perform a Network link conditioner task on specific application(s) running on the system.
Please let me know if you decide to go through with the request.
Thanks again, take care