Linux file descriptor

Article directory 0. Preface 1. C file interface file open file writing 2. System file interface open & amp; & amp; write & amp; & amp; close return value of open This chapter gitee code repository: file descriptor 0. Preface Knowledge of basic principles: File = content + attributes Files are divided into: Opened files […]

Device driver letter Bind file descriptor

K1.c #include <linux/init.h> #include <linux/module.h> #include <linux/io.h> #include <linux/fs.h> #include <linux/types.h> #include <linux/gpio.h> #include <linux/cdev.h> #include <linux/device.h> #include “head.h” char kbuf[128] = {}; //Define three pointers pointing to mapped virtual memory unsigned int *vir_rcc; unsigned int *vir_moder_led1; unsigned int *vir_odr_led1; unsigned int *vir_moder_led2; unsigned int *vir_odr_led2; unsigned int *vir_moder_led3; unsigned int *vir_odr_led3; struct cdev *cdev; […]

Redsocks traffic forwarding combined with iptables traffic transparent transmission under Linux appears socket: Too many open files and connect: Bad file descriptor

Under Linux, redsocks traffic forwarding combined with iptables traffic transparent transmission appears socket: Too many open files and connect: Bad file descriptor. Oct 8 18:59:34 localhost redsocks[26193]: connect: Bad file descriptor Oct 8 18:59:34 localhost redsocks[26193]: [192.168.10.10:53318->124.225.191.19:443]: red_connect_relay: Bad file descriptor Oct 8 18:59:34 localhost redsocks[26193]: [192.168.10.10:53318->124.225.191.19:443]: dropping client (R/W), relay (R/W), idle 0.000234s Oct […]

USB driver development 9 device descriptor

We have previously analyzed the endpoint descriptor, interface descriptor (each interface corresponds to a function and is equipped with a corresponding driver), configuration descriptor, and finally how the device includes these descriptors. First of all, remember that in the USB world, the device is greater than the configuration, and the configuration is greater than the […]

pcl–Section 6 3D feature descriptor

Feature Descriptor Feature Descriptor It is a unique identity authentication for each feature point Feature points of the same space point at different viewing angles have highly similar descriptors. The descriptors of different feature points should be as different as possible Usually the descriptor is a vector of fixed length Descriptors can be divided into […]

[Linux] File descriptors and redirection

File descriptors and redirections File reading and writing operations in C language the code How to open a file in open system System read and write file operations file descriptor file redirection How to understand file buffer File reading and writing operations in C language file writing fputs int fputs(const char *s, FILE *stream); s: […]