|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Typedefs | |
| typedef void(* | sharkd_dissect_func_t) (epan_dissect_t *edt, proto_tree *tree, struct epan_column_info *cinfo, const GSList *data_src, void *data) |
Enumerations | |
| enum | dissect_request_status { DISSECT_REQUEST_SUCCESS , DISSECT_REQUEST_NO_SUCH_FRAME , DISSECT_REQUEST_READ_ERROR } |
| Return status for a frame dissection request. More... | |
Functions | |
| cf_status_t | sharkd_cf_open (const char *fname, unsigned int type, bool is_tempfile, int *err) |
| Open a capture file. | |
| int | sharkd_load_cap_file (void) |
| Load a capture file without any limits. | |
| int | sharkd_load_cap_file_with_limits (int max_packet_count, int64_t max_byte_count) |
| Load a capture file with specified limits. | |
| int | sharkd_retap (void) |
| Retaps all packets in the current capture file. | |
| int | sharkd_filter (const char *dftext, uint8_t **result) |
| Apply a display filter to the current capture file and return the results. | |
| frame_data * | sharkd_get_frame (uint32_t framenum) |
| Get a frame by its number. | |
| enum dissect_request_status | sharkd_dissect_request (uint32_t framenum, uint32_t frame_ref_num, uint32_t prev_dis_num, wtap_rec *rec, column_info *cinfo, uint32_t dissect_flags, sharkd_dissect_func_t cb, void *data, int *err, char **err_info) |
| Dissects a request for packet data. | |
| wtap_block_t | sharkd_get_modified_block (const frame_data *fd) |
| Get the modified packet block for a given frame, if available. | |
| wtap_block_t | sharkd_get_packet_block (const frame_data *fd) |
| Get the packet block for a given frame. | |
| int | sharkd_set_modified_block (frame_data *fd, wtap_block_t new_block) |
| Set a modified block for a frame. | |
| const char * | sharkd_version (void) |
| Retrieves the version of the SharkD server. | |
| const struct ws_option * | sharkd_long_options (void) |
| Get the long options for the sharkd daemon. | |
| const char * | sharkd_optstring (void) |
| Get the string of valid options for the sharkd daemon. | |
| int | sharkd_init (int argc, char **argv) |
| Initialize the sharkd server. | |
| int | sharkd_loop (int argc _U_, char *argv[] _U_) |
| Main loop for the sharkd daemon. | |
| int | sharkd_session_main (int mode_setting) |
| Main function for handling sharkd sessions. | |
Copyright (C) 2016 Jakub Zawadzki
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
Return status for a frame dissection request.
| cf_status_t sharkd_cf_open | ( | const char * | fname, |
| unsigned int | type, | ||
| bool | is_tempfile, | ||
| int * | err | ||
| ) |
Open a capture file.
| fname | The filename of the capture file to open. |
| type | The type of the capture file. |
| is_tempfile | True if the file is a temporary file. |
| err | Pointer to an integer where error information will be stored. |
| enum dissect_request_status sharkd_dissect_request | ( | uint32_t | framenum, |
| uint32_t | frame_ref_num, | ||
| uint32_t | prev_dis_num, | ||
| wtap_rec * | rec, | ||
| column_info * | cinfo, | ||
| uint32_t | dissect_flags, | ||
| sharkd_dissect_func_t | cb, | ||
| void * | data, | ||
| int * | err, | ||
| char ** | err_info | ||
| ) |
Dissects a request for packet data.
| framenum | The frame number to dissect. |
| frame_ref_num | Reference number of the frame. |
| prev_dis_num | Previous dissection number. |
| rec | Pointer to the wtap_rec structure. |
| cinfo | Pointer to the column_info structure. |
| dissect_flags | Flags indicating how to perform the dissection. |
| cb | Callback function for handling the dissection result. |
| data | User data passed to the callback function. |
| err | Error code if an error occurs. |
| err_info | Error information if an error occurs. |
| int sharkd_filter | ( | const char * | dftext, |
| uint8_t ** | result | ||
| ) |
Apply a display filter to the current capture file and return the results.
This function compiles the provided display filter text and applies it to all frames in the currently loaded capture file, returning a bit array indicating which frames match the filter.
| dftext | The display filter text to compile and apply. |
| result | Pointer to a uint8_t array where the results will be stored. The caller is responsible for freeing this array. Each bit in the array corresponds to a frame, with a value of 1 indicating a match and 0 indicating no match. |
| frame_data * sharkd_get_frame | ( | uint32_t | framenum | ) |
Get a frame by its number.
| framenum | The number of the frame to retrieve. |
| wtap_block_t sharkd_get_modified_block | ( | const frame_data * | fd | ) |
Get the modified packet block for a given frame, if available.
| fd | Pointer to the frame data structure. |
| wtap_block_t sharkd_get_packet_block | ( | const frame_data * | fd | ) |
Get the packet block for a given frame.
| fd | Pointer to the frame data structure. |
| int sharkd_init | ( | int | argc, |
| char ** | argv | ||
| ) |
Initialize the sharkd server.
This function initializes the sharkd server with command-line arguments.
| argc | Number of command-line arguments. |
| argv | Array of command-line argument strings. |
| int sharkd_load_cap_file | ( | void | ) |
Load a capture file without any limits.
This function loads a capture file into the current session without applying any packet or byte count limits.
| int sharkd_load_cap_file_with_limits | ( | int | max_packet_count, |
| int64_t | max_byte_count | ||
| ) |
Load a capture file with specified limits.
This function loads a capture file into the current session with the specified packet and byte count limits.
| max_packet_count | The maximum number of packets to load. |
| max_byte_count | The maximum number of bytes to load. |
| const struct ws_option * sharkd_long_options | ( | void | ) |
Get the long options for the sharkd daemon.
| int sharkd_loop | ( | int argc | _U_, |
| char *argv[] | _U_ | ||
| ) |
Main loop for the sharkd daemon.
This function runs the main loop for the sharkd daemon, processing incoming requests.
| argc | Number of command-line arguments. |
| argv | Array of command-line argument strings. |
| const char * sharkd_optstring | ( | void | ) |
Get the string of valid options for the sharkd daemon.
| int sharkd_retap | ( | void | ) |
Retaps all packets in the current capture file.
This function triggers a re-dissection of all packets in the currently loaded capture file, applying any active filters and taps.
| int sharkd_session_main | ( | int | mode_setting | ) |
Main function for handling sharkd sessions.
This function initializes the session with a given mode setting and processes commands received from stdin.
| mode_setting | The mode in which the session should operate. |
| int sharkd_set_modified_block | ( | frame_data * | fd, |
| wtap_block_t | new_block | ||
| ) |
Set a modified block for a frame.
| fd | Pointer to the frame data structure. |
| new_block | The new block to set. |
| const char * sharkd_version | ( | void | ) |
Retrieves the version of the SharkD server.