|
Open Model Railroad Network (OpenMRN)
|
Go to the source code of this file.
Macros | |
| #define | IOC_NONE 0U |
| ioctl key value for operation (not read or write) | |
| #define | IOC_WRITE 1U |
| ioctl key write bit | |
| #define | IOC_READ 2U |
| ioctl key read bit | |
| #define | IOC(_dir, _type, _num, _size) (((_dir) << 30) | ((_type) << 8) | ((_num)) | ((_size) << 16)) |
| create an ioctl. | |
| #define | IO(_type, _num) IOC(IOC_NONE, (_type), (_num), 0) |
| create an operation ioctl | |
| #define | IOR(_type, _num, _size) IOC(IOC_READ, (_type), (_num), (_size)) |
| create an operation ioctl | |
| #define | IOW(_type, _num, _size) IOC(IOC_WRITE, (_type), (_num), (_size)) |
| create an operation ioctl | |
| #define | IOWR(_type, _num, _size) IOC(IOC_WRITE | IOC_READ, (_type), (_num), (_size)) |
| create an operation ioctl | |
| #define | IOC_DIR(_num) (((_num) >> 30) & 0x00000003) |
| Decode ioctl number direction. | |
| #define | IOC_TYPE(_num) (((_num) >> 8) & 0x000000FF) |
| Decode ioctl type. | |
| #define | IOC_NR(_num) (((_num) >> 0) & 0x000000FF) |
| Decode ioctl number. | |
| #define | IOC_SIZE(_num) (((_num) >> 16) & 0x00003FFF) |
| Decode ioctl size. | |
| #define | IOC_SIZEBITS 14 |
| Number of bits that make up the size field. | |
Functions | |
| int | ioctl (int fd, unsigned long int key,...) |
| Request and ioctl transaction. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This file implements ioctl() prototypes and defines.
Definition in file esp-idf/stropts.h.
create an operation ioctl
| _type | device driver unique number |
| _num | ioctl index number |
Definition at line 74 of file esp-idf/stropts.h.
| #define IOC | ( | _dir, | |
| _type, | |||
| _num, | |||
| _size | |||
| ) | (((_dir) << 30) | ((_type) << 8) | ((_num)) | ((_size) << 16)) |
create an ioctl.
| _dir | direction |
| _type | device driver unique number |
| _num | ioctl index number |
| _size | size of ioctl data in bytes |
Definition at line 67 of file esp-idf/stropts.h.
| #define IOC_DIR | ( | _num | ) | (((_num) >> 30) & 0x00000003) |
Decode ioctl number direction.
| _num | encoded ioctl value |
Definition at line 101 of file esp-idf/stropts.h.
| #define IOC_NONE 0U |
ioctl key value for operation (not read or write)
Definition at line 53 of file esp-idf/stropts.h.
| #define IOC_NR | ( | _num | ) | (((_num) >> 0) & 0x000000FF) |
Decode ioctl number.
| _num | encoded ioctl value |
Definition at line 113 of file esp-idf/stropts.h.
| #define IOC_READ 2U |
ioctl key read bit
Definition at line 59 of file esp-idf/stropts.h.
| #define IOC_SIZE | ( | _num | ) | (((_num) >> 16) & 0x00003FFF) |
Decode ioctl size.
| _num | encoded ioctl value |
Definition at line 119 of file esp-idf/stropts.h.
| #define IOC_SIZEBITS 14 |
Number of bits that make up the size field.
Definition at line 122 of file esp-idf/stropts.h.
| #define IOC_TYPE | ( | _num | ) | (((_num) >> 8) & 0x000000FF) |
Decode ioctl type.
| _num | encoded ioctl value |
Definition at line 107 of file esp-idf/stropts.h.
| #define IOC_WRITE 1U |
ioctl key write bit
Definition at line 56 of file esp-idf/stropts.h.
create an operation ioctl
| _type | device driver unique number |
| _num | ioctl index number |
| _size | size of ioctl data in bytes |
Definition at line 81 of file esp-idf/stropts.h.
create an operation ioctl
| _type | device driver unique number |
| _num | ioctl index number |
| _size | size of ioctl data in bytes |
Definition at line 88 of file esp-idf/stropts.h.
create an operation ioctl
| _type | device driver unique number |
| _num | ioctl index number |
| _size | size of ioctl data in bytes |
Definition at line 95 of file esp-idf/stropts.h.
| int ioctl | ( | int | fd, |
| unsigned long int | key, | ||
| ... | |||
| ) |
Request and ioctl transaction.
| fd | file descriptor |
| key | ioctl key |
| ... | key data (as a pointer or unsigned long type) |
| fd | file descriptor |
| key | ioctl key |
| ... | key data |
Definition at line 452 of file Fileio.cxx.