summaryrefslogtreecommitdiff
path: root/ioreplay/src/vfd.h
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2018-03-06 17:38:59 +0000
committerPaul Buetow <pbuetow@mimecast.com>2018-03-06 17:38:59 +0000
commit26b3b3e368a79ce29df732ea04e72a4c002ae2ce (patch)
treee3fc8d7461ab371279f7bf9c692096cd39cc92f6 /ioreplay/src/vfd.h
parentae2221660f9b411fa78cdf8034f0803e9a870cde (diff)
rename into ioriot
Diffstat (limited to 'ioreplay/src/vfd.h')
-rw-r--r--ioreplay/src/vfd.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/ioreplay/src/vfd.h b/ioreplay/src/vfd.h
deleted file mode 100644
index fd0c4fb..0000000
--- a/ioreplay/src/vfd.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2018 Mimecast Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef VFD_H
-#define VFD_H
-
-#include "opcodes.h"
-#include "defaults.h"
-
-/**
- * @brief The virtual file descriptor definition
- *
- * A virtual file descriptor represents a file descriptor from ioreplay's
- * point of view and is being used in various ways to simulate the real I/O
- * protocolled to the .capture/.replay files.
- *
- * Generally speaking I/O replay maps the real FD numbers (the ones logged to
- * the .capture file) to virtual FD numbers (a uniqe FD number for every open
- * to increase concurrency).
- */
-typedef struct vfd_s_ {
- int fd; /**< the real fd */
- DIR *dirfd; /**< The real dirfd */
- long mapped_fd; /**< The mapped fd (virtual fd) */
- char *path; /**< The file path belonging to that fd */
- bool free_path; /**< True if path has to be freed or not */
- unsigned long offset; /**< The current virtual file offset in bytes */
- int debug; /**< Used for debugging purposes only */
-} vfd_s;
-
-/**
- * @brief Creates a new virtual file descriptor object
- *
- * @param fd The file descriptor
- * @param mapped_fd The mapped file descriptor
- * @param path The path name
- * @return The new fd object
- */
-vfd_s* vfd_new(const int fd, const long mapped_fd, char *path);
-
-/**
- * @brief Updates the virtfd object
- *
- * @param vfd The virtfd object
- * @param fd The (real) file descriptor
- * @param mapped_fd The mapped (virtual) file descriptor
- * @param path The path name
- * @return The new fd object
- */
-void vfd_update(vfd_s *vfd, const int fd, const long mapped_fd, char *path);
-
-/**
- * @brief Destroys a file descriptor object
- *
- * @param vfd The file descriptor object
- */
-void vfd_destroy(vfd_s *vfd);
-
-/**
- * @brief Prints the virtual file descriptor
- * @param vfd The virtual file descriptor
- */
-void vfd_print(vfd_s *vfd);
-
-#endif // VFD_H
-