File: session.h

package info (click to toggle)
ksmbd-tools 3.5.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 684 kB
  • sloc: ansic: 10,753; makefile: 104; sh: 1
file content (38 lines) | stat: -rw-r--r-- 809 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *   Copyright (C) 2018 Samsung Electronics Co., Ltd.
 *
 *   linux-cifsd-devel@lists.sourceforge.net
 */

#ifndef __MANAGEMENT_TCONNECTION_H__
#define __MANAGEMENT_TCONNECTION_H__

#include <glib.h>

struct ksmbd_user;

struct ksmbd_session {
	unsigned long long	id;

	struct ksmbd_user	*user;

	GRWLock			update_lock;
	GList			*tree_conns;
	int			ref_counter;
};

struct ksmbd_tree_conn;

int sm_check_sessions_capacity(unsigned long long id);

int sm_handle_tree_connect(unsigned long long id,
			   struct ksmbd_user *user,
			   struct ksmbd_tree_conn *tree_conn);
int sm_handle_tree_disconnect(unsigned long long sess_id,
			      unsigned long long tree_conn_id);

void sm_destroy(void);
void sm_init(void);

#endif /* __MANAGEMENT_TCONNECTION_H__ */