MCPcopy Create free account
hub / github.com/Windscribe/Desktop-App / changeMtu

Function changeMtu

src/helper/linux/process_command.cpp:79–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79std::string changeMtu(const std::string &pars)
80{
81 std::string adapterName;
82 int mtu;
83 deserializePars(pars, adapterName, mtu);
84
85 if (!Validation::isValidInterfaceName(adapterName)) {
86 spdlog::error("Invalid interface name: {}", adapterName);
87 return std::string();
88 }
89
90 spdlog::info("Change MTU: {}", mtu);
91 Utils::executeCommand("ip", {"link", "set", "dev", adapterName.c_str(), "mtu", std::to_string(mtu)});
92 return std::string();
93}
94
95std::string executeOpenVPN(const std::string &pars)
96{

Callers

nothing calls this directly

Calls 4

deserializeParsFunction · 0.85
isValidInterfaceNameFunction · 0.85
to_stringFunction · 0.85
executeCommandFunction · 0.70

Tested by

no test coverage detected