Function ads::udp::add_route

source · []
pub fn add_route(
    target: (&str, u16),
    netid: AmsNetId,
    host: &str,
    routename: Option<&str>,
    username: Option<&str>,
    password: Option<&str>,
    temporary: bool
) -> Result<()>
Expand description

Send a UDP message for setting a route.

  • target: (host, port) of the AMS router to add the route to (the port should normally be ads::UDP_PORT)
  • netid: the NetID of the route’s target
  • host: the IP address or hostname of the route’s target (when using hostnames instead of IP addresses, beware of Windows hostname resolution)
  • routename: name of the route, default is host
  • username: system username for the router, default is Administrator
  • password: system password for the given user, default is 1
  • temporary: marks the route as “temporary”