xref: /nrf52832-nimble/rt-thread/components/net/uip/uip/uiplib.h (revision 104654410c56c573564690304ae786df310c91fc)
1*10465441SEvalZero /**
2*10465441SEvalZero  * \file
3*10465441SEvalZero  * Various uIP library functions.
4*10465441SEvalZero  * \author
5*10465441SEvalZero  * Adam Dunkels <[email protected]>
6*10465441SEvalZero  *
7*10465441SEvalZero  */
8*10465441SEvalZero 
9*10465441SEvalZero /*
10*10465441SEvalZero  * Copyright (c) 2002, Adam Dunkels.
11*10465441SEvalZero  * All rights reserved.
12*10465441SEvalZero  *
13*10465441SEvalZero  * Redistribution and use in source and binary forms, with or without
14*10465441SEvalZero  * modification, are permitted provided that the following conditions
15*10465441SEvalZero  * are met:
16*10465441SEvalZero  * 1. Redistributions of source code must retain the above copyright
17*10465441SEvalZero  *    notice, this list of conditions and the following disclaimer.
18*10465441SEvalZero  * 2. Redistributions in binary form must reproduce the above
19*10465441SEvalZero  *    copyright notice, this list of conditions and the following
20*10465441SEvalZero  *    disclaimer in the documentation and/or other materials provided
21*10465441SEvalZero  *    with the distribution.
22*10465441SEvalZero  * 3. The name of the author may not be used to endorse or promote
23*10465441SEvalZero  *    products derived from this software without specific prior
24*10465441SEvalZero  *    written permission.
25*10465441SEvalZero  *
26*10465441SEvalZero  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
27*10465441SEvalZero  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28*10465441SEvalZero  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29*10465441SEvalZero  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
30*10465441SEvalZero  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31*10465441SEvalZero  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
32*10465441SEvalZero  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33*10465441SEvalZero  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34*10465441SEvalZero  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35*10465441SEvalZero  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36*10465441SEvalZero  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37*10465441SEvalZero  *
38*10465441SEvalZero  * This file is part of the uIP TCP/IP stack
39*10465441SEvalZero  *
40*10465441SEvalZero  * $Id: uiplib.h,v 1.1 2006/06/07 09:15:19 adam Exp $
41*10465441SEvalZero  *
42*10465441SEvalZero  */
43*10465441SEvalZero #ifndef __UIPLIB_H__
44*10465441SEvalZero #define __UIPLIB_H__
45*10465441SEvalZero 
46*10465441SEvalZero /**
47*10465441SEvalZero  * \addtogroup uipconvfunc
48*10465441SEvalZero  * @{
49*10465441SEvalZero  */
50*10465441SEvalZero 
51*10465441SEvalZero /**
52*10465441SEvalZero  * Convert a textual representation of an IP address to a numerical representation.
53*10465441SEvalZero  *
54*10465441SEvalZero  * This function takes a textual representation of an IP address in
55*10465441SEvalZero  * the form a.b.c.d and converts it into a 4-byte array that can be
56*10465441SEvalZero  * used by other uIP functions.
57*10465441SEvalZero  *
58*10465441SEvalZero  * \param addrstr A pointer to a string containing the IP address in
59*10465441SEvalZero  * textual form.
60*10465441SEvalZero  *
61*10465441SEvalZero  * \param addr A pointer to a 4-byte array that will be filled in with
62*10465441SEvalZero  * the numerical representation of the address.
63*10465441SEvalZero  *
64*10465441SEvalZero  * \retval 0 If the IP address could not be parsed.
65*10465441SEvalZero  * \retval Non-zero If the IP address was parsed.
66*10465441SEvalZero  */
67*10465441SEvalZero unsigned char uiplib_ipaddrconv(char *addrstr, unsigned char *addr);
68*10465441SEvalZero 
69*10465441SEvalZero /** @} */
70*10465441SEvalZero 
71*10465441SEvalZero #endif /* __UIPLIB_H__ */
72