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