IPRouteAddHost
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
long IPRouteAddHost( dword hostAddr, byte macId[] ); // form 1long IPRouteAddHost( byte hostAddr[], byte macId[] ); // form 2long IPRouteAddHost( IP_Address hostAddr, qword macId ); // form 3
Description
With this function, it is possible to add a static host route to the routing table of an interface in the TCP/IP stack. When such a route is installed, the TCP/IP stack will no longer perform an ARP request or neighbor solicitation when a message is sent to this destination. It is necessary that an interface or network route already exists. So the dedicated interface for this route can be found. When there is no interface route found, it is possible to add one with the function IPRouteAddInterface. Example The IP address 192.168.1.1/24 is configured on your network adapter. This means an interface route to the network 192.168.1.00/24 is automatically installed on measurement start. So it’s possible to add a host route to any address of this network, e.g., 192.168.1.10.Parameters
- hostAddr: The IPv4 or IPv6 destination address of the route
- macId: The mac ID of the host route
Return Values
- 0: The function completed successfully.
- 1: The function is not supported on the selected TCP/IP stack.
- WSA_INVALID_PARAMETER (87): Invalid parameter given
- SOCKET_ERROR (-1): The function failed. Call IpGetLastError to get a more specific error code.