adamdunkels | 0170b08 | 2003-10-01 11:25:37 +0000 | [diff] [blame] | 1 | /** |
| 2 | * \file |
| 3 | * uIP DNS resolver code header file. |
| 4 | * \author Adam Dunkels <adam@dunkels.com> |
| 5 | */ |
| 6 | |
adamdunkels | ca9ddcb | 2003-03-19 14:13:31 +0000 | [diff] [blame] | 7 | /* |
adamdunkels | 0170b08 | 2003-10-01 11:25:37 +0000 | [diff] [blame] | 8 | * Copyright (c) 2002-2003, Adam Dunkels. |
adamdunkels | ca9ddcb | 2003-03-19 14:13:31 +0000 | [diff] [blame] | 9 | * All rights reserved. |
| 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without |
| 12 | * modification, are permitted provided that the following conditions |
| 13 | * are met: |
| 14 | * 1. Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions and the following disclaimer. |
| 16 | * 2. Redistributions in binary form must reproduce the above copyright |
| 17 | * notice, this list of conditions and the following disclaimer in the |
| 18 | * documentation and/or other materials provided with the distribution. |
adamdunkels | 0170b08 | 2003-10-01 11:25:37 +0000 | [diff] [blame] | 19 | * 3. The name of the author may not be used to endorse or promote |
adamdunkels | ca9ddcb | 2003-03-19 14:13:31 +0000 | [diff] [blame] | 20 | * products derived from this software without specific prior |
| 21 | * written permission. |
| 22 | * |
| 23 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS |
| 24 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 25 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 26 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 27 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 28 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
| 29 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 32 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 34 | * |
| 35 | * This file is part of the uIP TCP/IP stack. |
| 36 | * |
adamdunkels | 0d7a19d | 2005-02-07 07:08:03 +0000 | [diff] [blame] | 37 | * $Id: resolv.h,v 1.7 2005/02/07 07:08:03 adamdunkels Exp $ |
adamdunkels | ca9ddcb | 2003-03-19 14:13:31 +0000 | [diff] [blame] | 38 | * |
| 39 | */ |
| 40 | #ifndef __RESOLV_H__ |
| 41 | #define __RESOLV_H__ |
| 42 | |
| 43 | #include "uip.h" |
adamdunkels | ca9ddcb | 2003-03-19 14:13:31 +0000 | [diff] [blame] | 44 | |
adamdunkels | 0170b08 | 2003-10-01 11:25:37 +0000 | [diff] [blame] | 45 | /** |
adamdunkels | 0d7a19d | 2005-02-07 07:08:03 +0000 | [diff] [blame] | 46 | * Event that is broadcasted when a DNS name has been resolved. |
adamdunkels | 0170b08 | 2003-10-01 11:25:37 +0000 | [diff] [blame] | 47 | */ |
adamdunkels | ae920f9 | 2004-07-04 16:52:30 +0000 | [diff] [blame] | 48 | extern ek_event_t resolv_event_found; |
adamdunkels | ca9ddcb | 2003-03-19 14:13:31 +0000 | [diff] [blame] | 49 | |
| 50 | /* Callbacks. */ |
| 51 | void resolv_found(char *name, u16_t *ipaddr); |
| 52 | |
| 53 | /* Functions. */ |
| 54 | void resolv_conf(u16_t *dnsserver); |
adamdunkels | 66c6af6 | 2003-04-16 18:28:16 +0000 | [diff] [blame] | 55 | u16_t *resolv_getserver(void); |
adamdunkels | 981ae0d | 2004-02-24 09:54:52 +0000 | [diff] [blame] | 56 | /*LOADER_INIT_FUNC(resolv_init, arg);*/ |
| 57 | void resolv_init(char *arg); |
adamdunkels | ca9ddcb | 2003-03-19 14:13:31 +0000 | [diff] [blame] | 58 | u16_t *resolv_lookup(char *name); |
| 59 | void resolv_query(char *name); |
| 60 | |
| 61 | #endif /* __RESOLV_H__ */ |