Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / net_ispartialchecksum.9f
blob38cb2e4a4f670db9644f1d730d2e1c43e362f62c
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_ISPARTIALCHECKSUM 9F "May 1, 2008"
7 .SH NAME
8 net_ispartialchecksum \- indicate if a packet is being scheduled for hardware
9 checksum calculation
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/neti.h>
15 \fBint\fR \fBnet_ispartialchecksum\fR(\fBconst\fR \fBnet_data_t\fR \fInet\fR, \fBmblk_t\fR *\fImb\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 7n
29 value returned from a successful call to \fBnet_protocol_lookup\fR(9F).
30 .RE
32 .sp
33 .ne 2
34 .na
35 \fB\fImb\fR\fR
36 .ad
37 .RS 6n
38 the \fBmblk\fR structure holding a packet that is the subject of this query.
39 .RE
41 .SH DESCRIPTION
42 .sp
43 .LP
44 The \fBnet_ispartialchecksum()\fR function looks at the fields within the
45 \fBmblk\fR structure to determine if the packet contained inside contains
46 headers with only partial checksum values. Partial checksum values are stored
47 inside headers when the calculation of the complete checksum is being handled
48 by the hardware.
49 .SH RETURN VALUES
50 .sp
51 .LP
52 The \fBnet_ispartialchecksum()\fR function returns:
53 .sp
54 .ne 2
55 .na
56 \fB-1\fR
57 .ad
58 .RS 6n
59 The network protocol does not support this function.
60 .RE
62 .sp
63 .ne 2
64 .na
65 \fB0\fR
66 .ad
67 .RS 6n
68 The packet does not contain partial checksums.
69 .RE
71 .sp
72 .LP
73 If a packet is marked for hardware checksum'ing, the following values are
74 returned:
75 .sp
76 .ne 2
77 .na
78 \fB\fBNET_HCK_L3_FULL\fR\fR
79 .ad
80 .RS 19n
81 Complete layer 3 checksum calculated
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fBNET_HCK_L3_PART\fR\fR
88 .ad
89 .RS 19n
90 Partial layer 3 checksum calculated
91 .RE
93 .sp
94 .ne 2
95 .na
96 \fB\fBNET_HCK_L4_FULL\fR\fR
97 .ad
98 .RS 19n
99 Complete layer 4 checksum calculated
103 .ne 2
105 \fB\fBNET_HCK_L4_PART\fR\fR
107 .RS 19n
108 Partial layer 4 checksum calculated
111 .SH CONTEXT
114 The \fBnet_ispartialchecksum()\fR function may be called from user,  kernel, or
115 interrupt context.
116 .SH ATTRIBUTES
119 See \fBattributes\fR(5) for descriptions of the following attributes:
124 box;
125 c | c
126 l | l .
127 ATTRIBUTE TYPE  ATTRIBUTE VALUE
129 Interface Stability     Committed
132 .SH SEE ALSO
135 \fBnet_isvalidchecksum\fR(9F), \fBnet_protocol_lookup\fR(9F),
136 \fBattributes\fR(5)