Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Macros | Functions
sync_pipe.h File Reference
#include <ws_posix_compat.h>

Go to the source code of this file.

Macros

#define SP_MAX_MSG_LEN   (512 * 1000)
 
#define SP_EXEC_FAILED   'X' /* errno value for the exec failing */
 
#define SP_FILE   'F' /* the name of the recently opened file */
 
#define SP_ERROR_MSG   'E' /* error message */
 
#define SP_LOG_MSG   'L' /* log message */
 
#define SP_BAD_FILTER   'B' /* error message for bad capture filter */
 
#define SP_PACKET_COUNT   'P' /* count of packets captured since last message */
 
#define SP_DROPS   'D' /* count of packets dropped in capture */
 
#define SP_SUCCESS   'S' /* success indication, no extra data */
 
#define SP_TOOLBAR_CTRL   'T' /* interface toolbar control packet */
 
#define SP_IFACE_LIST   'I' /* interface list */
 
#define SP_QUIT   'Q' /* "gracefully" capture quit message (SIGUSR1) */
 
#define SIGNAL_PIPE_CTRL_ID_NONE   "none"
 

Functions

void sync_pipe_write_string_msg (int pipe_fd, char indicator, const char *msg)
 Writes a string message to the recipient pipe.
 
void sync_pipe_write_uint_msg (int pipe_fd, char indicator, unsigned int num)
 Writes a string message to the recipient pipe.
 
void sync_pipe_write_int_msg (int pipe_fd, char indicator, int num)
 Writes a string message to the recipient pipe.
 
void sync_pipe_write_errmsgs_to_parent (int pipe_fd, const char *error_msg, const char *secondary_error_msg)
 Notify the parent that the child encountered an error.
 

Detailed Description

Low-level sync pipe interfaces.

Macro Definition Documentation

◆ SIGNAL_PIPE_CTRL_ID_NONE

#define SIGNAL_PIPE_CTRL_ID_NONE   "none"

Has the parent signalled the child to stop?

Function Documentation

◆ sync_pipe_write_errmsgs_to_parent()

void sync_pipe_write_errmsgs_to_parent ( int  pipe_fd,
const char *  error_msg,
const char *  secondary_error_msg 
)
extern

Notify the parent that the child encountered an error.

Parameters
error_msgThe error message to be sent to the parent.
secondary_error_msgAn optional secondary error message to be sent to the parent.

◆ sync_pipe_write_int_msg()

void sync_pipe_write_int_msg ( int  pipe_fd,
char  indicator,
int  num 
)
extern

Writes a string message to the recipient pipe.

Write a message, with an unsigned integer body, to the recipient pipe in the standard format (1-byte message indicator, 3-byte message length (excluding length and indicator field), and the integer, as a string.

Parameters
pipe_fdThe file descriptor of the pipe.
indicatorA character indicating the type of message.
numThe unsigned integer message to be written.

◆ sync_pipe_write_string_msg()

void sync_pipe_write_string_msg ( int  pipe_fd,
char  indicator,
const char *  msg 
)
extern

Writes a string message to the recipient pipe.

Write a message, with a string body, to the recipient pipe in the standard format (1-byte message indicator, 3-byte message length (excluding length and indicator field), and the string. If msg is NULL, the message has only a length and indicator.

Parameters
pipe_fdThe file descriptor of the pipe.
indicatorA character indicating the type of message.
msgThe string message to be written.

◆ sync_pipe_write_uint_msg()

void sync_pipe_write_uint_msg ( int  pipe_fd,
char  indicator,
unsigned int  num 
)
extern

Writes a string message to the recipient pipe.

Write a message, with an unsigned integer body, to the recipient pipe in the standard format (1-byte message indicator, 3-byte message length (excluding length and indicator field), and the unsigned integer, as a string.

Parameters
pipe_fdThe file descriptor of the pipe.
indicatorA character indicating the type of message.
numThe unsigned integer message to be written.