4 ms·
Because they're interacting with network stacks using OS-specific interfaces. def enable_ip_forwarding(): os_platform = utils.get_os() if os_pl
by aetimmes 8y ago
Because they're interacting with network stacks using OS-specific interfaces.
def enable_ip_forwarding():
os_platform = utils.get_os()
if os_platform == 'mac':
cmd = ['/usr/sbin/sysctl', '-w', 'net.inet.ip.forwarding=1']
elif os_platform == 'linux':
cmd = ['sysctl', '-w', 'net.ipv4.ip_forward=1']
assert subprocess.call(cmd) == 0
- TheRealPomax 8y agoAh, that good old "all of US use macs, so we have no reason to make it work cross platform". "Aren't you making this for people to find IoT devices?" - "Yes?" - "Isn't probably more than half the student body _not_ on apple computers?"
- aetimmes 8y agoIn my experience, the % of students at Princeton using Apple computers is definitely north of 50%. However, given that they're students, I doubt they're the target audience for this utility, since they're likely not homeowners (if they're living in dorms, they likely don't have that many IoT devices to be worried about). The target audience is likely "privacy-minded technically capable home network owners", a significant proportion of whom likely skew towards Apple products.
- kkarakk 8y ago>The target audience is likely "privacy-minded technically capable home network owners" why would you use apple if you're technically capable? locked down linux would be waaaay more secure(and give you waaaaay cheaper options)
- bryan2 8y ago> privacy minded technically capable network home owners Uploads all data to Princeton’s servers.
- TheRealPomax 7y agoWhy would people who attend Princeton care about price, though?