0

Question is above. I've looked through the man pages, but they are somewhat unclear on the topic. I'm not sure if I'm looking for sendmsg() or msgsend() or if I'm looking for something totally different

1 Answers1

2

Devices are usually represented as device files in Linux - they can be read from and written to just like any other file. For example, the first hard disk in the system is usually represented as /dev/sda - you directly read from it, and you can also directly write to it (for example with dd to create or restore a disk image).

For other purposes that can't be represented as reading/writing, for example talking to the SMART interface of a hard disk, ioctls are used.