9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9f / net_routeto.9f
blob6b712656e6bf9dfcca2026a56edfdd6f4950cd23
1 '\" te
2 .\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH NET_ROUTETO 9F "May 1, 2008"
7 .SH NAME
8 net_routeto \- indicate which network interface packets are sent
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/neti.h>
14 \fBphy_if_t\fR \fBnet_routeto\fR(\fBconst\fR \fBnet_data_t\fR *\fInet\fR, \fBstruct\fR \fBsockaddr\fR *\fIaddress\fR,
15      \fBstruct\fR \fBsockaddr\fR *\fInexthop\fR);
16 .fi
18 .SH INTERFACE LEVEL
19 .sp
20 .LP
21 Solaris DDI specific (Solaris DDI).
22 .SH PARAMETERS
23 .sp
24 .ne 2
25 .na
26 \fB\fInet\fR\fR
27 .ad
28 .RS 11n
29 value returned from a successful call to \fBnet_protocol_lookup\fR(9F).
30 .RE
32 .sp
33 .ne 2
34 .na
35 \fB\fIaddress\fR\fR
36 .ad
37 .RS 11n
38 network address to find a path out of the machine for.
39 .RE
41 .sp
42 .ne 2
43 .na
44 \fB\fInexthop\fR\fR
45 .ad
46 .RS 11n
47 pointer to the \fBsockaddr\fR structure in which to store the address of the
48 next hop. If this information is not required, the value \fBNULL\fR may be
49 passed instead.
50 .RE
52 .SH DESCRIPTION
53 .sp
54 .LP
55 The \fBnet_routeto()\fR function indicates which network interface packets
56 destined for a particular address would be sent out of, according to the
57 systems network routing tables. If \fBnext\fR is supplied as a non-\fBNULL\fR
58 pointer, the \fBIP\fR address of the \fBnexthop\fR router to be used is
59 returned in it.
60 .SH RETURN VALUES
61 .sp
62 .LP
63 The \fBnet_routeto()\fR function returns:
64 .sp
65 .ne 2
66 .na
67 \fB-1\fR
68 .ad
69 .RS 6n
70 The network protocol does not support this function.
71 .RE
73 .sp
74 .ne 2
75 .na
76 \fB0\fR
77 .ad
78 .RS 6n
79 This function cannot find a route for the address given.
80 .RE
82 .sp
83 .ne 2
84 .na
85 \fB>0\fR
86 .ad
87 .RS 6n
88 Indicates which network interface can be used to reach the given address.
89 .RE
91 .SH CONTEXT
92 .sp
93 .LP
94 The \fBnet_routeto()\fR function may be called from user,  kernel, or interrupt
95 context.
96 .SH ATTRIBUTES
97 .sp
98 .LP
99 See \fBattributes\fR(5) for descriptions of the following attributes:
104 box;
105 c | c
106 l | l .
107 ATTRIBUTE TYPE  ATTRIBUTE VALUE
109 Interface Stability     Committed
112 .SH SEE ALSO
115 \fBnet_phygetnext\fR(9F), \fBnet_phylookup\fR(9F),
116 \fBnet_protocol_lookup\fR(9F), \fBattributes\fR(5)