tcp.d.in revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * Convert a TCP state value to a string. 2N/A * tcpinfo is the TCP header fields. 2N/A * tcpsinfo contains stable TCP details from tcp_t. 2N/A * tcplsinfo provides the old tcp state for state changes. 2N/A * __dtrace_tcp_tcph_t is used by the tcpinfo_t * translator to take either 2N/A * the non-NULL tcph_t * passed in or, if it is NULL, uses arg3 (tcp_t *) 2N/A * from the tcp:::send and tcp:::recieve probes and translates the tcp_t * 2N/A * into the tcpinfo_t. When no headers are available - as is the case for 2N/A * TCP fusion tcp:::send and tcp:::receive - this allows us to present the 2N/A * consumer with header data based on tcp_t * content and hide TCP fusion 2N/A * implementation details. 2N/A * The following two members should just use tcp_t->tcp_loopback 2N/A * and tcp_t->tcp_active_open, however these are bit fields and 2N/A * can't be used until CR 6876830 is fixed. Meanwhile we source 2N/A * them a different way. 2N/A * Determine if send is a retransmission by comparing the seq # to 2N/A * < rexmit_max, this is a retransmission. Cannot use tcp_rexmit 2N/A * bitfield value due to CR 6876830. 2N/A * Note: although we specify that the old state argument used as the 2N/A * input to the tcplsinfo_t translator is an int32_t, it reaches us as an 2N/A * int64_t (since it is a probe argument) so explicitly cast it back to 2N/A * interpret the negatively-valued states correctly.