1998-10-14 20:03:03 +00:00
|
|
|
/* packet-dns.h
|
|
|
|
* Definitions for packet disassembly structures and routines used both by
|
|
|
|
* DNS and NBNS.
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
1998-10-14 20:03:03 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2018-02-12 11:23:27 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
1998-10-14 20:03:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __PACKET_DNS_H__
|
|
|
|
#define __PACKET_DNS_H__
|
|
|
|
|
2014-10-08 23:45:41 +00:00
|
|
|
extern const value_string dns_classes[];
|
1998-10-14 20:03:03 +00:00
|
|
|
|
2022-10-19 15:13:50 +00:00
|
|
|
/*
|
|
|
|
* Expands DNS name from TVB into a byte string.
|
|
|
|
*
|
|
|
|
* Returns int: byte size of DNS data.
|
|
|
|
* Returns char *name: a dot (.) separated raw string of DNS domain name labels.
|
|
|
|
* This string is null terminated. Labels are copied directly from raw packet
|
|
|
|
* data without any validation for a string encoding. This is the callers responsibility.
|
|
|
|
* Return int name_len: byte length of "name".
|
|
|
|
*/
|
|
|
|
int get_dns_name(tvbuff_t *tvb, int offset, int max_len, int dns_data_offset,
|
|
|
|
const gchar **name, gint* name_len);
|
1998-10-14 20:03:03 +00:00
|
|
|
|
2018-06-18 17:23:32 +00:00
|
|
|
#define MAX_DNAME_LEN 255 /* maximum domain name length */
|
1998-10-14 20:03:03 +00:00
|
|
|
|
|
|
|
#endif /* packet-dns.h */
|