These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Committer:
frank26080115
Date:
Sun Mar 20 05:38:56 2011 +0000
Revision:
0:bf7b9fba3924

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frank26080115 0:bf7b9fba3924 1 /**
frank26080115 0:bf7b9fba3924 2 * \addtogroup resolv
frank26080115 0:bf7b9fba3924 3 * @{
frank26080115 0:bf7b9fba3924 4 */
frank26080115 0:bf7b9fba3924 5 /**
frank26080115 0:bf7b9fba3924 6 * \file
frank26080115 0:bf7b9fba3924 7 * DNS resolver code header file.
frank26080115 0:bf7b9fba3924 8 * \author Adam Dunkels <adam@dunkels.com>
frank26080115 0:bf7b9fba3924 9 */
frank26080115 0:bf7b9fba3924 10
frank26080115 0:bf7b9fba3924 11 /*
frank26080115 0:bf7b9fba3924 12 * Copyright (c) 2002-2003, Adam Dunkels.
frank26080115 0:bf7b9fba3924 13 * All rights reserved.
frank26080115 0:bf7b9fba3924 14 *
frank26080115 0:bf7b9fba3924 15 * Redistribution and use in source and binary forms, with or without
frank26080115 0:bf7b9fba3924 16 * modification, are permitted provided that the following conditions
frank26080115 0:bf7b9fba3924 17 * are met:
frank26080115 0:bf7b9fba3924 18 * 1. Redistributions of source code must retain the above copyright
frank26080115 0:bf7b9fba3924 19 * notice, this list of conditions and the following disclaimer.
frank26080115 0:bf7b9fba3924 20 * 2. Redistributions in binary form must reproduce the above copyright
frank26080115 0:bf7b9fba3924 21 * notice, this list of conditions and the following disclaimer in the
frank26080115 0:bf7b9fba3924 22 * documentation and/or other materials provided with the distribution.
frank26080115 0:bf7b9fba3924 23 * 3. The name of the author may not be used to endorse or promote
frank26080115 0:bf7b9fba3924 24 * products derived from this software without specific prior
frank26080115 0:bf7b9fba3924 25 * written permission.
frank26080115 0:bf7b9fba3924 26 *
frank26080115 0:bf7b9fba3924 27 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
frank26080115 0:bf7b9fba3924 28 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
frank26080115 0:bf7b9fba3924 29 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
frank26080115 0:bf7b9fba3924 30 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
frank26080115 0:bf7b9fba3924 31 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
frank26080115 0:bf7b9fba3924 32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
frank26080115 0:bf7b9fba3924 33 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
frank26080115 0:bf7b9fba3924 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
frank26080115 0:bf7b9fba3924 35 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
frank26080115 0:bf7b9fba3924 36 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
frank26080115 0:bf7b9fba3924 37 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
frank26080115 0:bf7b9fba3924 38 *
frank26080115 0:bf7b9fba3924 39 * This file is part of the uIP TCP/IP stack.
frank26080115 0:bf7b9fba3924 40 *
frank26080115 0:bf7b9fba3924 41 * $Id: resolv.h,v 1.4 2006/06/11 21:46:37 adam Exp $
frank26080115 0:bf7b9fba3924 42 *
frank26080115 0:bf7b9fba3924 43 */
frank26080115 0:bf7b9fba3924 44 #ifndef __RESOLV_H__
frank26080115 0:bf7b9fba3924 45 #define __RESOLV_H__
frank26080115 0:bf7b9fba3924 46
frank26080115 0:bf7b9fba3924 47 typedef int uip_udp_appstate_t;
frank26080115 0:bf7b9fba3924 48 void resolv_appcall(void);
frank26080115 0:bf7b9fba3924 49 #define UIP_UDP_APPCALL resolv_appcall
frank26080115 0:bf7b9fba3924 50
frank26080115 0:bf7b9fba3924 51 #include "uipopt.h"
frank26080115 0:bf7b9fba3924 52
frank26080115 0:bf7b9fba3924 53 /**
frank26080115 0:bf7b9fba3924 54 * Callback function which is called when a hostname is found.
frank26080115 0:bf7b9fba3924 55 *
frank26080115 0:bf7b9fba3924 56 * This function must be implemented by the module that uses the DNS
frank26080115 0:bf7b9fba3924 57 * resolver. It is called when a hostname is found, or when a hostname
frank26080115 0:bf7b9fba3924 58 * was not found.
frank26080115 0:bf7b9fba3924 59 *
frank26080115 0:bf7b9fba3924 60 * \param name A pointer to the name that was looked up. \param
frank26080115 0:bf7b9fba3924 61 * ipaddr A pointer to a 4-byte array containing the IP address of the
frank26080115 0:bf7b9fba3924 62 * hostname, or NULL if the hostname could not be found.
frank26080115 0:bf7b9fba3924 63 */
frank26080115 0:bf7b9fba3924 64 void resolv_found(char *name, u16_t *ipaddr);
frank26080115 0:bf7b9fba3924 65
frank26080115 0:bf7b9fba3924 66 /* Functions. */
frank26080115 0:bf7b9fba3924 67 void resolv_conf(u16_t *dnsserver);
frank26080115 0:bf7b9fba3924 68 u16_t *resolv_getserver(void);
frank26080115 0:bf7b9fba3924 69 void resolv_init(void);
frank26080115 0:bf7b9fba3924 70 u16_t *resolv_lookup(char *name);
frank26080115 0:bf7b9fba3924 71 void resolv_query(char *name);
frank26080115 0:bf7b9fba3924 72
frank26080115 0:bf7b9fba3924 73 #endif /* __RESOLV_H__ */
frank26080115 0:bf7b9fba3924 74
frank26080115 0:bf7b9fba3924 75 /** @} */