SYMBOL INDEX (126 symbols across 7 files) FILE: comcast.go constant version (line 14) | version = "1.0.0" function main (line 16) | func main() { function parseLoss (line 56) | func parseLoss(loss string) float64 { function parseAddrs (line 69) | func parseAddrs(addrs string) ([]string, []string) { function parsePorts (line 102) | func parsePorts(ports string) []string { function parsePort (line 129) | func parsePort(port string) int { function validPort (line 138) | func validPort(port string) bool { function validRange (line 143) | func validRange(ports string) bool { function portHigher (line 161) | func portHigher(prt1, prt2 string) bool { function parseProtos (line 168) | func parseProtos(protos string) []string { FILE: throttler/ipfw.go constant ipfwAddPipe (line 8) | ipfwAddPipe = `sudo ipfw add 1 pipe 1 ip from any to any via ` constant ipfwTeardown (line 9) | ipfwTeardown = `sudo ipfw delete 1` constant ipfwConfig (line 10) | ipfwConfig = `sudo ipfw pipe 1 config` constant ipfwExists (line 11) | ipfwExists = `sudo ipfw list | grep "pipe 1"` constant ipfwCheck (line 12) | ipfwCheck = `sudo ipfw list` type ipfwThrottler (line 15) | type ipfwThrottler struct method setup (line 19) | func (i *ipfwThrottler) setup(c *Config) error { method teardown (line 31) | func (i *ipfwThrottler) teardown(_ *Config) error { method exists (line 36) | func (i *ipfwThrottler) exists() bool { method check (line 44) | func (i *ipfwThrottler) check() string { method buildConfigCommand (line 48) | func (i *ipfwThrottler) buildConfigCommand(c *Config) string { FILE: throttler/pfctl.go constant pfctlCreateAnchor (line 11) | pfctlCreateAnchor = `(cat /etc/pf.conf && echo "dummynet-anchor \"mop... constant pfctlTeardown (line 12) | pfctlTeardown = `sudo pfctl -f /etc/pf.conf` constant dnctl (line 13) | dnctl = `sudo dnctl pipe 1 config` constant pfctlCreateDummynet (line 14) | pfctlCreateDummynet = `echo $'dummynet in on %s all pipe 1'` constant pfctlExecuteInline (line 15) | pfctlExecuteInline = `%s | sudo pfctl -a mop -f - ` constant pfctlEnableFirewall (line 16) | pfctlEnableFirewall = `sudo pfctl -E` constant pfctlEnableFwRegex (line 17) | pfctlEnableFwRegex = `pf enabled` constant pfctlDisableFirewall (line 18) | pfctlDisableFirewall = `sudo pfctl -d` constant pfctlDisbleFwRegex (line 19) | pfctlDisbleFwRegex = `pf disabled` constant pfctlIsEnabled (line 20) | pfctlIsEnabled = `sudo pfctl -sa | grep -i enabled` constant dnctlIsConfigured (line 21) | dnctlIsConfigured = `sudo dnctl show` constant pfctlIsEnabledRegex (line 22) | pfctlIsEnabledRegex = `Enabled` constant dnctlTeardown (line 23) | dnctlTeardown = `sudo dnctl -q flush` type pfctlThrottler (line 26) | type pfctlThrottler struct method executeAndParse (line 31) | func (i *pfctlThrottler) executeAndParse(cmd string, match string) bool { method setup (line 46) | func (i *pfctlThrottler) setup(c *Config) error { method teardown (line 79) | func (i *pfctlThrottler) teardown(_ *Config) error { method isFirewallRunning (line 102) | func (i *pfctlThrottler) isFirewallRunning() bool { method exists (line 105) | func (i *pfctlThrottler) exists() bool { method check (line 112) | func (i *pfctlThrottler) check() string { method buildConfigCommand (line 173) | func (i *pfctlThrottler) buildConfigCommand(c *Config) []string { function addProtosToCommands (line 116) | func addProtosToCommands(cmds []string, protos []string) []string { function addPortsToCommand (line 127) | func addPortsToCommand(cmd string, ports []string) []string { function addIpsAndProtoToCommands (line 139) | func addIpsAndProtoToCommands(ipVersion int, cmds []string, ips []string... function addProtoToCommands (line 160) | func addProtoToCommands(ipVersion int, cmd string, protos []string) []st... FILE: throttler/pfctl_test.go function TestPfctlDefaultConfigCommand (line 7) | func TestPfctlDefaultConfigCommand(t *testing.T) { function TestPfctlThrottleOnlyConfigCommand (line 28) | func TestPfctlThrottleOnlyConfigCommand(t *testing.T) { function TestPfctlNoIPThrottleConfigCommand (line 49) | func TestPfctlNoIPThrottleConfigCommand(t *testing.T) { function TestPfctlPacketSetup (line 72) | func TestPfctlPacketSetup(t *testing.T) { function TestPfctlProtoSetup (line 91) | func TestPfctlProtoSetup(t *testing.T) { function TestPfctlMultiplePortsAndIps (line 119) | func TestPfctlMultiplePortsAndIps(t *testing.T) { function TestPfctlMixedIPv6Setup (line 150) | func TestPfctlMixedIPv6Setup(t *testing.T) { FILE: throttler/tc.go constant tcRootQDisc (line 12) | tcRootQDisc = `dev %s handle 10: root` constant tcRootExtra (line 13) | tcRootExtra = `default 1` constant tcDefaultClass (line 14) | tcDefaultClass = `dev %s parent 10: classid 10:1` constant tcTargetClass (line 15) | tcTargetClass = `dev %s parent 10: classid 10:10` constant tcNetemRule (line 16) | tcNetemRule = `dev %s parent 10:10 handle 100:` constant tcRate (line 17) | tcRate = `rate %vkbit` constant tcDelay (line 18) | tcDelay = `delay %vms` constant tcLoss (line 19) | tcLoss = `loss %v%%` constant tcAddClass (line 20) | tcAddClass = `sudo tc class add` constant tcDelClass (line 21) | tcDelClass = `sudo tc class del` constant tcAddQDisc (line 22) | tcAddQDisc = `sudo tc qdisc add` constant tcDelQDisc (line 23) | tcDelQDisc = `sudo tc qdisc del` constant iptAddTarget (line 24) | iptAddTarget = `sudo %s -A POSTROUTING -t mangle -j CLASSIFY --set-cla... constant iptDelTarget (line 25) | iptDelTarget = `sudo %s -D POSTROUTING -t mangle -j CLASSIFY --set-cla... constant iptDestIP (line 26) | iptDestIP = `-d %s` constant iptProto (line 27) | iptProto = `-p %s` constant iptDestPorts (line 28) | iptDestPorts = `--match multiport --dports %s` constant iptDestPort (line 29) | iptDestPort = `--dport %s` constant iptDelSearch (line 30) | iptDelSearch = `class 0010:0010` constant iptList (line 31) | iptList = `sudo %s -S -t mangle` constant ip4Tables (line 32) | ip4Tables = `iptables` constant ip6Tables (line 33) | ip6Tables = `ip6tables` constant iptDel (line 34) | iptDel = `sudo %s -t mangle -D` constant tcExists (line 35) | tcExists = `sudo tc qdisc show | grep "netem"` constant tcCheck (line 36) | tcCheck = `sudo tc -s qdisc` type tcThrottler (line 39) | type tcThrottler struct method setup (line 43) | func (t *tcThrottler) setup(cfg *Config) error { method teardown (line 211) | func (t *tcThrottler) teardown(cfg *Config) error { method exists (line 273) | func (t *tcThrottler) exists() bool { method check (line 281) | func (t *tcThrottler) check() string { function addRootQDisc (line 67) | func addRootQDisc(cfg *Config, c commander) error { function addDefaultClass (line 76) | func addDefaultClass(cfg *Config, c commander) error { function addTargetClass (line 93) | func addTargetClass(cfg *Config, c commander) error { function addNetemRule (line 110) | func addNetemRule(cfg *Config, c commander) error { function addIptablesRules (line 132) | func addIptablesRules(cfg *Config, c commander) error { function addIptablesRulesForAddrs (line 152) | func addIptablesRulesForAddrs(cfg *Config, c commander, command string, ... function delIptablesRules (line 223) | func delIptablesRules(cfg *Config, c commander) error { function delRootQDisc (line 263) | func delRootQDisc(cfg *Config, c commander) error { FILE: throttler/tc_test.go type cmdRecorder (line 7) | type cmdRecorder struct method execute (line 17) | func (r *cmdRecorder) execute(cmd string) error { method executeGetLines (line 22) | func (r *cmdRecorder) executeGetLines(cmd string) ([]string, error) { method commandExists (line 30) | func (r *cmdRecorder) commandExists(cmd string) bool { method verifyCommands (line 39) | func (r *cmdRecorder) verifyCommands(t *testing.T, expected []string) { function newCmdRecorder (line 13) | func newCmdRecorder() *cmdRecorder { function TestTcPacketLossSetup (line 71) | func TestTcPacketLossSetup(t *testing.T) { function TestTcWildcardIps (line 87) | func TestTcWildcardIps(t *testing.T) { function TestTcMultiplePortsAndIps (line 106) | func TestTcMultiplePortsAndIps(t *testing.T) { function TestTcMixedIPv6Setup (line 126) | func TestTcMixedIPv6Setup(t *testing.T) { function TestTcTeardown (line 144) | func TestTcTeardown(t *testing.T) { function TestTcTeardownNoIpTables (line 173) | func TestTcTeardownNoIpTables(t *testing.T) { function TestTcIPv6Teardown (line 184) | func TestTcIPv6Teardown(t *testing.T) { function TestTcTeardownNoIPv6 (line 209) | func TestTcTeardownNoIPv6(t *testing.T) { FILE: throttler/throttler.go constant linux (line 13) | linux = "linux" constant darwin (line 14) | darwin = "darwin" constant freebsd (line 15) | freebsd = "freebsd" constant windows (line 16) | windows = "windows" constant checkOSXVersion (line 17) | checkOSXVersion = "sw_vers -productVersion" constant ipfw (line 18) | ipfw = "ipfw" constant pfctl (line 19) | pfctl = "pfctl" type Config (line 23) | type Config struct type throttler (line 37) | type throttler interface type commander (line 44) | type commander interface type dryRunCommander (line 50) | type dryRunCommander struct method execute (line 142) | func (c *dryRunCommander) execute(cmd string) error { method executeGetLines (line 147) | func (c *dryRunCommander) executeGetLines(cmd string) ([]string, error) { method commandExists (line 152) | func (c *dryRunCommander) commandExists(cmd string) bool { type shellCommander (line 52) | type shellCommander struct method execute (line 156) | func (c *shellCommander) execute(cmd string) error { method executeGetLines (line 161) | func (c *shellCommander) executeGetLines(cmd string) ([]string, error) { method commandExists (line 192) | func (c *shellCommander) commandExists(cmd string) bool { function setup (line 56) | func setup(t throttler, cfg *Config) { function teardown (line 72) | func teardown(t throttler, cfg *Config) { function Run (line 90) | func Run(cfg *Config) {