2 * Definitions for packet disassembly structures and routines used both by
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
13 #ifndef __PACKET_DNS_H__
14 #define __PACKET_DNS_H__
16 extern const value_string dns_classes
[];
19 * Expands DNS name from TVB into a byte string.
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".
27 int get_dns_name(tvbuff_t
*tvb
, int offset
, int max_len
, int dns_data_offset
,
28 const char **name
, int* name_len
);
30 #define MAX_DNAME_LEN 255 /* maximum domain name length */
32 #endif /* packet-dns.h */