| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-dns.h
1/* packet-dns.h
2 * Definitions for packet disassembly structures and routines used both by
3 * DNS and NBNS.
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12
13#ifndef __PACKET_DNS_H__
14#define __PACKET_DNS_H__
15
16extern const value_string dns_classes[];
17
18/*
19 * Expands DNS name from TVB into a byte string.
20 *
21 * Returns int: byte size of DNS data.
22 * Returns char *name: a dot (.) separated raw string of DNS domain name labels.
23 * This string is null terminated. Labels are copied directly from raw packet
24 * data without any validation for a string encoding. This is the callers responsibility.
25 * Return int name_len: byte length of "name".
26 */
27int get_dns_name(wmem_allocator_t* scope, tvbuff_t *tvb, int offset, int max_len, int dns_data_offset,
28 const char **name, int* name_len);
29
30#define MAX_DNAME_LEN 255 /* maximum domain name length */
31
32#endif /* packet-dns.h */
_value_string
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33
_wmem_allocator_t
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34
tvbuff
Definition tvbuff-int.h:35