#include <windows.h>
#include <strsafe.h>
#include <stdio.h>
#include "wintirpc.h"
#include "rpc/rpc.h"
#include "name_cache.h"
#include "daemon_debug.h"
#include "nfs41.h"
#include "util.h"
Go to the source code of this file.
|
void | nfs41_server_list_init () |
|
static int | server_compare (const struct list_entry *entry, const void *value) |
|
static int | server_entry_find (IN struct server_list *servers, IN const struct server_info *info, OUT struct list_entry **entry_out) |
|
static int | server_create (IN const struct server_info *info, OUT nfs41_server **server_out) |
|
static void | server_free (IN nfs41_server *server) |
|
static __inline void | server_ref_locked (IN nfs41_server *server) |
|
void | nfs41_server_ref (IN nfs41_server *server) |
|
void | nfs41_server_deref (IN nfs41_server *server) |
|
static void | server_addrs_add (IN OUT struct server_addrs *addrs, IN const netaddr4 *addr) |
|
void | nfs41_server_addrs (IN nfs41_server *server, OUT multi_addr4 *addrs) |
|
int | nfs41_server_find_or_create (IN const char *server_owner_major_id, IN const char *server_scope, IN const netaddr4 *addr, OUT nfs41_server **server_out) |
|
int | nfs41_server_resolve (IN const char *hostname, IN unsigned short port, OUT multi_addr4 *addrs) |
|
◆ server_entry
◆ SRVLVL
◆ nfs41_server_addrs()
Definition at line 203 of file nfs41_server.c.
206{
209
210
214
217 }
219}
VOID WINAPI ReleaseSRWLockShared(PSRWLOCK Lock)
VOID WINAPI AcquireSRWLockShared(PSRWLOCK Lock)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
#define NFS41_ADDRS_PER_SERVER
netaddr4 arr[NFS41_ADDRS_PER_SERVER]
static rfbScreenInfoPtr server
◆ nfs41_server_deref()
Definition at line 155 of file nfs41_server.c.
157{
159
163 if (
server->ref_count == 0) {
166 }
167
169}
static void list_remove(struct list_entry *entry)
static void server_free(IN nfs41_server *server)
static struct server_list g_server_list
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
Referenced by nfs41_client_free(), and update_server().
◆ nfs41_server_find_or_create()
Definition at line 221 of file nfs41_server.c.
226{
231
232 info.owner = server_owner_major_id;
233 info.scope = server_scope;
234
236
238
239
242
245
248
250 "returning new server %p\n",
server);
251 } else {
253 "returning %d\n",
status);
254 }
255 } else {
258
260 "returning existing server %p\n",
server);
261 }
262
264
266
268 }
269
273}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static struct list_entry * list_search(const struct list_entry *head, const void *value, list_compare_fn compare)
GLenum const GLvoid * addr
#define server_entry(pos)
static __inline void server_ref_locked(IN nfs41_server *server)
static void server_addrs_add(IN OUT struct server_addrs *addrs, IN const netaddr4 *addr)
static int server_compare(const struct list_entry *entry, const void *value)
static int server_create(IN const struct server_info *info, OUT nfs41_server **server_out)
Referenced by update_server().
◆ nfs41_server_list_init()
void nfs41_server_list_init |
( |
| ) |
|
Definition at line 48 of file nfs41_server.c.
49{
52}
static void list_init(struct list_entry *head)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Referenced by ServiceStart().
◆ nfs41_server_ref()
◆ nfs41_server_resolve()
Definition at line 275 of file nfs41_server.c.
279{
281 char service[16];
285 char *netid, *uaddr;
286
289
290 addrs->count = 0;
291
293
294
298
301
303
304 switch (
info->ai_family) {
305 case AF_INET: netid =
"tcp";
break;
306 case AF_INET6: netid =
"tcp6";
break;
307 default: continue;
308 }
309
312 continue;
313
314
317
320
322 continue;
323
329
332 break;
333 }
339 else
343}
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
void freenetconfigent(struct netconfig *netconfigp)
struct netconfig * getnetconfigent(char *netid) const
#define NFS41_UNIVERSAL_ADDR_LEN
#define NFS41_NETWORK_ID_LEN
char * taddr2uaddr(const struct netconfig *nconf, const struct netbuf *nbuf)
void freeuaddr(char *uaddr)
namespace GUID const ADDRINFOEXW * hints
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
STRSAFEAPI StringCchPrintfA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszFormat,...)
#define ERROR_BAD_NET_NAME
Referenced by handle_mount(), and referral_mount_location().
◆ server_addrs_add()
Definition at line 171 of file nfs41_server.c.
174{
175
176
177
178
180
182 dprintf(
SRVLVL,
"server_addrs_add() found existing addr '%s'.\n",
184 } else {
185
190
191
193
194 if (addrs->addrs.count < addrs->next_index)
195 addrs->addrs.count = addrs->next_index;
196
199 }
201}
bool_t multi_addr_find(IN const multi_addr4 *addrs, IN const netaddr4 *addr, OUT OPTIONAL uint32_t *index_out)
VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK Lock)
VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK Lock)
Referenced by nfs41_server_find_or_create().
◆ server_compare()
◆ server_create()
Definition at line 94 of file nfs41_server.c.
97{
100
104 eprintf(
"failed to allocate server %s\n",
info->owner);
106 }
107
112
115 eprintf(
"nfs41_name_cache_create() failed with %d\n",
status);
116 goto out_free;
117 }
121
122out_free:
126}
void eprintf(LPCSTR format,...)
VOID WINAPI InitializeSRWLock(PSRWLOCK Lock)
int nfs41_name_cache_create(OUT struct nfs41_name_cache **cache_out)
void nfs41_superblock_list_init(IN nfs41_superblock_list *superblocks)
DWORD WINAPI GetLastError(void)
Referenced by nfs41_server_find_or_create().
◆ server_entry_find()
Definition at line 85 of file nfs41_server.c.
89{
92}
#define ERROR_FILE_NOT_FOUND
◆ server_free()
Definition at line 128 of file nfs41_server.c.
130{
135}
int nfs41_name_cache_free(IN struct nfs41_name_cache **cache_out)
void nfs41_superblock_list_free(IN nfs41_superblock_list *superblocks)
Referenced by nfs41_server_deref().
◆ server_ref_locked()
◆ g_server_list