This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Refer: http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Delaying_only_some_traffic | |
| #Refer: http://www.bomisofmab.com/blog/?p=100 | |
| #Refer: http://drija.com/linux/41983/simulating-a-low-bandwidth-high-latency-network-connection-on-linux/ | |
| #Setup the rate control and delay | |
| sudo tc qdisc add dev lo root handle 1: htb default 12 | |
| sudo tc class add dev lo parent 1:1 classid 1:12 htb rate 56kbps ceil 128kbps | |
| sudo tc qdisc add dev lo parent 1:12 netem delay 200ms | |
| #Remove the rate control/delay | |
| sudo tc qdisc del dev lo root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // main.m | |
| // ProtectTest | |
| // Demonstrates newer versions of iOS now support PROT_EXEC pages, for just-in-time compilation. | |
| // | |
| // Must be compiled with Thumb disabled | |
| // | |
| // Created by Stuart Carnie on 3/4/11. | |
| // Copyright 2011 Manomio LLC. All rights reserved. | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2009-2017, Farooq Mela | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. | |
| * 2. Redistributions in binary form must reproduce the above copyright |
NewerOlder