11a4240f4SWang Lei /* 21a4240f4SWang Lei * Copyright (c) 2010 Wang Lei 31a4240f4SWang Lei * Author(s): Wang Lei (wang840925@gmail.com). All Rights Reserved. 41a4240f4SWang Lei * 51a4240f4SWang Lei * Internal DNS Rsolver stuff 61a4240f4SWang Lei * 71a4240f4SWang Lei * This library is free software; you can redistribute it and/or modify 81a4240f4SWang Lei * it under the terms of the GNU Lesser General Public License as published 91a4240f4SWang Lei * by the Free Software Foundation; either version 2.1 of the License, or 101a4240f4SWang Lei * (at your option) any later version. 111a4240f4SWang Lei * 121a4240f4SWang Lei * This library is distributed in the hope that it will be useful, 131a4240f4SWang Lei * but WITHOUT ANY WARRANTY; without even the implied warranty of 141a4240f4SWang Lei * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 151a4240f4SWang Lei * the GNU Lesser General Public License for more details. 161a4240f4SWang Lei * 171a4240f4SWang Lei * You should have received a copy of the GNU Lesser General Public License 18c057b190SJeff Kirsher * along with this library; if not, see <http://www.gnu.org/licenses/>. 191a4240f4SWang Lei */ 201a4240f4SWang Lei 211a4240f4SWang Lei #include <linux/compiler.h> 221a4240f4SWang Lei #include <linux/kernel.h> 231a4240f4SWang Lei #include <linux/sched.h> 241a4240f4SWang Lei 251a4240f4SWang Lei /* 26*146aa8b1SDavid Howells * Layout of key payload words. 27*146aa8b1SDavid Howells */ 28*146aa8b1SDavid Howells enum { 29*146aa8b1SDavid Howells dns_key_data, 30*146aa8b1SDavid Howells dns_key_error, 31*146aa8b1SDavid Howells }; 32*146aa8b1SDavid Howells 33*146aa8b1SDavid Howells /* 341a4240f4SWang Lei * dns_key.c 351a4240f4SWang Lei */ 361a4240f4SWang Lei extern const struct cred *dns_resolver_cache; 371a4240f4SWang Lei 381a4240f4SWang Lei /* 391a4240f4SWang Lei * debug tracing 401a4240f4SWang Lei */ 4195c96174SEric Dumazet extern unsigned int dns_resolver_debug; 421a4240f4SWang Lei 431a4240f4SWang Lei #define kdebug(FMT, ...) \ 441a4240f4SWang Lei do { \ 451a4240f4SWang Lei if (unlikely(dns_resolver_debug)) \ 461a4240f4SWang Lei printk(KERN_DEBUG "[%-6.6s] "FMT"\n", \ 471a4240f4SWang Lei current->comm, ##__VA_ARGS__); \ 481a4240f4SWang Lei } while (0) 491a4240f4SWang Lei 501a4240f4SWang Lei #define kenter(FMT, ...) kdebug("==> %s("FMT")", __func__, ##__VA_ARGS__) 511a4240f4SWang Lei #define kleave(FMT, ...) kdebug("<== %s()"FMT"", __func__, ##__VA_ARGS__) 52