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);
bool_t next_component(IN const char *path, IN const char *path_end, OUT nfs41_component *component)
static __inline void nfstime_normalize(IN OUT nfstime4 *nfstime)
static __inline void bitmap_set(IN bitmap4 *mask, IN uint32_t word, IN uint32_t flag)
int nfs_to_windows_error(int status, int default_error)
int map_symlink_errors(int status)
GLuint GLuint GLsizei count
#define INVALID_HANDLE_VALUE
uint32_t max_read_size(IN const struct __nfs41_session *session, IN const nfs41_fh *fh)
static __inline void nfstime_abs(IN const nfstime4 *nt, OUT nfstime4 *result)
bool_t verify_write(IN nfs41_write_verf *verf, IN OUT enum stable_how4 *stable)
const char * strip_path(IN const char *path, OUT uint32_t *len_out OPTIONAL)
void get_nfs_time(OUT nfstime4 *nfs_time)
__inline int valid_handle(HANDLE handle)
static __inline void bitmap_intersect(IN bitmap4 *dst, IN const bitmap4 *src)
bool_t last_component(IN const char *path, IN const char *path_end, OUT nfs41_component *component)
__inline const char * prev_non_delimiter(const char *pos, const char *start)
unsigned char verf[NFS4_VERIFIER_SIZE]
void nfs_to_standard_info(IN const nfs41_file_info *info, OUT PFILE_STANDARD_INFO std_out)
__inline const char * prev_delimiter(const char *pos, const char *start)
__inline uint32_t align8(uint32_t offset)
void nfs_to_basic_info(IN const nfs41_file_info *info, OUT PFILE_BASIC_INFO basic_out)
__inline uint32_t align4(uint32_t offset)
int get_name(unsigned char **pos, uint32_t *remaining, const char **out_name)
void path_fh_init(OUT nfs41_path_fh *file, IN nfs41_abs_path *path)
static __inline void bitmap_unset(IN bitmap4 *mask, IN uint32_t word, IN uint32_t flag)
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
__inline const char * next_non_delimiter(const char *pos, const char *end)
ULONG nfs_file_info_to_attributes(IN const nfs41_file_info *info)
void get_file_time(OUT PLARGE_INTEGER file_time)
#define memcpy(s1, s2, n)
static __inline void nfs_time_to_file_time(IN const nfstime4 *nfs_time, OUT PLARGE_INTEGER file_time)
uint32_t max_write_size(IN const struct __nfs41_session *session, IN const nfs41_fh *fh)
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)
void fh_copy(OUT nfs41_fh *dst, IN const nfs41_fh *src)
void abs_path_copy(OUT nfs41_abs_path *dst, IN const nfs41_abs_path *src)
__inline const char * next_delimiter(const char *pos, const char *end)
int safe_read(unsigned char **pos, uint32_t *remaining, void *dest, uint32_t dest_len)
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
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 safe_write(unsigned char **pos, uint32_t *remaining, void *dest, uint32_t dest_len)
bool_t multi_addr_find(IN const multi_addr4 *addrs, IN const netaddr4 *addr, OUT OPTIONAL uint32_t *index_out)
static __inline void nfstime_diff(IN const nfstime4 *lhs, IN const nfstime4 *rhs, OUT nfstime4 *result)
__inline int is_delimiter(char c)
static __inline bool_t bitmap_isset(IN const bitmap4 *mask, IN uint32_t word, IN uint32_t flag)
bool_t is_last_component(IN const char *path, IN const char *path_end)
void nfs_to_network_openinfo(IN const nfs41_file_info *info, OUT PFILE_NETWORK_OPEN_INFORMATION std_out)
PULONG MinorVersion OPTIONAL