adamdunkels | 4457a0d | 2003-08-05 14:37:59 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2003, 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. All advertising materials mentioning features or use of this |
| 15 | * software must display the following acknowledgement: |
| 16 | * This product includes software developed by Adam Dunkels. |
| 17 | * 4. The name of the author may not be used to endorse or promote |
| 18 | * products derived from this software without specific prior |
| 19 | * written permission. |
| 20 | * |
| 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS |
| 22 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 23 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 25 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
| 27 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 30 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 31 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | * |
| 33 | * This file is part of the Contiki Destop OS |
| 34 | * |
oliverschmidt | 027febe | 2006-05-17 15:55:29 +0000 | [diff] [blame] | 35 | * $Id: uip-conf.h,v 1.4 2006/05/17 15:55:29 oliverschmidt Exp $ |
adamdunkels | 4457a0d | 2003-08-05 14:37:59 +0000 | [diff] [blame] | 36 | * |
| 37 | */ |
| 38 | #ifndef __UIP_CONF_H__ |
| 39 | |
| 40 | #define UIP_CONF_MAX_CONNECTIONS 10 |
| 41 | #define UIP_CONF_MAX_LISTENPORTS 10 |
oliverschmidt | d9f3314 | 2005-02-17 22:45:02 +0000 | [diff] [blame] | 42 | #define UIP_CONF_BUFFER_SIZE 1024 - 2 |
oliverschmidt | 4dff710 | 2005-03-16 22:37:01 +0000 | [diff] [blame] | 43 | #define UIP_CONF_RECEIVE_WINDOW UIP_TCP_MSS |
oliverschmidt | 027febe | 2006-05-17 15:55:29 +0000 | [diff] [blame] | 44 | #define UIP_CONF_BYTE_ORDER LITTLE_ENDIAN |
oliverschmidt | d9f3314 | 2005-02-17 22:45:02 +0000 | [diff] [blame] | 45 | #define UIP_CONF_EXTERNAL_BUFFER |
adamdunkels | 4457a0d | 2003-08-05 14:37:59 +0000 | [diff] [blame] | 46 | |
oliverschmidt | 027febe | 2006-05-17 15:55:29 +0000 | [diff] [blame] | 47 | #ifdef UIP_CODE |
| 48 | |
| 49 | #pragma codeseg("UIP"); |
| 50 | |
| 51 | #include "ek-conf.h" |
| 52 | |
| 53 | #undef EK_PROCESS_INIT |
| 54 | #define EK_PROCESS_INIT(name, arg) \ |
| 55 | void _tcpip_init(void *arg) |
| 56 | |
| 57 | #undef EK_EVENTHANDLER |
| 58 | #define EK_EVENTHANDLER(name, ev, data) \ |
| 59 | void _tcpip_eventhandler(ek_event_t ev, ek_data_t data) |
| 60 | |
| 61 | #undef EK_POLLHANDLER |
| 62 | #define EK_POLLHANDLER(name) \ |
| 63 | void _tcpip_pollhandler(void) |
| 64 | |
| 65 | #undef EK_PROCESS |
| 66 | #define EK_PROCESS(name, strname, prio, eventh, pollh, stateptr) \ |
| 67 | void tcpip_eventhandler(ek_event_t ev, ek_data_t data); \ |
| 68 | void tcpip_pollhandler(void); \ |
| 69 | static struct ek_proc name = {NULL, EK_ID_NONE, strname, prio, tcpip_eventhandler, tcpip_pollhandler, stateptr} |
| 70 | |
| 71 | #define htons _htons |
| 72 | #define uiplib_ipaddrconv _uiplib_ipaddrconv |
| 73 | #define tcp_markconn _tcp_markconn |
| 74 | #define tcp_listen _tcp_listen |
| 75 | #define tcp_unlisten _tcp_unlisten |
| 76 | #define tcp_connect _tcp_connect |
| 77 | #define udp_new _udp_new |
| 78 | #define tcpip_set_forwarding _tcpip_set_forwarding |
| 79 | #define tcpip_input _tcpip_input |
| 80 | #define tcpip_output _tcpip_output |
| 81 | #define tcpip_poll_tcp _tcpip_poll_tcp |
| 82 | #define tcpip_poll_udp _tcpip_poll_udp |
| 83 | |
| 84 | #define ek_post_synch _ek_post_synch |
| 85 | void _ek_post_synch(ek_id_t id, ek_event_t ev, ek_data_t data); |
| 86 | |
| 87 | #endif /* UIP_CODE */ |
adamdunkels | 4457a0d | 2003-08-05 14:37:59 +0000 | [diff] [blame] | 88 | |
| 89 | #endif /* __UIP_CONF_H__ */ |