22#ifndef __NFS41_DAEMON_UTIL_H__
23#define __NFS41_DAEMON_UTIL_H__
90 for (
i = 0;
i < 3;
i++) {
102 OUT PFILE_BASIC_INFO basic_out);
105 OUT PFILE_STANDARD_INFO std_out);
114#define FILETIME_EPOCH 116444736000000000LL
121 nfs_time->seconds = diff / 10000000;
122 nfs_time->nseconds = (
uint32_t)((diff % 10000000)*100);
130 nfs_time->seconds * 10000000 +
131 nfs_time->nseconds / 100;
143 while ((
int32_t)nfstime->nseconds < 0) {
144 nfstime->nseconds += 1000000000;
154 result->seconds = lhs->seconds - rhs->seconds;
155 result->nseconds = lhs->nseconds - rhs->nseconds;
162 if (
nt->seconds < 0) {
195 return 8 + ((
offset - 1) & ~7);
202 return 4 + ((
offset - 1) & ~3);
211 return c ==
'\\' ||
c ==
'/' ||
c ==
'\0';
252 IN const char *path_end,
257 IN const char *path_end,
262 IN const char *path_end);
__inline uint32_t align8(uint32_t offset)
void path_fh_init(OUT nfs41_path_fh *file, IN nfs41_abs_path *path)
bool_t is_last_component(IN const char *path, IN const char *path_end)
static __inline void bitmap_intersect(IN bitmap4 *dst, IN const bitmap4 *src)
__inline const char * prev_non_delimiter(const char *pos, const char *start)
uint32_t max_read_size(IN const struct __nfs41_session *session, IN const nfs41_fh *fh)
void nfs_to_standard_info(IN const nfs41_file_info *info, OUT PFILE_STANDARD_INFO std_out)
ULONG nfs_file_info_to_attributes(IN const nfs41_file_info *info)
__inline uint32_t align4(uint32_t offset)
bool_t last_component(IN const char *path, IN const char *path_end, OUT nfs41_component *component)
void get_nfs_time(OUT nfstime4 *nfs_time)
static __inline bool_t bitmap_isset(IN const bitmap4 *mask, IN uint32_t word, IN uint32_t flag)
static __inline void bitmap_unset(IN bitmap4 *mask, IN uint32_t word, IN uint32_t flag)
uint32_t max_write_size(IN const struct __nfs41_session *session, IN const nfs41_fh *fh)
int safe_write(unsigned char **pos, uint32_t *remaining, void *dest, uint32_t dest_len)
__inline int valid_handle(HANDLE handle)
void get_file_time(OUT PLARGE_INTEGER file_time)
static __inline void bitmap_set(IN bitmap4 *mask, IN uint32_t word, IN uint32_t flag)
static __inline void nfstime_diff(IN const nfstime4 *lhs, IN const nfstime4 *rhs, OUT nfstime4 *result)
static __inline void nfs_time_to_file_time(IN const nfstime4 *nfs_time, OUT PLARGE_INTEGER file_time)
void nfs_to_basic_info(IN const nfs41_file_info *info, OUT PFILE_BASIC_INFO basic_out)
static __inline void nfstime_abs(IN const nfstime4 *nt, OUT nfstime4 *result)
__inline int is_delimiter(char c)
const char * strip_path(IN const char *path, OUT uint32_t *len_out OPTIONAL)
__inline const char * next_non_delimiter(const char *pos, const char *end)
void fh_copy(OUT nfs41_fh *dst, IN const nfs41_fh *src)
__inline const char * next_delimiter(const char *pos, const char *end)
int map_symlink_errors(int status)
void abs_path_copy(OUT nfs41_abs_path *dst, IN const nfs41_abs_path *src)
void nfs_to_network_openinfo(IN const nfs41_file_info *info, OUT PFILE_NETWORK_OPEN_INFORMATION std_out)
int safe_read(unsigned char **pos, uint32_t *remaining, void *dest, uint32_t dest_len)
static __inline void file_time_to_nfs_time(IN const PLARGE_INTEGER file_time, OUT nfstime4 *nfs_time)
void path_fh_copy(OUT nfs41_path_fh *dst, IN const nfs41_path_fh *src)
int nfs_to_windows_error(int status, int default_error)
static __inline void nfstime_normalize(IN OUT nfstime4 *nfstime)
int get_name(unsigned char **pos, uint32_t *remaining, const char **out_name)
__inline const char * prev_delimiter(const char *pos, const char *start)
bool_t next_component(IN const char *path, IN const char *path_end, OUT nfs41_component *component)
bool_t verify_write(IN nfs41_write_verf *verf, IN OUT enum stable_how4 *stable)
bool_t verify_commit(IN nfs41_write_verf *verf)
int create_silly_rename(IN nfs41_abs_path *path, IN const nfs41_fh *fh, OUT nfs41_component *silly)
bool_t multi_addr_find(IN const multi_addr4 *addrs, IN const netaddr4 *addr, OUT OPTIONAL uint32_t *index_out)
#define INVALID_HANDLE_VALUE
GLuint GLuint GLsizei count
GLenum const GLvoid * addr
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 flag
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
#define memcpy(s1, s2, n)
PULONG MinorVersion OPTIONAL
unsigned char verf[NFS4_VERIFIER_SIZE]