![](/media/cache/profiles/debfdc81854eac26ec993b55a659c6e1.jpg.50x50_q85.jpg)
mbed client on ethernet with LWIP
Dependencies: mbed Socket lwip-eth lwip-sys lwip
Fork of mbed-client-classic-example-lwip by
nanostack-libservice/mbed-client-libservice/ip6string.h@11:cada08fc8a70, 2016-06-09 (annotated)
- Committer:
- mbedAustin
- Date:
- Thu Jun 09 17:08:36 2016 +0000
- Revision:
- 11:cada08fc8a70
Commit for public Consumption
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedAustin | 11:cada08fc8a70 | 1 | /* |
mbedAustin | 11:cada08fc8a70 | 2 | * Copyright (c) 2014-2015 ARM Limited. All rights reserved. |
mbedAustin | 11:cada08fc8a70 | 3 | * SPDX-License-Identifier: Apache-2.0 |
mbedAustin | 11:cada08fc8a70 | 4 | * Licensed under the Apache License, Version 2.0 (the License); you may |
mbedAustin | 11:cada08fc8a70 | 5 | * not use this file except in compliance with the License. |
mbedAustin | 11:cada08fc8a70 | 6 | * You may obtain a copy of the License at |
mbedAustin | 11:cada08fc8a70 | 7 | * |
mbedAustin | 11:cada08fc8a70 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbedAustin | 11:cada08fc8a70 | 9 | * |
mbedAustin | 11:cada08fc8a70 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbedAustin | 11:cada08fc8a70 | 11 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
mbedAustin | 11:cada08fc8a70 | 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbedAustin | 11:cada08fc8a70 | 13 | * See the License for the specific language governing permissions and |
mbedAustin | 11:cada08fc8a70 | 14 | * limitations under the License. |
mbedAustin | 11:cada08fc8a70 | 15 | */ |
mbedAustin | 11:cada08fc8a70 | 16 | #ifndef IP6STRING_H |
mbedAustin | 11:cada08fc8a70 | 17 | #define IP6STRING_H |
mbedAustin | 11:cada08fc8a70 | 18 | #ifdef __cplusplus |
mbedAustin | 11:cada08fc8a70 | 19 | extern "C" { |
mbedAustin | 11:cada08fc8a70 | 20 | #endif |
mbedAustin | 11:cada08fc8a70 | 21 | /** |
mbedAustin | 11:cada08fc8a70 | 22 | * Print binary IPv6 address to a string. |
mbedAustin | 11:cada08fc8a70 | 23 | * String must contain enough room for full address, 40 bytes exact. |
mbedAustin | 11:cada08fc8a70 | 24 | * IPv4 tunneling addresses are not covered. |
mbedAustin | 11:cada08fc8a70 | 25 | * \param ip6addr IPv6 address. |
mbedAustin | 11:cada08fc8a70 | 26 | * \p buffer to write string to. |
mbedAustin | 11:cada08fc8a70 | 27 | */ |
mbedAustin | 11:cada08fc8a70 | 28 | void ip6tos(const void *ip6addr, char *p); |
mbedAustin | 11:cada08fc8a70 | 29 | |
mbedAustin | 11:cada08fc8a70 | 30 | /** |
mbedAustin | 11:cada08fc8a70 | 31 | * Convert numeric IPv6 address string to a binary. |
mbedAustin | 11:cada08fc8a70 | 32 | * IPv4 tunneling addresses are not covered. |
mbedAustin | 11:cada08fc8a70 | 33 | * \param ip6addr IPv6 address in string format. |
mbedAustin | 11:cada08fc8a70 | 34 | * \param len Lenght of ipv6 string, maximum of 41. |
mbedAustin | 11:cada08fc8a70 | 35 | * \param dest buffer for address. MUST be 16 bytes. |
mbedAustin | 11:cada08fc8a70 | 36 | */ |
mbedAustin | 11:cada08fc8a70 | 37 | void stoip6(const char *ip6addr, size_t len, void *dest); |
mbedAustin | 11:cada08fc8a70 | 38 | /** |
mbedAustin | 11:cada08fc8a70 | 39 | * Find out numeric IPv6 address prefix length |
mbedAustin | 11:cada08fc8a70 | 40 | * \param ip6addr IPv6 address in string format |
mbedAustin | 11:cada08fc8a70 | 41 | * \return prefix length or 0 if it not given |
mbedAustin | 11:cada08fc8a70 | 42 | */ |
mbedAustin | 11:cada08fc8a70 | 43 | unsigned char sipv6_prefixlength(const char *ip6addr); |
mbedAustin | 11:cada08fc8a70 | 44 | |
mbedAustin | 11:cada08fc8a70 | 45 | #ifdef __cplusplus |
mbedAustin | 11:cada08fc8a70 | 46 | } |
mbedAustin | 11:cada08fc8a70 | 47 | #endif |
mbedAustin | 11:cada08fc8a70 | 48 | #endif |