+ plug(statp->st_mtime, val);
+ p++;
+ p += from_base64(&val, p);
+ plug(statp->st_ctime, val);
+
+ /* Optional FileIndex of hard linked file data */
+ if (*p == ' ' || (*p != 0 && *(p+1) == ' ')) {
+ p++;
+ p += from_base64(&val, p);
+ *LinkFI = (uint32_t)val;
+ } else {
+ *LinkFI = 0;
+ return 0;
+ }
+
+ /* FreeBSD user flags */
+ if (*p == ' ' || (*p != 0 && *(p+1) == ' ')) {
+ p++;
+ p += from_base64(&val, p);
+#ifdef HAVE_CHFLAGS
+ plug(statp->st_flags, val);
+ } else {
+ statp->st_flags = 0;
+#endif
+ }
+
+ /* Look for data stream id */
+ if (*p == ' ' || (*p != 0 && *(p+1) == ' ')) {
+ p++;
+ p += from_base64(&val, p);
+ } else {
+ val = 0;
+ }
+ return (int)val;
+}
+
+/* Decode a LinkFI field of encoded stat packet */
+int32_t decode_LinkFI(char *buf, struct stat *statp)
+{
+ char *p = buf;
+ int64_t val;
+
+ skip_nonspaces(&p); /* st_dev */
+ p++; /* skip space */
+ skip_nonspaces(&p); /* st_ino */
+ p++;
+ p += from_base64(&val, p);
+ plug(statp->st_mode, val); /* st_mode */
+ p++;
+ skip_nonspaces(&p); /* st_nlink */
+ p++;
+ skip_nonspaces(&p); /* st_uid */
+ p++;
+ skip_nonspaces(&p); /* st_gid */
+ p++;
+ skip_nonspaces(&p); /* st_rdev */
+ p++;
+ skip_nonspaces(&p); /* st_size */
+ p++;
+ skip_nonspaces(&p); /* st_blksize */
+ p++;
+ skip_nonspaces(&p); /* st_blocks */
+ p++;
+ skip_nonspaces(&p); /* st_atime */
+ p++;
+ skip_nonspaces(&p); /* st_mtime */
+ p++;
+ skip_nonspaces(&p); /* st_ctime */
+
+ /* Optional FileIndex of hard linked file data */
+ if (*p == ' ' || (*p != 0 && *(p+1) == ' ')) {
+ p++;
+ p += from_base64(&val, p);
+ return (int32_t)val;
+ }
+ return 0;