Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  *   Copyright (c) 2010 Wang Lei
0003  *   Author(s): Wang Lei (wang840925@gmail.com). All Rights Reserved.
0004  *
0005  *   Internal DNS Rsolver stuff
0006  *
0007  *   This library is free software; you can redistribute it and/or modify
0008  *   it under the terms of the GNU Lesser General Public License as published
0009  *   by the Free Software Foundation; either version 2.1 of the License, or
0010  *   (at your option) any later version.
0011  *
0012  *   This library is distributed in the hope that it will be useful,
0013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
0015  *   the GNU Lesser General Public License for more details.
0016  *
0017  *   You should have received a copy of the GNU Lesser General Public License
0018  *   along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  */
0020 
0021 #include <linux/compiler.h>
0022 #include <linux/kernel.h>
0023 #include <linux/sched.h>
0024 
0025 /*
0026  * Layout of key payload words.
0027  */
0028 enum {
0029     dns_key_data,
0030     dns_key_error,
0031 };
0032 
0033 /*
0034  * dns_key.c
0035  */
0036 extern const struct cred *dns_resolver_cache;
0037 
0038 /*
0039  * debug tracing
0040  */
0041 extern unsigned int dns_resolver_debug;
0042 
0043 #define kdebug(FMT, ...)                \
0044 do {                            \
0045     if (unlikely(dns_resolver_debug))       \
0046         printk(KERN_DEBUG "[%-6.6s] "FMT"\n",   \
0047                current->comm, ##__VA_ARGS__);   \
0048 } while (0)
0049 
0050 #define kenter(FMT, ...) kdebug("==> %s("FMT")", __func__, ##__VA_ARGS__)
0051 #define kleave(FMT, ...) kdebug("<== %s()"FMT"", __func__, ##__VA_ARGS__)