API Reference Manual
r8305
|
00001 /* 00002 * Copyright (C) 2012, H&D Wireless AB All rights reserved. 00003 * 00004 * The license to use this software in whole and in part and to 00005 * redistribute it in any form follows with the WiFi HW module from H&D 00006 * Wireless and is granted under the following restrictions: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 00011 * 2. Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * 00015 * 3. The name of H&D Wireless AB may not be used to endorse or promote 00016 * products derived from this software without specific prior written 00017 * permission. 00018 * 00019 * 4. The software may only be used together with hardware from H&D 00020 * Wireless all other use is prohibited. 00021 * 00022 * 5. The license to use and redistribute the software is granted 00023 * together with the purchase of a hardware platform on a one to one 00024 * basis. 00025 * 00026 * 6. The binary code may not be reversed engineered or by other means 00027 * copied to circumvent this license. 00028 * 00029 * THIS SOFTWARE IS PROVIDED BY H&D WIRELESS AB ``AS IS'' AND ANY 00030 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00031 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00032 * PURPOSE ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT 00033 * SHALL HD WIRELESS AB BE LIABLE FOR ANY DIRECT, INDIRECT, 00034 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00035 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00036 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00037 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00038 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00039 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 00040 * OF THE POSSIBILITY OF SUCH DAMAGE. 00041 * 00042 * For more information regarding this software license Contact H&D 00043 * Wireless AB (support@hd-wireless.se). 00044 * 00045 */ 00046 00047 #ifndef WLP_INET_H 00048 #define WLP_INET_H 00049 00050 #include "wlp_api.h" 00051 00052 #ifndef LITTLE_ENDIAN 00053 # define LITTLE_ENDIAN 0x0a0b0c0d /* lsb first */ 00054 #endif 00055 00056 #ifndef BIG_ENDIAN 00057 # define BIG_ENDIAN 0x0d0c0b0a /* msb first */ 00058 #endif 00059 00060 #if WLP_STACK_OFFLOAD && !WLP_STACK_LWIP 00061 00062 # if BYTE_ORDER == LITTLE_ENDIAN 00063 #include <stdint.h> 00064 uint16_t htons(uint16_t x); 00065 uint16_t ntohs(uint16_t x); 00066 uint32_t htonl(uint32_t x); 00067 uint32_t ntohl(uint32_t x); 00068 # else 00069 # define htons(x) (x) 00070 # define ntohs(x) (x) 00071 # define htonl(x) (x) 00072 # define ntohl(x) (x) 00073 # endif /* BYTE_ORDER */ 00074 00075 #endif /* WLP_STACK_OFFLOAD */ 00076 00077 int inet_aton(const char *cp, struct ip_addr *addr); 00078 char *inet_ntoa(const struct ip_addr *addr); 00079 00080 00081 #endif