ioctl Questions

12

Solved

I have a Perl script running in an AIX box. The script tries to open a file from a certain directory and it fails to read the file because file has no read permission, but I get a different error...
Naara asked 22/10, 2009 at 5:30

2

Solved

I'm running a self-hosted Renovate instance and I need to sign the commits to GitLab with GPG key. For this I'm setting the env variable RENOVATE_GIT_PRIVATE_KEY with the PGP private key block for ...
Hammering asked 31/5, 2022 at 10:2

1

Solved

I am using a rails webapp and trying to send an xml file to a sftp server, using the following script: Net::SSH.start(SFTP_HOST, sftp_user, {:port => SFTP_PORT, :password => sftp_password}) d...
Kurt asked 5/10, 2021 at 10:49

1

I have a large application that I am checking for memory leaks. I am using valgrind with the options --leak-check=yes --track-origins=yes. A sample of the warning: ==2173== Warning: noted but unha...
Streamway asked 17/12, 2019 at 1:24

3

Solved

I am trying build a VPN client mobile for Android based applications that connect to virtual infrastructure over VPN tunnel. I have a similar application for Linux/Windows and I know how to open a ...
Angelicangelica asked 14/7, 2014 at 20:29

0

I've been running a python script inside a virtual environment that I create with pipenv shell, it worked well. I've always run the process from a bash script that changes directory to the folder c...
Refute asked 13/3, 2021 at 15:13

2

Till date my googling and checking out of msdn suggests Microsoft Windows does not offer any equivalent of TIOCOUTQ / SIOCOUTQ to find the amount of unsent data in the socket send buffer. It will b...
Yonder asked 16/10, 2012 at 11:56

7

Solved

Let's say I'm running a program called IpAddresses.c. I want that program to get all IP addresses this device has according to each interface. Just like ifconfig. How can I do that? I don't know m...
Surmount asked 9/11, 2010 at 22:35

4

Solved

I am using the following code to retrieve all MAC addresses for current computer: ifreq ifr; ifconf ifc; char buf[1024]; int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); if (sock == -1) { ... ...
Butcherbird asked 27/1, 2012 at 14:16

2

I am trying to call DeviceIO functions asynchronously by using the OVERLAPPED structure as described on MSDN. I am using the FSCTL_ENUM_USN_DATA control code to enumerate the MFT of NTFS drives but...

5

Solved

I want to generate a beep sound with a specific frequency and length (for different sound signals) using the system beeper (and only the speakers if beeper is not available / accessible). I know it...
Renovate asked 9/4, 2012 at 12:3

2

Solved

I am trying to port bit of raspberrypi's userspace code from C to golang and I've run into a program involving ioctl(). I am having trouble specifically with following C code #define MAJOR_NUM 1...
Corruption asked 27/1, 2019 at 12:24

5

Solved

Is it possible to detect when a laptop's lid is open or closed? From what I've read, this isn't possible, but SO has helped me with the impossible before. The only thing I've found that might be in...
Canula asked 28/7, 2010 at 17:25

1

I am trying to write an application in C++ which lists Information obtained from a USB device. I am following USBView (Github) utility's code for it. When device is in D0 power state (fully powere...
Dealt asked 25/6, 2018 at 14:28

1

I seem tangled between different abstractions on the USB stack.. what is the difference betweeen IOCTL_USB_RESET and USBDEVFS_RESET fired against an USB device? Will both calls finally trigger the ...
Interlude asked 25/5, 2015 at 11:11

3

Solved

I'm new to node and am hacking together a node application utilizing node_pcap to capture packet data and do interesting things with it. One of the inputs to capturing data is the network interface...
Preuss asked 15/10, 2011 at 7:29

2

Solved

I want to send an IOCTL command to a PC/SC reader connected to my computer (win7 64 bit). In order to send an IOCTL command I need a HANDLE to the device, which I'm unable to create. The device is...
Muscadine asked 24/11, 2011 at 23:19

2

Here is the code I am using to print the resolution in pixels of the current terminal. #include <sys/ioctl.h> #include <stdio.h> #include <unistd.h> int main (int argc, char *ar...
Growing asked 21/3, 2017 at 19:52

3

Solved

Title pretty much says it all. If I run ifconfig, I get this: eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet -snip- netmask 255.255.255.0 broadcast -snip- ... Using this,...
Einberger asked 30/3, 2013 at 20:19

1

I'm writing a driver to control some custom hardware. In the old days (i.e. 15yrs ago) I was doing this with ioctls, but am now digging into sysfs as a possible alternative. As I understand it, ...
Coan asked 10/11, 2016 at 13:53

1

Solved

I have (out of curiosity) been wondering where the user space wrapper for the ioctl system call is defined on x86_64 Linux. My first thought was glibc - after checking the exposed symbols on the in...
Tiebold asked 20/12, 2016 at 15:53

2

Solved

According to man ioctl, opening file descriptors with open may cause unwanted side-effects. The manual also states that opening with O_NONBLOCK solves those unwanted issues but I can't seem to find...
Stall asked 2/12, 2016 at 20:12

2

i was going through ioctl sample programs to check how it communicates with kernel space. in program WRITE_IOCTL is used as command #define WRITE_IOCTL _IOW(MY_MACIG, 1, int) ioctl(fd, WRITE_IOCT...
Schweiker asked 19/3, 2014 at 4:20

3

Solved

I have a device which generates some noise that I want to add to the entropy pool for the /dev/random device in an embedded Linux system. I'm reading the man page on /dev/random and I don't really...
Bohi asked 14/6, 2013 at 23:30

1

Solved

As far I researched, terminfo/termcap and ioctl don't allow to query character at (x,y) position on terminal's screen. This is rather unexpected, because: one can read e.g. screen dimensions from...
Forge asked 29/8, 2016 at 12:23

© 2022 - 2024 — McMap. All rights reserved.