libcppwrap
A collection of C++ wrappers for native APIs
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
posix.hpp File Reference
#include <cstddef>
#include <utility>
#include <w/assert.hpp>
#include <w/handle.hpp>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/uio.h>
Include dependency graph for posix.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  w::memory_region
 A structure holding details about a memory-mapped file or device. More...
 

Namespaces

namespace  w
 

Typedefs

typedef w::handle< int, -1, ::close > w::fd
 An RAII util::handle type for POSIX file descriptors. More...
 

Functions

int w::fcntl (int fd, int cmd)
 Controls a file descriptor. More...
 
template<typename Argument >
int w::fcntl (int fd, int cmd, const Argument &arg)
 Controls a file descriptor. More...
 
int w::ioctl (int fd, unsigned long request, void *arg)
 Controls a device. More...
 
int w::ioctl (int fd, unsigned long request, const void *arg)
 Controls a device. More...
 
template<typename Argument >
int w::ioctl (int fd, unsigned long request, Argument &arg)
 Controls a device. More...
 
template<typename Argument >
int w::ioctl (int fd, unsigned long request, const Argument &arg)
 Controls a device. More...
 
template<typename Argument >
Argument w::ioctl (int fd, unsigned long request)
 Controls a device. More...
 
std::size_t w::lseek (int fd, off_t offset, int whence)
 Sets the position of a file pointer for a file descriptor. More...
 
w::fd w::open (const char *pathname, int flags)
 Opens and possibly creates a file. More...
 
w::fd w::open (const char *pathname, int flags, mode_t mode)
 Opens and possibly creates a file. More...
 
std::pair< w::fd, w::fdw::pipe ()
 Creates a pipe. More...
 
std::size_t w::read (int fd, void *buf, std::size_t count)
 Reads data from a file descriptor. More...
 
std::size_t w::readv (int fd, const struct iovec *iov, int iovcnt)
 Reads data from a file descriptor. More...
 
std::size_t w::write (int fd, const void *buf, std::size_t count)
 Writes data to a file descriptor. More...
 
std::size_t w::writev (int fd, const struct iovec *iov, int iovcnt)
 Writes data to a file descriptor. More...