Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
14 views

Receiving and Sending J1939 CAN message on Linux in C

I am trying to open a SocketCAN J1939 and receive and send J1939 messages. I am very confused with type "sockaddr_can". This structure has j1939.addr, j1939.pgn, j1939.name etc. When I ...
ha_purchase's user avatar
1 vote
1 answer
77 views

C serial communication, Why does read() lose some data bytes at high baud rates (e.g., B921600)?

Question: I am implementing a C program to communicate between two serial ports on the same machine. The setup involves two serial ports connected via a Null Modem adapter, and I am experiencing an ...
callumQ's user avatar
  • 11
-1 votes
0 answers
23 views

How to use libmnl to scan access points? [closed]

My question is similar to this one: Using nl80211.h to scan access points. But the difference is that I would like to use libmnl and not libnl. Would someone write an example of using libmnl and ...
Artyom Gevorgyan's user avatar
1 vote
0 answers
48 views

How to make CLion recognize linux/init.h and other linux kernel headers?

I am trying to do some Linux Kernel programming with CLion. I observe that some headers, like <linux/kernel.h> and <linux/module.h> are correctly recognized, but some others, like <...
G. Ianni's user avatar
1 vote
1 answer
51 views

Why address of the files stored on disk (of vbox vm) are different each time i look at them?

I am aware of ASLR which loads the program at different memory locations each time, however, I am not sure why this is happening in the case of files that I have stored on disk /dev/sda2 of my Linux ...
Mheboobkhan's user avatar
-4 votes
0 answers
40 views

How does DHCPCD obtain IP and set it on the device? [closed]

Detailed details, such as what function or script to call,I don't quite understand the dhcpcd source code, can you help me or do you have any relevant materials explaining the dhcpcd source code。 I ...
lzszero's user avatar
0 votes
1 answer
83 views

Fork in Linux: Weird infinite loop while freeing condition variable

Context System: Fedora 40 Library Used: pthread.h Details: Read "To the point" if not interested I apologize for providing no code here as the whole program is more than 4000 lines of code ...
Programmer Newbie's user avatar
1 vote
1 answer
44 views

Get current mute status with ALSA C library

I need to read current mute state of soundcard using ALSA C library. There is one example how to mute: Linux ALSA/Sound-API Questions - How do you mute? But what about reading current mute state? Of ...
Anton Vakulenko's user avatar
0 votes
0 answers
45 views

How large should period be in frames (ALSA)

First of all, I'm totally green to audio programming, so I'd be thankful for any advice and learning resources. I used (Linux Journal - Introduction to Sound Programming with ALSA) and googling as ...
Dominik's user avatar
0 votes
1 answer
32 views

Access host data when running a program from docker container

I'm trying to run the following in a C program hosted in a docker container; #include <stdio.h> #include <stdlib.h> int main( int argc, char *argv[] ) { FILE *fp; char path[1035]; ...
user2384330's user avatar
0 votes
0 answers
19 views

Question on Linux n_gsm 0710 driver issue during processing received data

When I try to build DLCI 1, it seems failed, here is log, //open DLCI 0, gsm_send_packet: 00000000: f9 03 3f 01 1c f9 gsmld_receive_buf: 00000000: f9 03 73 01 d7 f9 //open DLCI 1, 07-10 15:31:34....
Rui's user avatar
  • 97
0 votes
0 answers
37 views

Crontab jobs don't inherit cgroups from crond, why? [closed]

I am trying to isolate cpus by cpuset cgroup, and I set the cpuset cgroup of crond to 'isolated', but the crontab job just uses the root cgroup. test program: */1 * * * * root cat /proc/self/cgroup &...
user4557212's user avatar
0 votes
0 answers
48 views

How do I keep my kernel module installed? [duplicate]

I'm quite new to Linux, so pardon me. Running Kali Linux 6.8.11-amd64. I'm following a hacking book and I've reached a section that is dedicated to rootkits. Specifically making a C program to replace ...
Spectre 3007's user avatar
0 votes
0 answers
37 views

What is the difference between return NULL and pthread_exit(NULL) while terminating the detached thread [duplicate]

I am trying to understand what happens when we return NULL from the thread and what happens when we call pthread_exit(NULL) from the thread? I am not able to understand when to use what? Can somebody ...
user2718281's user avatar
1 vote
1 answer
40 views

Performance counter not running with perf_event_open()

I am trying to access the performance counters in a large and complex application. But when I read the result it always returns 0. I also enabled the total running time and the total enabled time, ...
Kipje's user avatar
  • 91

15 30 50 per page
1
2 3 4 5
1984