#include "ws_symbol_export.h"
#include <wsutil/color.h>
#include <wsutil/str_util.h>
Go to the source code of this file.
|
| struct | print_stream_ops |
| | Vtable of operations implementing a print stream backend for rendering dissection output. More...
|
| |
| struct | print_stream |
| | Represents an abstract print stream, pairing a backend operations vtable with instance-specific state. More...
|
| |
|
|
typedef struct print_stream_ops | print_stream_ops_t |
| | Vtable of operations implementing a print stream backend for rendering dissection output.
|
| |
|
typedef struct print_stream | print_stream_t |
| | Represents an abstract print stream, pairing a backend operations vtable with instance-specific state.
|
| |
|
| WS_DLL_PUBLIC print_stream_t * | print_stream_text_new (bool to_file, const char *dest) |
| | Create a new print stream for text output.
|
| |
| WS_DLL_PUBLIC print_stream_t * | print_stream_text_stdio_new (FILE *fh) |
| | Create a new print stream for text output using standard I/O.
|
| |
| WS_DLL_PUBLIC print_stream_t * | print_stream_ps_new (bool to_file, const char *dest) |
| | Create a new print stream for PostScript output.
|
| |
| WS_DLL_PUBLIC print_stream_t * | print_stream_ps_stdio_new (FILE *fh) |
| | Create a new print stream for PostScript output using standard I/O.
|
| |
| WS_DLL_PUBLIC bool | print_preamble (print_stream_t *self, char *filename, const char *version_string) |
| | Print the preamble to a print stream.
|
| |
| WS_DLL_PUBLIC bool | print_line (print_stream_t *self, int indent, const char *line) |
| | Prints a line to the print stream.
|
| |
| WS_DLL_PUBLIC bool | print_line_color (print_stream_t *self, int indent, const char *line, const color_t *fg, const color_t *bg) |
| | Print a colored line to a print stream.
|
| |
| WS_DLL_PUBLIC bool | print_bookmark (print_stream_t *self, const char *name, const char *title) |
| | Print a bookmark in the print stream.
|
| |
| WS_DLL_PUBLIC bool | new_page (print_stream_t *self) |
| | Create a new page in the print stream.
|
| |
| WS_DLL_PUBLIC bool | print_finale (print_stream_t *self) |
| | Print the finale of the print stream.
|
| |
| WS_DLL_PUBLIC bool | destroy_print_stream (print_stream_t *self) |
| | Destroys a print stream.
|
| |
Definitions for print streams.
Gilbert Ramirez gram@.nosp@m.alum.nosp@m.ni.ri.nosp@m.ce.e.nosp@m.du
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
◆ destroy_print_stream()
Destroys a print stream.
- Parameters
-
| self | Pointer to the print_stream_t structure to be destroyed. |
- Returns
- true if successful, false otherwise.
◆ new_page()
Create a new page in the print stream.
- Parameters
-
| self | Pointer to the print_stream_t object. |
- Returns
- true if successful, false otherwise.
◆ print_bookmark()
| WS_DLL_PUBLIC bool print_bookmark |
( |
print_stream_t * |
self, |
|
|
const char * |
name, |
|
|
const char * |
title |
|
) |
| |
Print a bookmark in the print stream.
- Parameters
-
| self | Pointer to the print_stream_t object. |
| name | The name of the bookmark. |
| title | The title of the bookmark. |
- Returns
- true if successful, false otherwise.
◆ print_finale()
Print the finale of the print stream.
- Parameters
-
| self | Pointer to the print_stream_t object. |
- Returns
- true if successful, false otherwise.
◆ print_line()
| WS_DLL_PUBLIC bool print_line |
( |
print_stream_t * |
self, |
|
|
int |
indent, |
|
|
const char * |
line |
|
) |
| |
Prints a line to the print stream.
- Parameters
-
| self | Pointer to the print stream object. |
| indent | Number of spaces for indentation. |
| line | The line to be printed. |
- Returns
- true if the line was successfully printed, false otherwise.
◆ print_line_color()
Print a colored line to a print stream.
Equivalent to print_line(), but if the stream supports text coloring then the output text will also be colored with the given foreground and background.
- Parameters
-
| self | The print stream. |
| indent | The indentation level. |
| line | The line of text to print. |
| fg | The foreground color. |
| bg | The background color. |
- Returns
- true if the print was successful, false otherwise.
◆ print_preamble()
| WS_DLL_PUBLIC bool print_preamble |
( |
print_stream_t * |
self, |
|
|
char * |
filename, |
|
|
const char * |
version_string |
|
) |
| |
Print the preamble to a print stream.
- Parameters
-
| self | The print stream. |
| filename | The name of the capture file being printed. |
| version_string | The Wireshark version string. |
- Returns
- true if the print was successful, false otherwise.
◆ print_stream_ps_new()
| WS_DLL_PUBLIC print_stream_t * print_stream_ps_new |
( |
bool |
to_file, |
|
|
const char * |
dest |
|
) |
| |
Create a new print stream for PostScript output.
- Parameters
-
| to_file | If true, output will be written to a file; otherwise, it will be written to standard output. |
| dest | The destination file name. |
- Returns
- Pointer to the newly created print stream, or NULL on failure.
◆ print_stream_ps_stdio_new()
Create a new print stream for PostScript output using standard I/O.
- Parameters
-
| fh | File handle to write to. |
- Returns
- Pointer to the newly created print stream, or NULL on failure.
◆ print_stream_text_new()
| WS_DLL_PUBLIC print_stream_t * print_stream_text_new |
( |
bool |
to_file, |
|
|
const char * |
dest |
|
) |
| |
Create a new print stream for text output.
- Parameters
-
| to_file | If true, output will be written to a file; otherwise, it will be written to standard output. |
| dest | The destination file name. |
- Returns
- Pointer to the newly created print stream, or NULL on failure.
◆ print_stream_text_stdio_new()
| WS_DLL_PUBLIC print_stream_t * print_stream_text_stdio_new |
( |
FILE * |
fh | ) |
|
Create a new print stream for text output using standard I/O.
- Parameters
-
| fh | File handle to write to. |
- Returns
- Pointer to the newly created print stream, or NULL on failure.