| 242 | #endif |
| 243 | |
| 244 | GCodeResult Network::EnableProtocol(unsigned int interface, NetworkProtocol protocol, int port, uint32_t ip, int secure, const StringRef& reply) noexcept |
| 245 | { |
| 246 | #if HAS_NETWORKING |
| 247 | |
| 248 | if (interface < GetNumNetworkInterfaces()) |
| 249 | { |
| 250 | return interfaces[interface]->EnableProtocol(protocol, port, ip, secure, reply); |
| 251 | } |
| 252 | |
| 253 | reply.printf("Invalid network interface '%d'\n", interface); |
| 254 | return GCodeResult::error; |
| 255 | #else |
| 256 | reply.copy(notSupportedText); |
| 257 | return GCodeResult::error; |
| 258 | #endif |
| 259 | } |
| 260 | |
| 261 | GCodeResult Network::DisableProtocol(unsigned int interface, NetworkProtocol protocol, const StringRef& reply) noexcept |
| 262 | { |