![]() |
Home |
|
Function xn_rt_replaceReplaces an entry in the routing table. int xn_rt_replace(const BYTE * dest, const BYTE * mask, const BYTE * gw, int iface, const BYTE * new_gw, int new_iface); ParametersdestDestination IP address. maskDestination network mask. gwExisting gateway to replace or NULL to match any gateway. ifaceInterface number of the existing route to replace or -1 to match any route. new_gwIP address of the new gateway. new_ifaceInterface number of the new route. return valueReturns 0 if successful, otherwise SOCKET_ERROR. The only possible error is that no matching existing route was found. This function scans the routing table for an existing entry matching parameters dest, mask, gw, and iface. If found, the entry is replaced with parameters new_gw and new_iface. Unlike with function xn_rt_del, the new route takes effect immediately, even for sockets connected before xn_rt_replace was called.
|