Kernel functions net_routeto(9F) NAME net_routeto - return an indentifier to indicate which net- work interace packets destined for a particular destination are sent SYNOPSIS #include phy_if_t net_routeto(const net_data_t *net, struct sockaddr *addresss, struct sockaddr *nexthop); INTERFACE LEVEL Solaris DDI specific (Solaris DDI) PARAMETERS address network address to find a path out of the machine for. next pointer to sockaddr structure in which to store the address of the next hop. If this information is not required, the value NULL may be passed instead. DESCRIPTION This function can be used to discover which network inter- face packets destined for a particular address would be sent out of, according to the systems network routing tables. If next is supplied as a non-NULL pointer, the IP address of the nexthop router to be used is returned in it. RETURN VALUE This function returns -1 if it is not supported by the net- work protocol, 0 if it cannot find a route for the address given and otherwise, a value greater than 0 to indicate which network interface can be used to reach the given address. ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Interface Stability | Committed | |_____________________________|_____________________________| SEE ALSO net_phylookup(9f), net_phygetnext(9f) SunOS 5.10 Last change: 25 March 2008 1