smb_echo.c revision bbf6f00c25b6a2bed23c35eac6d62998ecdb338c
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
bbf6f00c25b6a2bed23c35eac6d62998ecdb338cJordan Brown * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The echo request is used to test the connection to the server,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and to see if the server is still responding. The tid is ignored,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * so this request may be sent to the server even if there are no
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * tree connections to the server.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Each response echoes the data sent, though ByteCount may indicate
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * no data. If echo-count is zero, no response is sent.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw unsigned short necho;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw unsigned short nbytes;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw unsigned short i;