getpmsg¶
Intro¶
getpmsg - delivers the next message on a STREAMS pipe
Description¶
The getpmsg() system call is used to read message from a STREAMS pipe. A message from the pipe is either read into the buffers that are specified by the ctrlptr
, datptr
, flags
and bandp
arguments, or it is skipped depending on the settings of flags
.
getpmsg() is useful in applications dealing with STREAMS pipes where messages have different priority and should be read in different order than they are available.
Arguments¶
fd
:int
[K] - file descriptor associated with the STREAMS pipectrlptr
:void *
[K] - pointer to buffer for control informationdatptr
:void *
[K] - pointer to buffer for databandp
:int *
[K] - pointer to a variable for indicating the band of the messageflags
:int
[K] - flags indicating how the messages should be delivered
Available Tags¶
- K - Originated from kernel-space.
Hooks¶
getpmsg¶
Type¶
Kprobes
Purpose¶
To measure the time taken by the getpmsg syscall.
Example Use Case¶
getpmsg() can be used in applications that read messages from STREAMS pipes. For example, a text editor can use getpmsg() to read messages from a STREAMS pipe and display them in the application window.
Issues¶
Due to the asynchronous nature of STREAMS pipes, it is possible that getpmsg() will read an invalid message, or a message intended for a different application.
Related Events¶
- getmsg
- putmsg
This document was automatically generated by OpenAI and needs review. It might not be accurate and might contain errors. The authors of Tracee recommend that the user reads the "events.go" source file to understand the events and their arguments better.