uIP 1.0 based webserver for LPC1114 + ENC28J60

Dependencies:   mbed TMP102

Committer:
ban4jp
Date:
Mon Jun 30 16:00:08 2014 +0000
Revision:
3:a2715e9c7737
Parent:
2:4da9ed411bdc
backported from Contiki 2.7

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ban4jp 0:685224d2f66d 1 /**
ban4jp 0:685224d2f66d 2 * \addtogroup uipopt
ban4jp 0:685224d2f66d 3 * @{
ban4jp 0:685224d2f66d 4 */
ban4jp 0:685224d2f66d 5
ban4jp 0:685224d2f66d 6 /**
ban4jp 0:685224d2f66d 7 * \name Project-specific configuration options
ban4jp 0:685224d2f66d 8 * @{
ban4jp 0:685224d2f66d 9 *
ban4jp 0:685224d2f66d 10 * uIP has a number of configuration options that can be overridden
ban4jp 0:685224d2f66d 11 * for each project. These are kept in a project-specific uip-conf.h
ban4jp 0:685224d2f66d 12 * file and all configuration names have the prefix UIP_CONF.
ban4jp 0:685224d2f66d 13 */
ban4jp 0:685224d2f66d 14
ban4jp 0:685224d2f66d 15 /*
ban4jp 0:685224d2f66d 16 * Copyright (c) 2006, Swedish Institute of Computer Science.
ban4jp 0:685224d2f66d 17 * All rights reserved.
ban4jp 0:685224d2f66d 18 *
ban4jp 0:685224d2f66d 19 * Redistribution and use in source and binary forms, with or without
ban4jp 0:685224d2f66d 20 * modification, are permitted provided that the following conditions
ban4jp 0:685224d2f66d 21 * are met:
ban4jp 0:685224d2f66d 22 * 1. Redistributions of source code must retain the above copyright
ban4jp 0:685224d2f66d 23 * notice, this list of conditions and the following disclaimer.
ban4jp 0:685224d2f66d 24 * 2. Redistributions in binary form must reproduce the above copyright
ban4jp 0:685224d2f66d 25 * notice, this list of conditions and the following disclaimer in the
ban4jp 0:685224d2f66d 26 * documentation and/or other materials provided with the distribution.
ban4jp 0:685224d2f66d 27 * 3. Neither the name of the Institute nor the names of its contributors
ban4jp 0:685224d2f66d 28 * may be used to endorse or promote products derived from this software
ban4jp 0:685224d2f66d 29 * without specific prior written permission.
ban4jp 0:685224d2f66d 30 *
ban4jp 0:685224d2f66d 31 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
ban4jp 0:685224d2f66d 32 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
ban4jp 0:685224d2f66d 33 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ban4jp 0:685224d2f66d 34 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
ban4jp 0:685224d2f66d 35 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
ban4jp 0:685224d2f66d 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
ban4jp 0:685224d2f66d 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ban4jp 0:685224d2f66d 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
ban4jp 0:685224d2f66d 39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
ban4jp 0:685224d2f66d 40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
ban4jp 0:685224d2f66d 41 * SUCH DAMAGE.
ban4jp 0:685224d2f66d 42 *
ban4jp 0:685224d2f66d 43 * This file is part of the uIP TCP/IP stack
ban4jp 0:685224d2f66d 44 *
ban4jp 0:685224d2f66d 45 * $Id: uip-conf.h,v 1.6 2006/06/12 08:00:31 adam Exp $
ban4jp 0:685224d2f66d 46 */
ban4jp 0:685224d2f66d 47
ban4jp 0:685224d2f66d 48 /**
ban4jp 0:685224d2f66d 49 * \file
ban4jp 0:685224d2f66d 50 * An example uIP configuration file
ban4jp 0:685224d2f66d 51 * \author
ban4jp 0:685224d2f66d 52 * Adam Dunkels <adam@sics.se>
ban4jp 0:685224d2f66d 53 */
ban4jp 0:685224d2f66d 54
ban4jp 0:685224d2f66d 55 #ifndef __UIP_CONF_H__
ban4jp 0:685224d2f66d 56 #define __UIP_CONF_H__
ban4jp 0:685224d2f66d 57
ban4jp 0:685224d2f66d 58 #include <inttypes.h>
ban4jp 0:685224d2f66d 59
ban4jp 0:685224d2f66d 60 /**
ban4jp 0:685224d2f66d 61 * 8 bit datatype
ban4jp 0:685224d2f66d 62 *
ban4jp 0:685224d2f66d 63 * This typedef defines the 8-bit type used throughout uIP.
ban4jp 0:685224d2f66d 64 *
ban4jp 0:685224d2f66d 65 * \hideinitializer
ban4jp 0:685224d2f66d 66 */
ban4jp 0:685224d2f66d 67 typedef uint8_t u8_t;
ban4jp 0:685224d2f66d 68
ban4jp 0:685224d2f66d 69 /**
ban4jp 0:685224d2f66d 70 * 16 bit datatype
ban4jp 0:685224d2f66d 71 *
ban4jp 0:685224d2f66d 72 * This typedef defines the 16-bit type used throughout uIP.
ban4jp 0:685224d2f66d 73 *
ban4jp 0:685224d2f66d 74 * \hideinitializer
ban4jp 0:685224d2f66d 75 */
ban4jp 0:685224d2f66d 76 typedef uint16_t u16_t;
ban4jp 0:685224d2f66d 77
ban4jp 0:685224d2f66d 78 /**
ban4jp 0:685224d2f66d 79 * Statistics datatype
ban4jp 0:685224d2f66d 80 *
ban4jp 0:685224d2f66d 81 * This typedef defines the dataype used for keeping statistics in
ban4jp 0:685224d2f66d 82 * uIP.
ban4jp 0:685224d2f66d 83 *
ban4jp 0:685224d2f66d 84 * \hideinitializer
ban4jp 0:685224d2f66d 85 */
ban4jp 0:685224d2f66d 86 typedef unsigned short uip_stats_t;
ban4jp 0:685224d2f66d 87
ban4jp 0:685224d2f66d 88 /**
ban4jp 0:685224d2f66d 89 * Maximum number of TCP connections.
ban4jp 0:685224d2f66d 90 *
ban4jp 0:685224d2f66d 91 * \hideinitializer
ban4jp 0:685224d2f66d 92 */
ban4jp 0:685224d2f66d 93 #define UIP_CONF_MAX_CONNECTIONS 10
ban4jp 0:685224d2f66d 94
ban4jp 0:685224d2f66d 95 /**
ban4jp 0:685224d2f66d 96 * Maximum number of listening TCP ports.
ban4jp 0:685224d2f66d 97 *
ban4jp 0:685224d2f66d 98 * \hideinitializer
ban4jp 0:685224d2f66d 99 */
ban4jp 0:685224d2f66d 100 #define UIP_CONF_MAX_LISTENPORTS 10
ban4jp 0:685224d2f66d 101
ban4jp 0:685224d2f66d 102 /**
ban4jp 0:685224d2f66d 103 * uIP buffer size.
ban4jp 0:685224d2f66d 104 *
ban4jp 0:685224d2f66d 105 * \hideinitializer
ban4jp 0:685224d2f66d 106 */
ban4jp 3:a2715e9c7737 107 #define UIP_CONF_BUFFER_SIZE 512
ban4jp 0:685224d2f66d 108
ban4jp 0:685224d2f66d 109 /**
ban4jp 0:685224d2f66d 110 * CPU byte order.
ban4jp 0:685224d2f66d 111 *
ban4jp 0:685224d2f66d 112 * \hideinitializer
ban4jp 0:685224d2f66d 113 */
ban4jp 0:685224d2f66d 114 #define UIP_CONF_BYTE_ORDER LITTLE_ENDIAN
ban4jp 0:685224d2f66d 115
ban4jp 0:685224d2f66d 116 /**
ban4jp 0:685224d2f66d 117 * Logging on or off
ban4jp 0:685224d2f66d 118 *
ban4jp 0:685224d2f66d 119 * \hideinitializer
ban4jp 0:685224d2f66d 120 */
ban4jp 0:685224d2f66d 121 #define UIP_CONF_LOGGING 0
ban4jp 0:685224d2f66d 122
ban4jp 0:685224d2f66d 123 /**
ban4jp 0:685224d2f66d 124 * UDP support on or off
ban4jp 0:685224d2f66d 125 *
ban4jp 0:685224d2f66d 126 * \hideinitializer
ban4jp 0:685224d2f66d 127 */
ban4jp 0:685224d2f66d 128 #define UIP_CONF_UDP 0
ban4jp 0:685224d2f66d 129
ban4jp 0:685224d2f66d 130 /**
ban4jp 0:685224d2f66d 131 * UDP checksums on or off
ban4jp 0:685224d2f66d 132 *
ban4jp 0:685224d2f66d 133 * \hideinitializer
ban4jp 0:685224d2f66d 134 */
ban4jp 0:685224d2f66d 135 #define UIP_CONF_UDP_CHECKSUMS 1
ban4jp 0:685224d2f66d 136
ban4jp 0:685224d2f66d 137 /**
ban4jp 0:685224d2f66d 138 * uIP statistics on or off
ban4jp 0:685224d2f66d 139 *
ban4jp 0:685224d2f66d 140 * \hideinitializer
ban4jp 0:685224d2f66d 141 */
ban4jp 0:685224d2f66d 142 #define UIP_CONF_STATISTICS 1
ban4jp 0:685224d2f66d 143
ban4jp 0:685224d2f66d 144 /* Here we include the header file for the application(s) we use in
ban4jp 0:685224d2f66d 145 our project. */
ban4jp 0:685224d2f66d 146 /*#include "smtp.h"*/
ban4jp 0:685224d2f66d 147 /*#include "hello-world.h"*/
ban4jp 0:685224d2f66d 148 /*#include "telnetd.h"*/
ban4jp 0:685224d2f66d 149 #include "webserver.h"
ban4jp 0:685224d2f66d 150 /*#include "dhcpc.h"*/
ban4jp 0:685224d2f66d 151 /*#include "resolv.h"*/
ban4jp 0:685224d2f66d 152 /*#include "webclient.h"*/
ban4jp 0:685224d2f66d 153
ban4jp 0:685224d2f66d 154
ban4jp 0:685224d2f66d 155 /* Ethernet MAC address */
ban4jp 0:685224d2f66d 156 #define UIP_ETHADDR0 0xf2 /* bit 0x02 is Local Address Flag. local network use only. */
ban4jp 0:685224d2f66d 157 #define UIP_ETHADDR1 0xff
ban4jp 0:685224d2f66d 158 #define UIP_ETHADDR2 0xff
ban4jp 0:685224d2f66d 159 #define UIP_ETHADDR3 0x33
ban4jp 0:685224d2f66d 160 #define UIP_ETHADDR4 0x05
ban4jp 0:685224d2f66d 161 #define UIP_ETHADDR5 0x71
ban4jp 0:685224d2f66d 162
ban4jp 0:685224d2f66d 163
ban4jp 0:685224d2f66d 164 #endif /* __UIP_CONF_H__ */
ban4jp 0:685224d2f66d 165
ban4jp 0:685224d2f66d 166 /** @} */
ban4jp 0:685224d2f66d 167 /** @} */