Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
field_urls.h
Go to the documentation of this file.
1
12#pragma once
13
14#include <stdbool.h>
15
16#include "ws_symbol_export.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
22#define FIELDURLS_FILE_NAME "fieldurls"
23
24/*
25 * The "fieldurls" file in the personal configuration directory (shared by
26 * all profiles) has one line per field or protocol abbreviation:
27 *
28 * <abbrev> <url>
29 * <abbrev> {<items>}[flags]=<url> ... [<default url>]
30 *
31 * Fields are separated by whitespace and lines starting with '#' are
32 * comments. A rule's <items> are a comma separated list of values, each
33 * either unquoted (a value, an inclusive range "a..b", an IPv4 or IPv6
34 * address, address range or CIDR network, which are compared as addresses
35 * to values that are addresses) or double quoted (always text, with \" and
36 * \\ as escapes). The optional flags are 'i' (case-insensitive) and '*'
37 * (the value contains an item, instead of being equal to it). Rules are
38 * tried in order against the value of the selected field and the first
39 * match gives the URL. The URL at the end of the line is used if no rule
40 * matches. The file is read once, on first use.
41 */
42
59WS_DLL_PUBLIC char *field_url_expand(const char *url, const char *fieldname, const char *fieldvalue);
60
74WS_DLL_PUBLIC bool field_url_needs_value(const char *fieldname, const char *protoname);
75
88WS_DLL_PUBLIC char *field_url_for(const char *fieldname, const char *protoname, const char *fieldvalue);
89
90#ifdef __cplusplus
91}
92#endif /* __cplusplus */
WS_DLL_PUBLIC char * field_url_for(const char *fieldname, const char *protoname, const char *fieldvalue)
Get the user-defined URL for a field, with placeholders expanded.
Definition field_urls.c:635
WS_DLL_PUBLIC bool field_url_needs_value(const char *fieldname, const char *protoname)
Check whether the value of a field is needed to get its URL.
Definition field_urls.c:616
WS_DLL_PUBLIC char * field_url_expand(const char *url, const char *fieldname, const char *fieldvalue)
Replace the placeholders in a URL.
Definition field_urls.c:589