Home |
Function xn_add_host_table_entry Function xn_delete_host_table_entry Function xn_interface_open_config Function xn_interface_ethernet_statistics Function xn_interface_statistics Function xn_rt_replace Function xn_send_ethernet_frame Function cb_wr_screen_string_fnc Function cb_rs232_connection_lost_fnc |
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.
|