Fork for fixes
utility/uip-conf.h@9:a156d3de5647, 2019-08-27 (annotated)
- Committer:
- hudakz
- Date:
- Tue Aug 27 15:01:10 2019 +0000
- Revision:
- 9:a156d3de5647
- Parent:
- 8:4acb22344932
- Child:
- 13:95c00132cd98
Mbed OS 5 support added and API modified.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 3:5b17e4656dd0 | 1 | /** |
hudakz | 3:5b17e4656dd0 | 2 | * UIPEthernet Project-specific configuration options |
hudakz | 3:5b17e4656dd0 | 3 | * Copyright (c) 2013 Norbert Truchsess <norbert.truchsess@t-online.de> |
hudakz | 3:5b17e4656dd0 | 4 | * @{ |
hudakz | 3:5b17e4656dd0 | 5 | * |
hudakz | 8:4acb22344932 | 6 | * UIP has a number of configuration options that can be overridden |
hudakz | 3:5b17e4656dd0 | 7 | * for each project. These are kept in a project-specific uip-conf.h |
hudakz | 3:5b17e4656dd0 | 8 | * file and all configuration names have the prefix UIP_CONF. |
hudakz | 3:5b17e4656dd0 | 9 | */ |
hudakz | 3:5b17e4656dd0 | 10 | /* |
hudakz | 3:5b17e4656dd0 | 11 | * Copyright (c) 2006, Swedish Institute of Computer Science. |
hudakz | 3:5b17e4656dd0 | 12 | * All rights reserved. |
hudakz | 3:5b17e4656dd0 | 13 | * |
hudakz | 3:5b17e4656dd0 | 14 | * Redistribution and use in source and binary forms, with or without |
hudakz | 3:5b17e4656dd0 | 15 | * modification, are permitted provided that the following conditions |
hudakz | 3:5b17e4656dd0 | 16 | * are met: |
hudakz | 3:5b17e4656dd0 | 17 | * 1. Redistributions of source code must retain the above copyright |
hudakz | 3:5b17e4656dd0 | 18 | * notice, this list of conditions and the following disclaimer. |
hudakz | 3:5b17e4656dd0 | 19 | * 2. Redistributions in binary form must reproduce the above copyright |
hudakz | 3:5b17e4656dd0 | 20 | * notice, this list of conditions and the following disclaimer in the |
hudakz | 3:5b17e4656dd0 | 21 | * documentation and/or other materials provided with the distribution. |
hudakz | 3:5b17e4656dd0 | 22 | * 3. Neither the name of the Institute nor the names of its contributors |
hudakz | 3:5b17e4656dd0 | 23 | * may be used to endorse or promote products derived from this software |
hudakz | 3:5b17e4656dd0 | 24 | * without specific prior written permission. |
hudakz | 3:5b17e4656dd0 | 25 | * |
hudakz | 3:5b17e4656dd0 | 26 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND |
hudakz | 3:5b17e4656dd0 | 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
hudakz | 3:5b17e4656dd0 | 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
hudakz | 3:5b17e4656dd0 | 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE |
hudakz | 3:5b17e4656dd0 | 30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
hudakz | 3:5b17e4656dd0 | 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
hudakz | 3:5b17e4656dd0 | 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
hudakz | 3:5b17e4656dd0 | 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
hudakz | 3:5b17e4656dd0 | 34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
hudakz | 3:5b17e4656dd0 | 35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
hudakz | 3:5b17e4656dd0 | 36 | * SUCH DAMAGE. |
hudakz | 3:5b17e4656dd0 | 37 | * |
hudakz | 8:4acb22344932 | 38 | * This file is part of the UIP TCP/IP stack |
hudakz | 3:5b17e4656dd0 | 39 | * |
hudakz | 3:5b17e4656dd0 | 40 | */ |
hudakz | 3:5b17e4656dd0 | 41 | #ifndef __UIP_CONF_H__ |
hudakz | 8:4acb22344932 | 42 | #define __UIP_CONF_H__ |
hudakz | 3:5b17e4656dd0 | 43 | |
hudakz | 8:4acb22344932 | 44 | #include <inttypes.h> |
hudakz | 8:4acb22344932 | 45 | #include "uipethernet-conf.h" |
hudakz | 3:5b17e4656dd0 | 46 | |
hudakz | 3:5b17e4656dd0 | 47 | /** |
hudakz | 3:5b17e4656dd0 | 48 | * 8 bit datatype |
hudakz | 3:5b17e4656dd0 | 49 | * |
hudakz | 8:4acb22344932 | 50 | * This typedef defines the 8-bit type used throughout UIP. |
hudakz | 3:5b17e4656dd0 | 51 | * |
hudakz | 3:5b17e4656dd0 | 52 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 53 | */ |
hudakz | 3:5b17e4656dd0 | 54 | typedef uint8_t u8_t; |
hudakz | 3:5b17e4656dd0 | 55 | |
hudakz | 3:5b17e4656dd0 | 56 | /** |
hudakz | 3:5b17e4656dd0 | 57 | * 16 bit datatype |
hudakz | 3:5b17e4656dd0 | 58 | * |
hudakz | 8:4acb22344932 | 59 | * This typedef defines the 16-bit type used throughout UIP. |
hudakz | 3:5b17e4656dd0 | 60 | * |
hudakz | 3:5b17e4656dd0 | 61 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 62 | */ |
hudakz | 3:5b17e4656dd0 | 63 | typedef uint16_t u16_t; |
hudakz | 3:5b17e4656dd0 | 64 | |
hudakz | 3:5b17e4656dd0 | 65 | /** |
hudakz | 3:5b17e4656dd0 | 66 | * Statistics datatype |
hudakz | 3:5b17e4656dd0 | 67 | * |
hudakz | 3:5b17e4656dd0 | 68 | * This typedef defines the dataype used for keeping statistics in |
hudakz | 8:4acb22344932 | 69 | * UIP. |
hudakz | 3:5b17e4656dd0 | 70 | * |
hudakz | 3:5b17e4656dd0 | 71 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 72 | */ |
hudakz | 3:5b17e4656dd0 | 73 | typedef unsigned short uip_stats_t; |
hudakz | 3:5b17e4656dd0 | 74 | |
hudakz | 3:5b17e4656dd0 | 75 | /** |
hudakz | 3:5b17e4656dd0 | 76 | * Maximum number of TCP connections. |
hudakz | 3:5b17e4656dd0 | 77 | * (see uipethernet-conf.h) |
hudakz | 3:5b17e4656dd0 | 78 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 79 | * |
hudakz | 3:5b17e4656dd0 | 80 | * #define UIP_CONF_MAX_CONNECTIONS 4 |
hudakz | 3:5b17e4656dd0 | 81 | */ |
hudakz | 3:5b17e4656dd0 | 82 | |
hudakz | 3:5b17e4656dd0 | 83 | /** |
hudakz | 3:5b17e4656dd0 | 84 | * Maximum number of listening TCP ports. |
hudakz | 3:5b17e4656dd0 | 85 | * |
hudakz | 3:5b17e4656dd0 | 86 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 87 | */ |
hudakz | 8:4acb22344932 | 88 | #define UIP_CONF_MAX_LISTENPORTS 4 |
hudakz | 3:5b17e4656dd0 | 89 | |
hudakz | 3:5b17e4656dd0 | 90 | /** |
hudakz | 8:4acb22344932 | 91 | * UIP buffer size. |
hudakz | 3:5b17e4656dd0 | 92 | * |
hudakz | 3:5b17e4656dd0 | 93 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 94 | */ |
hudakz | 3:5b17e4656dd0 | 95 | |
hudakz | 8:4acb22344932 | 96 | #define UIP_CONF_BUFFER_SIZE 98 |
hudakz | 3:5b17e4656dd0 | 97 | //#define UIP_CONF_BUFFER_SIZE 118 |
hudakz | 3:5b17e4656dd0 | 98 | |
hudakz | 3:5b17e4656dd0 | 99 | /** |
hudakz | 3:5b17e4656dd0 | 100 | * The TCP maximum segment size. |
hudakz | 3:5b17e4656dd0 | 101 | * |
hudakz | 3:5b17e4656dd0 | 102 | * This is should not be to set to more than |
hudakz | 3:5b17e4656dd0 | 103 | * UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN. |
hudakz | 3:5b17e4656dd0 | 104 | */ |
hudakz | 8:4acb22344932 | 105 | #define UIP_CONF_TCP_MSS 512 |
hudakz | 3:5b17e4656dd0 | 106 | |
hudakz | 3:5b17e4656dd0 | 107 | /** |
hudakz | 3:5b17e4656dd0 | 108 | * The size of the advertised receiver's window. |
hudakz | 3:5b17e4656dd0 | 109 | * |
hudakz | 3:5b17e4656dd0 | 110 | * Should be set low (i.e., to the size of the uip_buf buffer) is the |
hudakz | 3:5b17e4656dd0 | 111 | * application is slow to process incoming data, or high (32768 bytes) |
hudakz | 3:5b17e4656dd0 | 112 | * if the application processes data quickly. |
hudakz | 3:5b17e4656dd0 | 113 | * |
hudakz | 3:5b17e4656dd0 | 114 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 115 | */ |
hudakz | 3:5b17e4656dd0 | 116 | |
hudakz | 8:4acb22344932 | 117 | #define UIP_CONF_RECEIVE_WINDOW 512 |
hudakz | 3:5b17e4656dd0 | 118 | |
hudakz | 3:5b17e4656dd0 | 119 | /** |
hudakz | 3:5b17e4656dd0 | 120 | * CPU byte order. |
hudakz | 3:5b17e4656dd0 | 121 | * |
hudakz | 3:5b17e4656dd0 | 122 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 123 | */ |
hudakz | 3:5b17e4656dd0 | 124 | |
hudakz | 8:4acb22344932 | 125 | #define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN |
hudakz | 3:5b17e4656dd0 | 126 | |
hudakz | 3:5b17e4656dd0 | 127 | /** |
hudakz | 3:5b17e4656dd0 | 128 | * Logging on or off |
hudakz | 3:5b17e4656dd0 | 129 | * |
hudakz | 3:5b17e4656dd0 | 130 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 131 | */ |
hudakz | 3:5b17e4656dd0 | 132 | |
hudakz | 8:4acb22344932 | 133 | #define UIP_CONF_LOGGING 0 |
hudakz | 3:5b17e4656dd0 | 134 | |
hudakz | 3:5b17e4656dd0 | 135 | /** |
hudakz | 3:5b17e4656dd0 | 136 | * UDP support on or off |
hudakz | 3:5b17e4656dd0 | 137 | * (see uipethernet-conf.h) |
hudakz | 3:5b17e4656dd0 | 138 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 139 | * |
hudakz | 3:5b17e4656dd0 | 140 | * #define UIP_CONF_UDP 1 |
hudakz | 3:5b17e4656dd0 | 141 | * |
hudakz | 3:5b17e4656dd0 | 142 | * #define UIP_CONF_UDP_CONNS 4 |
hudakz | 3:5b17e4656dd0 | 143 | */ |
hudakz | 3:5b17e4656dd0 | 144 | |
hudakz | 3:5b17e4656dd0 | 145 | /** |
hudakz | 3:5b17e4656dd0 | 146 | * UDP checksums on or off |
hudakz | 3:5b17e4656dd0 | 147 | * |
hudakz | 3:5b17e4656dd0 | 148 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 149 | */ |
hudakz | 8:4acb22344932 | 150 | #define UIP_CONF_UDP_CHECKSUMS 1 |
hudakz | 3:5b17e4656dd0 | 151 | |
hudakz | 3:5b17e4656dd0 | 152 | /** |
hudakz | 3:5b17e4656dd0 | 153 | * UDP Broadcast (receive) on or off |
hudakz | 3:5b17e4656dd0 | 154 | * (see uipethernet-conf.h) |
hudakz | 3:5b17e4656dd0 | 155 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 156 | * #define UIP_CONF_BROADCAST 1 |
hudakz | 3:5b17e4656dd0 | 157 | */ |
hudakz | 3:5b17e4656dd0 | 158 | |
hudakz | 3:5b17e4656dd0 | 159 | /** |
hudakz | 8:4acb22344932 | 160 | * UIP statistics on or off |
hudakz | 3:5b17e4656dd0 | 161 | * |
hudakz | 3:5b17e4656dd0 | 162 | * \hideinitializer |
hudakz | 3:5b17e4656dd0 | 163 | */ |
hudakz | 8:4acb22344932 | 164 | #define UIP_CONF_STATISTICS 0 |
hudakz | 3:5b17e4656dd0 | 165 | //#define UIP_CONF_LLH_LEN 0 |
hudakz | 4:d774541a34da | 166 | typedef void* uip_tcp_appstate_t; |
hudakz | 4:d774541a34da | 167 | void uipclient_appcall(void); |
hudakz | 8:4acb22344932 | 168 | #define UIP_APPCALL uipclient_appcall |
hudakz | 4:d774541a34da | 169 | typedef void* uip_udp_appstate_t; |
hudakz | 4:d774541a34da | 170 | void uipudp_appcall(void); |
hudakz | 8:4acb22344932 | 171 | #define UIP_UDP_APPCALL uipudp_appcall |
hudakz | 8:4acb22344932 | 172 | #define CC_REGISTER_ARG register |
hudakz | 8:4acb22344932 | 173 | #define UIP_ARCH_CHKSUM 1 |
hudakz | 3:5b17e4656dd0 | 174 | #endif /* __UIP_CONF_H__ */ |