Contiki 2.6
|
00001 /** 00002 * \file 00003 * Various uIP library functions. 00004 * \author 00005 * Adam Dunkels <adam@sics.se> 00006 * 00007 */ 00008 00009 /* 00010 * Copyright (c) 2002, Adam Dunkels. 00011 * All rights reserved. 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions 00015 * are met: 00016 * 1. Redistributions of source code must retain the above copyright 00017 * notice, this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above 00019 * copyright notice, this list of conditions and the following 00020 * disclaimer in the documentation and/or other materials provided 00021 * with the distribution. 00022 * 3. The name of the author may not be used to endorse or promote 00023 * products derived from this software without specific prior 00024 * written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 00027 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00028 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00029 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 00030 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00031 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00032 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00033 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00034 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00035 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00036 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 * This file is part of the Contiki desktop environment for the C64. 00039 * 00040 * $Id: uiplib.h,v 1.3 2010/05/31 15:22:08 nifi Exp $ 00041 * 00042 */ 00043 #ifndef __UIPLIB_H__ 00044 #define __UIPLIB_H__ 00045 00046 #include "net/uip.h" 00047 00048 /** 00049 * \addtogroup uipconvfunc 00050 * @{ 00051 */ 00052 00053 /** 00054 * Convert a textual representation of an IP address to a numerical representation. 00055 * 00056 * This function takes a textual representation of an IP address in 00057 * the form a.b.c.d for IPv4 or a:b:c:d:e:f:g:h for IPv6 and converts 00058 * it into a numeric IP address representation that can be used by 00059 * other uIP functions. 00060 * 00061 * \param addrstr A pointer to a string containing the IP address in 00062 * textual form. 00063 * 00064 * \param addr A pointer to a uip_ipaddr_t that will be filled in with 00065 * the numerical representation of the address. 00066 * 00067 * \retval 0 If the IP address could not be parsed. 00068 * \retval Non-zero If the IP address was parsed. 00069 */ 00070 CCIF int uiplib_ipaddrconv(const char *addrstr, uip_ipaddr_t *addr); 00071 00072 /** @} */ 00073 00074 #endif /* __UIPLIB_H__ */