"Fossies" - the Fresh Open Source Software Archive 
Member "smbnetfs-0.6.3/src/smb_conn.h" (1 Feb 2018, 2875 Bytes) of package /linux/misc/smbnetfs-0.6.3.tar.bz2:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "smb_conn.h" see the
Fossies "Dox" file reference documentation and the last
Fossies "Diffs" side-by-side code changes report:
0.6.1_vs_0.6.2.
1 #ifndef __SMB_CONN_H__
2 #define __SMB_CONN_H__
3
4 #include <time.h>
5 #include <sys/types.h>
6 #include <unistd.h>
7 #include "smb_conn_proto.h"
8 #include "list.h"
9
10 struct smb_conn_ctx{
11 LIST smb_conn_file_list;
12 time_t access_time;
13 pthread_mutex_t mutex;
14 char *shmem_ptr;
15 size_t shmem_size;
16 int conn_fd;
17 };
18
19 struct smb_conn_file{
20 LIST entries;
21 time_t access_time; // file_handle acess time
22 smb_conn_srv_fd srv_fd; // smb_conn_srv file descriptor
23 struct smb_conn_ctx *ctx; // smb_conn context
24 char *url; // samba url (without "smb:/")
25 enum smb_conn_cmd reopen_cmd;
26 int reopen_flags;
27 };
28
29 typedef struct smb_conn_file* smb_conn_fd;
30
31
32 int smb_conn_set_max_retry_count(int count);
33 int smb_conn_set_max_passwd_query_count(int count);
34 int smb_conn_set_server_reply_timeout(int timeout);
35
36 int smb_conn_ctx_init(struct smb_conn_ctx *ctx, size_t shmem_size);
37 int smb_conn_ctx_destroy(struct smb_conn_ctx *ctx);
38
39 smb_conn_fd smb_conn_open(struct smb_conn_ctx *ctx,
40 const char *url, int flags, mode_t mode);
41 smb_conn_fd smb_conn_creat(struct smb_conn_ctx *ctx,
42 const char *url, mode_t mode);
43 ssize_t smb_conn_read(struct smb_conn_ctx *ctx,
44 smb_conn_fd fd, off_t offset,
45 void *buf, size_t bufsize);
46 ssize_t smb_conn_write(struct smb_conn_ctx *ctx,
47 smb_conn_fd fd, off_t offset,
48 const void *buf, size_t bufsize);
49 int smb_conn_close(struct smb_conn_ctx *ctx,
50 smb_conn_fd fd);
51 int smb_conn_unlink(struct smb_conn_ctx *ctx,
52 const char *url);
53 int smb_conn_rename(struct smb_conn_ctx *ctx,
54 const char *old_url, const char *new_url);
55 smb_conn_fd smb_conn_opendir(struct smb_conn_ctx *ctx,
56 const char *url);
57 int smb_conn_closedir(struct smb_conn_ctx *ctx,
58 smb_conn_fd fd);
59 ssize_t smb_conn_readdir(struct smb_conn_ctx *ctx,
60 smb_conn_fd fd, void *buf, size_t bufsize);
61 int smb_conn_mkdir(struct smb_conn_ctx *ctx,
62 const char *url, mode_t mode);
63 int smb_conn_rmdir(struct smb_conn_ctx *ctx,
64 const char *url);
65 int smb_conn_stat(struct smb_conn_ctx *ctx,
66 const char *url, struct stat *st);
67 int smb_conn_fstat(struct smb_conn_ctx *ctx,
68 smb_conn_fd fd, struct stat *st);
69 int smb_conn_ftruncate(struct smb_conn_ctx *ctx,
70 smb_conn_fd fd, off_t size);
71 int smb_conn_chmod(struct smb_conn_ctx *ctx,
72 const char *url, mode_t mode);
73 int smb_conn_utimes(struct smb_conn_ctx *ctx,
74 const char *url, struct timeval *tbuf);
75 int smb_conn_setxattr(struct smb_conn_ctx *ctx,
76 const char *url, const char *name,
77 const void *value, size_t size, int flags);
78 int smb_conn_getxattr(struct smb_conn_ctx *ctx,
79 const char *url, const char *name,
80 void *value, size_t size);
81 int smb_conn_listxattr(struct smb_conn_ctx *ctx,
82 const char *url,
83 char *list, size_t size);
84 int smb_conn_removexattr(struct smb_conn_ctx *ctx,
85 const char *url, const char *name);
86
87 #endif /* __SMB_CONN_H__ */