162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci *   Copyright (c) 2010 Wang Lei
362306a36Sopenharmony_ci *   Author(s): Wang Lei (wang840925@gmail.com). All Rights Reserved.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *   Internal DNS Rsolver stuff
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci *   This library is free software; you can redistribute it and/or modify
862306a36Sopenharmony_ci *   it under the terms of the GNU Lesser General Public License as published
962306a36Sopenharmony_ci *   by the Free Software Foundation; either version 2.1 of the License, or
1062306a36Sopenharmony_ci *   (at your option) any later version.
1162306a36Sopenharmony_ci *
1262306a36Sopenharmony_ci *   This library is distributed in the hope that it will be useful,
1362306a36Sopenharmony_ci *   but WITHOUT ANY WARRANTY; without even the implied warranty of
1462306a36Sopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
1562306a36Sopenharmony_ci *   the GNU Lesser General Public License for more details.
1662306a36Sopenharmony_ci *
1762306a36Sopenharmony_ci *   You should have received a copy of the GNU Lesser General Public License
1862306a36Sopenharmony_ci *   along with this library; if not, see <http://www.gnu.org/licenses/>.
1962306a36Sopenharmony_ci */
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#include <linux/compiler.h>
2262306a36Sopenharmony_ci#include <linux/kernel.h>
2362306a36Sopenharmony_ci#include <linux/sched.h>
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/*
2662306a36Sopenharmony_ci * Layout of key payload words.
2762306a36Sopenharmony_ci */
2862306a36Sopenharmony_cienum {
2962306a36Sopenharmony_ci	dns_key_data,
3062306a36Sopenharmony_ci	dns_key_error,
3162306a36Sopenharmony_ci};
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci/*
3462306a36Sopenharmony_ci * dns_key.c
3562306a36Sopenharmony_ci */
3662306a36Sopenharmony_ciextern const struct cred *dns_resolver_cache;
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci/*
3962306a36Sopenharmony_ci * debug tracing
4062306a36Sopenharmony_ci */
4162306a36Sopenharmony_ciextern unsigned int dns_resolver_debug;
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci#define	kdebug(FMT, ...)				\
4462306a36Sopenharmony_cido {							\
4562306a36Sopenharmony_ci	if (unlikely(dns_resolver_debug))		\
4662306a36Sopenharmony_ci		printk(KERN_DEBUG "[%-6.6s] "FMT"\n",	\
4762306a36Sopenharmony_ci		       current->comm, ##__VA_ARGS__);	\
4862306a36Sopenharmony_ci} while (0)
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci#define kenter(FMT, ...) kdebug("==> %s("FMT")", __func__, ##__VA_ARGS__)
5162306a36Sopenharmony_ci#define kleave(FMT, ...) kdebug("<== %s()"FMT"", __func__, ##__VA_ARGS__)
52