Contiki 2.6

resolv.h

Go to the documentation of this file.
00001 /**
00002  * \file
00003  * uIP DNS resolver code header file.
00004  * \author Adam Dunkels <adam@dunkels.com>
00005  */
00006 
00007 /*
00008  * Copyright (c) 2002-2003, Adam Dunkels.
00009  * All rights reserved. 
00010  *
00011  * Redistribution and use in source and binary forms, with or without 
00012  * modification, are permitted provided that the following conditions 
00013  * are met: 
00014  * 1. Redistributions of source code must retain the above copyright 
00015  *    notice, this list of conditions and the following disclaimer. 
00016  * 2. Redistributions in binary form must reproduce the above copyright 
00017  *    notice, this list of conditions and the following disclaimer in the 
00018  *    documentation and/or other materials provided with the distribution. 
00019  * 3. The name of the author may not be used to endorse or promote
00020  *    products derived from this software without specific prior
00021  *    written permission.  
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00024  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00025  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00026  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00027  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00028  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00029  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00030  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00031  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00032  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00033  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
00034  *
00035  * This file is part of the uIP TCP/IP stack.
00036  *
00037  * $Id: resolv.h,v 1.4 2010/05/31 15:22:08 nifi Exp $
00038  *
00039  */
00040 #ifndef __RESOLV_H__
00041 #define __RESOLV_H__
00042 
00043 #include "contiki.h"
00044 
00045 /**
00046  * Event that is broadcasted when a DNS name has been resolved.
00047  */
00048 CCIF extern process_event_t resolv_event_found;
00049 
00050 /* Functions. */
00051 CCIF void resolv_conf(const uip_ipaddr_t *dnsserver);
00052 CCIF uip_ipaddr_t *resolv_getserver(void);
00053 CCIF uip_ipaddr_t *resolv_lookup(const char *name);
00054 CCIF void resolv_query(const char *name);
00055 
00056 PROCESS_NAME(resolv_process);
00057 
00058 #endif /* __RESOLV_H__ */