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