1net_routeto(9F) Kernel Functions for Drivers net_routeto(9F)
2
3
4
6 net_routeto - indicate which network interface packets are sent
7
9 #include <sys/neti.h>
10
11 phy_if_t net_routeto(const net_data_t *net, struct sockaddr *address,
12 struct sockaddr *nexthop);
13
14
16 Solaris DDI specific (Solaris DDI).
17
19 net value returned from a successful call to net_proto‐
20 col_lookup(9F).
21
22
23 address network address to find a path out of the machine for.
24
25
26 nexthop pointer to the sockaddr structure in which to store the
27 address of the next hop. If this information is not
28 required, the value NULL may be passed instead.
29
30
32 The net_routeto() function indicates which network interface packets
33 destined for a particular address would be sent out of, according to
34 the systems network routing tables. If next is supplied as a non-NULL
35 pointer, the IP address of the nexthop router to be used is returned in
36 it.
37
39 The net_routeto() function returns:
40
41 -1 The network protocol does not support this function.
42
43
44 0 This function cannot find a route for the address given.
45
46
47 >0 Indicates which network interface can be used to reach the given
48 address.
49
50
52 The net_routeto() function may be called from user, kernel, or inter‐
53 rupt context.
54
56 See attributes(5) for descriptions of the following attributes:
57
58
59
60
61 ┌─────────────────────────────┬─────────────────────────────┐
62 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
63 ├─────────────────────────────┼─────────────────────────────┤
64 │Availability │SUNWcsu │
65 ├─────────────────────────────┼─────────────────────────────┤
66 │Interface Stability │Committed │
67 └─────────────────────────────┴─────────────────────────────┘
68
70 net_phygetnext(9F), net_phylookup(9F), net_protocol_lookup(9F),
71 attributes(5)
72
73
74
75SunOS 5.11 1 May 2008 net_routeto(9F)