linux/fs/smb/server/connection.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   Copyright (C) 2016 Namjae Jeon <[email protected]>
 *   Copyright (C) 2018 Samsung Electronics Co., Ltd.
 */

#include <linux/mutex.h>
#include <linux/freezer.h>
#include <linux/module.h>

#include "server.h"
#include "smb_common.h"
#include "mgmt/ksmbd_ida.h"
#include "connection.h"
#include "transport_tcp.h"
#include "transport_rdma.h"

static DEFINE_MUTEX(init_lock);

static struct ksmbd_conn_ops default_conn_ops;

LIST_HEAD();
DECLARE_RWSEM();

/**
 * ksmbd_conn_free() - free resources of the connection instance
 *
 * @conn:	connection instance to be cleand up
 *
 * During the thread termination, the corresponding conn instance
 * resources(sock/memory) are released and finally the conn object is freed.
 */
void ksmbd_conn_free(struct ksmbd_conn *conn)
{}

/**
 * ksmbd_conn_alloc() - initialize a new connection instance
 *
 * Return:	ksmbd_conn struct on success, otherwise NULL
 */
struct ksmbd_conn *ksmbd_conn_alloc(void)
{}

bool ksmbd_conn_lookup_dialect(struct ksmbd_conn *c)
{}

void ksmbd_conn_enqueue_request(struct ksmbd_work *work)
{}

void ksmbd_conn_try_dequeue_request(struct ksmbd_work *work)
{}

void ksmbd_conn_lock(struct ksmbd_conn *conn)
{}

void ksmbd_conn_unlock(struct ksmbd_conn *conn)
{}

void ksmbd_all_conn_set_status(u64 sess_id, u32 status)
{}

void ksmbd_conn_wait_idle(struct ksmbd_conn *conn, u64 sess_id)
{}

int ksmbd_conn_write(struct ksmbd_work *work)
{}

int ksmbd_conn_rdma_read(struct ksmbd_conn *conn,
			 void *buf, unsigned int buflen,
			 struct smb2_buffer_desc_v1 *desc,
			 unsigned int desc_len)
{}

int ksmbd_conn_rdma_write(struct ksmbd_conn *conn,
			  void *buf, unsigned int buflen,
			  struct smb2_buffer_desc_v1 *desc,
			  unsigned int desc_len)
{}

bool ksmbd_conn_alive(struct ksmbd_conn *conn)
{}

#define SMB1_MIN_SUPPORTED_HEADER_SIZE
#define SMB2_MIN_SUPPORTED_HEADER_SIZE

/**
 * ksmbd_conn_handler_loop() - session thread to listen on new smb requests
 * @p:		connection instance
 *
 * One thread each per connection
 *
 * Return:	0 on success
 */
int ksmbd_conn_handler_loop(void *p)
{}

void ksmbd_conn_init_server_callbacks(struct ksmbd_conn_ops *ops)
{}

int ksmbd_conn_transport_init(void)
{}

static void stop_sessions(void)
{}

void ksmbd_conn_transport_destroy(void)
{}