/*
* CDDL HEADER START
*
* 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.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2016 Nexenta Systems, Inc. All rights reserved.
*/
#include <sys/pathname.h>
#include <smbsrv/smb_vops.h>
#include <smbsrv/smb_kproto.h>
#include <smbsrv/smb_kstat.h>
/*
* SMB Network Socket API
*
* smb_soshutdown: Disconnect a socket created with smb_socreate
* smb_sodestroy: Release resources associated with a socket
* smb_sosend: Send the contents of a buffer on a socket
* smb_sorecv: Receive data into a buffer from a socket
* smb_iov_sosend: Send the contents of an iovec on a socket
* smb_iov_sorecv: Receive data into an iovec from a socket
*/
{
int err = 0;
CRED());
if (err != 0)
return (NULL);
else
return (sock);
}
/*
* smb_soshutdown will disconnect the socket and prevent subsequent PDU
* reception and transmission. The sonode still exists but its state
* gets modified to indicate it is no longer connected. Calls to
* smb_sorecv/smb_iov_sorecv will return so smb_soshutdown can be used
* regain control of a thread stuck in smb_sorecv.
*/
void
{
}
/*
* smb_sodestroy releases all resources associated with a socket previously
* created with smb_socreate. The socket must be shutdown using smb_soshutdown
* before the socket is destroyed with smb_sodestroy, otherwise undefined
* behavior will result.
*/
void
{
}
int
{
int err;
CRED())) != 0) {
return (err);
}
/* Successful receive */
}
/*
* smb_net_txl_constructor
*
* Transmit list constructor
*/
void
{
}
/*
* smb_net_txl_destructor
*
* Transmit list destructor
*/
void
{
}
/*
* smb_net_send_uio
*
* This routine puts the transmit buffer passed in on the wire.
* If another thread is already sending, block on the CV.
*/
int
{
int rc = 0;
/*
* Wait for our turn to send.
*/
/*
* OK, try to send.
*
* This should block until we've sent it all,
* or given up due to errors (socket closed).
*/
if (rc != 0)
break;
}
return (rc);
}