]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/Common/ethernet/FreeTCPIP/net/uipopt.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / Common / ethernet / FreeTCPIP / net / uipopt.h
1 /**\r
2  * \addtogroup uip\r
3  * @{\r
4  */\r
5 \r
6 /**\r
7  * \defgroup uipopt Configuration options for uIP\r
8  * @{\r
9  *\r
10  * uIP is configured using the per-project configuration file\r
11  * "uipopt.h". This file contains all compile-time options for uIP and\r
12  * should be tweaked to match each specific project. The uIP\r
13  * distribution contains a documented example "uipopt.h" that can be\r
14  * copied and modified for each project.\r
15  *\r
16  * \note Contiki does not use the uipopt.h file to configure uIP, but\r
17  * uses a per-port uip-conf.h file that should be edited instead.\r
18  */\r
19 \r
20 /**\r
21  * \file\r
22  * Configuration options for uIP.\r
23  * \author Adam Dunkels <adam@dunkels.com>\r
24  *\r
25  * This file is used for tweaking various configuration options for\r
26  * uIP. You should make a copy of this file into one of your project's\r
27  * directories instead of editing this example "uipopt.h" file that\r
28  * comes with the uIP distribution.\r
29  */\r
30 \r
31 /*\r
32  * Copyright (c) 2001-2003, Adam Dunkels.\r
33  * All rights reserved.\r
34  *\r
35  * Redistribution and use in source and binary forms, with or without\r
36  * modification, are permitted provided that the following conditions\r
37  * are met:\r
38  * 1. Redistributions of source code must retain the above copyright\r
39  *    notice, this list of conditions and the following disclaimer.\r
40  * 2. Redistributions in binary form must reproduce the above copyright\r
41  *    notice, this list of conditions and the following disclaimer in the\r
42  *    documentation and/or other materials provided with the distribution.\r
43  * 3. The name of the author may not be used to endorse or promote\r
44  *    products derived from this software without specific prior\r
45  *    written permission.\r
46  *\r
47  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
48  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
49  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
50  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\r
51  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
52  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r
53  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
55  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
56  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
57  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
58  *\r
59  * This file is part of the uIP TCP/IP stack.\r
60  *\r
61  * $Id: uipopt.h,v 1.11 2009/04/10 00:37:48 adamdunkels Exp $\r
62  *\r
63  */\r
64 #ifndef __UIPOPT_H__\r
65 #define __UIPOPT_H__\r
66 \r
67 #ifndef UIP_LITTLE_ENDIAN\r
68 #define UIP_LITTLE_ENDIAN       3412\r
69 #endif /* UIP_LITTLE_ENDIAN */\r
70 #ifndef UIP_BIG_ENDIAN\r
71 #define UIP_BIG_ENDIAN  1234\r
72 #endif /* UIP_BIG_ENDIAN */\r
73 \r
74 #include "uip-conf.h"\r
75 //_RB_#include "contiki-conf.h"\r
76 \r
77 /*------------------------------------------------------------------------------*/\r
78 \r
79 /**\r
80  * \defgroup uipoptstaticconf Static configuration options\r
81  * @{\r
82  *\r
83  * These configuration options can be used for setting the IP address\r
84  * settings statically, but only if UIP_FIXEDADDR is set to 1. The\r
85  * configuration options for a specific node includes IP address,\r
86  * netmask and default router as well as the Ethernet address. The\r
87  * netmask, default router and Ethernet address are applicable only\r
88  * if uIP should be run over Ethernet.\r
89  *\r
90  * This options are meaningful only for the IPv4 code.\r
91  *\r
92  * All of these should be changed to suit your project.\r
93  */\r
94 \r
95 /**\r
96  * Determines if uIP should use a fixed IP address or not.\r
97  *\r
98  * If uIP should use a fixed IP address, the settings are set in the\r
99  * uipopt.h file. If not, the macros uip_sethostaddr(),\r
100  * uip_setdraddr() and uip_setnetmask() should be used instead.\r
101  *\r
102  * \hideinitializer\r
103  */\r
104 #ifdef UIP_CONF_FIXEDADDR\r
105 #define UIP_FIXED_ADDR UIP_CONF_FIXEDADDR\r
106 #define UIP_FIXEDADDR   1\r
107 #endif\r
108 \r
109 /**\r
110  * Ping IP address assignment.\r
111  *\r
112  * uIP uses a "ping" packets for setting its own IP address if this\r
113  * option is set. If so, uIP will start with an empty IP address and\r
114  * the destination IP address of the first incoming "ping" (ICMP echo)\r
115  * packet will be used for setting the hosts IP address.\r
116  *\r
117  * \note This works only if UIP_FIXEDADDR is 0.\r
118  *\r
119  * \hideinitializer\r
120  */\r
121 #ifdef UIP_CONF_PINGADDRCONF\r
122 #define UIP_PINGADDRCONF        UIP_CONF_PINGADDRCONF\r
123 #else /* UIP_CONF_PINGADDRCONF */\r
124 #define UIP_PINGADDRCONF        0\r
125 #endif /* UIP_CONF_PINGADDRCONF */\r
126 \r
127 /**\r
128  * Specifies if the uIP ARP module should be compiled with a fixed\r
129  * Ethernet MAC address or not.\r
130  *\r
131  * If this configuration option is 0, the macro uip_setethaddr() can\r
132  * be used to specify the Ethernet address at run-time.\r
133  *\r
134  * \hideinitializer\r
135  */\r
136 #define UIP_FIXEDETHADDR        0\r
137 \r
138 /** @} */\r
139 \r
140 /*------------------------------------------------------------------------------*/\r
141 \r
142 /**\r
143  * \defgroup uipoptip IP configuration options\r
144  * @{\r
145  *\r
146  */\r
147 \r
148 /**\r
149  * The IP TTL (time to live) of IP packets sent by uIP.\r
150  *\r
151  * This should normally not be changed.\r
152  */\r
153 #define UIP_TTL 64\r
154 \r
155 /**\r
156  * The maximum time an IP fragment should wait in the reassembly\r
157  * buffer before it is dropped.\r
158  *\r
159  */\r
160 #define UIP_REASS_MAXAGE        60      /*60s*/\r
161 \r
162 /**\r
163  * Turn on support for IP packet reassembly.\r
164  *\r
165  * uIP supports reassembly of fragmented IP packets. This features\r
166  * requires an additional amount of RAM to hold the reassembly buffer\r
167  * and the reassembly code size is approximately 700 bytes.  The\r
168  * reassembly buffer is of the same size as the uip_buf buffer\r
169  * (configured by UIP_BUFSIZE).\r
170  *\r
171  * \note IP packet reassembly is not heavily tested.\r
172  *\r
173  * \hideinitializer\r
174  */\r
175 #ifdef UIP_CONF_REASSEMBLY\r
176 #define UIP_REASSEMBLY  UIP_CONF_REASSEMBLY\r
177 #else /* UIP_CONF_REASSEMBLY */\r
178 #define UIP_REASSEMBLY  0\r
179 #endif /* UIP_CONF_REASSEMBLY */\r
180 \r
181 /** @} */\r
182 \r
183 /*------------------------------------------------------------------------------*/\r
184 \r
185 /**\r
186  * \defgroup uipoptipv6 IPv6 configuration options\r
187  * @{\r
188  *\r
189  */\r
190 \r
191 /** The maximum transmission unit at the IP Layer*/\r
192 #define UIP_LINK_MTU    1280\r
193 \r
194 #ifndef UIP_CONF_IPV6\r
195 \r
196 /** Do we use IPv6 or not (default: no) */\r
197 #define UIP_CONF_IPV6   0\r
198 #endif\r
199 #ifndef UIP_CONF_IPV6_QUEUE_PKT\r
200 \r
201 /** Do we do per %neighbor queuing during address resolution (default: no) */\r
202 #define UIP_CONF_IPV6_QUEUE_PKT 0\r
203 #endif\r
204 #ifndef UIP_CONF_IPV6_CHECKS\r
205 \r
206 /** Do we do IPv6 consistency checks (highly recommended, default: yes) */\r
207 #define UIP_CONF_IPV6_CHECKS    1\r
208 #endif\r
209 #ifndef UIP_CONF_IPV6_REASSEMBLY\r
210 \r
211 /** Do we do IPv6 fragmentation (default: no) */\r
212 #define UIP_CONF_IPV6_REASSEMBLY        0\r
213 #endif\r
214 #ifndef UIP_CONF_NETIF_MAX_ADDRESSES\r
215 \r
216 /** Default number of IPv6 addresses associated to the node's interface */\r
217 #define UIP_CONF_NETIF_MAX_ADDRESSES    3\r
218 #endif\r
219 #ifndef UIP_CONF_ND6_MAX_PREFIXES\r
220 \r
221 /** Default number of IPv6 prefixes associated to the node's interface */\r
222 #define UIP_CONF_ND6_MAX_PREFIXES       3\r
223 #endif\r
224 #ifndef UIP_CONF_ND6_MAX_NEIGHBORS\r
225 \r
226 /** Default number of neighbors that can be stored in the %neighbor cache */\r
227 #define UIP_CONF_ND6_MAX_NEIGHBORS      4\r
228 #endif\r
229 #ifndef UIP_CONF_ND6_MAX_DEFROUTERS\r
230 \r
231 /** Minimum number of default routers */\r
232 #define UIP_CONF_ND6_MAX_DEFROUTERS 2\r
233 #endif\r
234 \r
235 /** @} */\r
236 \r
237 /*------------------------------------------------------------------------------*/\r
238 \r
239 /**\r
240  * \defgroup uipoptudp UDP configuration options\r
241  * @{\r
242  *\r
243  * \note The UDP support in uIP is still not entirely complete; there\r
244  * is no support for sending or receiving broadcast or multicast\r
245  * packets, but it works well enough to support a number of vital\r
246  * applications such as DNS queries, though\r
247  */\r
248 \r
249 /**\r
250  * Toggles whether UDP support should be compiled in or not.\r
251  *\r
252  * \hideinitializer\r
253  */\r
254 #ifdef UIP_CONF_UDP\r
255 #define UIP_UDP UIP_CONF_UDP\r
256 #else /* UIP_CONF_UDP */\r
257 #define UIP_UDP 0\r
258 #endif /* UIP_CONF_UDP */\r
259 \r
260 /**\r
261  * Toggles if UDP checksums should be used or not.\r
262  *\r
263  * \note Support for UDP checksums is currently not included in uIP,\r
264  * so this option has no function.\r
265  *\r
266  * \hideinitializer\r
267  */\r
268 #ifdef UIP_CONF_UDP_CHECKSUMS\r
269 #define UIP_UDP_CHECKSUMS       UIP_CONF_UDP_CHECKSUMS\r
270 #else\r
271 #define UIP_UDP_CHECKSUMS       0\r
272 #endif\r
273 \r
274 /**\r
275  * The maximum amount of concurrent UDP connections.\r
276  *\r
277  * \hideinitializer\r
278  */\r
279 #ifdef UIP_CONF_UDP_CONNS\r
280 #define UIP_UDP_CONNS   UIP_CONF_UDP_CONNS\r
281 #else /* UIP_CONF_UDP_CONNS */\r
282 #define UIP_UDP_CONNS   10\r
283 #endif /* UIP_CONF_UDP_CONNS */\r
284 \r
285 /**\r
286  * The name of the function that should be called when UDP datagrams arrive.\r
287  *\r
288  * \hideinitializer\r
289  */\r
290 \r
291 /** @} */\r
292 \r
293 /*------------------------------------------------------------------------------*/\r
294 \r
295 /**\r
296  * \defgroup uipopttcp TCP configuration options\r
297  * @{\r
298  */\r
299 \r
300 /**\r
301  * Toggles whether UDP support should be compiled in or not.\r
302  *\r
303  * \hideinitializer\r
304  */\r
305 #ifdef UIP_CONF_TCP\r
306 #define UIP_TCP UIP_CONF_TCP\r
307 #else /* UIP_CONF_UDP */\r
308 #define UIP_TCP 1\r
309 #endif /* UIP_CONF_UDP */\r
310 \r
311 /**\r
312  * Determines if support for opening connections from uIP should be\r
313  * compiled in.\r
314  *\r
315  * If the applications that are running on top of uIP for this project\r
316  * do not need to open outgoing TCP connections, this configuration\r
317  * option can be turned off to reduce the code size of uIP.\r
318  *\r
319  * \hideinitializer\r
320  */\r
321 #ifndef UIP_CONF_ACTIVE_OPEN\r
322 #define UIP_ACTIVE_OPEN 1\r
323 #else /* UIP_CONF_ACTIVE_OPEN */\r
324 #define UIP_ACTIVE_OPEN UIP_CONF_ACTIVE_OPEN\r
325 #endif /* UIP_CONF_ACTIVE_OPEN */\r
326 \r
327 /**\r
328  * The maximum number of simultaneously open TCP connections.\r
329  *\r
330  * Since the TCP connections are statically allocated, turning this\r
331  * configuration knob down results in less RAM used. Each TCP\r
332  * connection requires approximately 30 bytes of memory.\r
333  *\r
334  * \hideinitializer\r
335  */\r
336 #ifndef UIP_CONF_MAX_CONNECTIONS\r
337 #define UIP_CONNS       10\r
338 #else /* UIP_CONF_MAX_CONNECTIONS */\r
339 #define UIP_CONNS       UIP_CONF_MAX_CONNECTIONS\r
340 #endif /* UIP_CONF_MAX_CONNECTIONS */\r
341 \r
342 /**\r
343  * The maximum number of simultaneously listening TCP ports.\r
344  *\r
345  * Each listening TCP port requires 2 bytes of memory.\r
346  *\r
347  * \hideinitializer\r
348  */\r
349 #ifndef UIP_CONF_MAX_LISTENPORTS\r
350 #define UIP_LISTENPORTS 20\r
351 #else /* UIP_CONF_MAX_LISTENPORTS */\r
352 #define UIP_LISTENPORTS UIP_CONF_MAX_LISTENPORTS\r
353 #endif /* UIP_CONF_MAX_LISTENPORTS */\r
354 \r
355 /**\r
356  * Determines if support for TCP urgent data notification should be\r
357  * compiled in.\r
358  *\r
359  * Urgent data (out-of-band data) is a rarely used TCP feature that\r
360  * very seldom would be required.\r
361  *\r
362  * \hideinitializer\r
363  */\r
364 #define UIP_URGDATA 0\r
365 \r
366 /**\r
367  * The initial retransmission timeout counted in timer pulses.\r
368  *\r
369  * This should not be changed.\r
370  */\r
371 #define UIP_RTO 3\r
372 \r
373 /**\r
374  * The maximum number of times a segment should be retransmitted\r
375  * before the connection should be aborted.\r
376  *\r
377  * This should not be changed.\r
378  */\r
379 #define UIP_MAXRTX      8\r
380 \r
381 /**\r
382  * The maximum number of times a SYN segment should be retransmitted\r
383  * before a connection request should be deemed to have been\r
384  * unsuccessful.\r
385  *\r
386  * This should not need to be changed.\r
387  */\r
388 #define UIP_MAXSYNRTX   5\r
389 \r
390 /**\r
391  * The TCP maximum segment size.\r
392  *\r
393  * This is should not be to set to more than\r
394  * UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN.\r
395  */\r
396 #ifdef UIP_CONF_TCP_MSS\r
397 #define UIP_TCP_MSS UIP_CONF_TCP_MSS\r
398 #else\r
399 #define UIP_TCP_MSS ( UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN )\r
400 #endif\r
401 \r
402 /**\r
403  * The size of the advertised receiver's window.\r
404  *\r
405  * Should be set low (i.e., to the size of the uip_buf buffer) if the\r
406  * application is slow to process incoming data, or high (32768 bytes)\r
407  * if the application processes data quickly.\r
408  *\r
409  * \hideinitializer\r
410  */\r
411 #ifndef UIP_CONF_RECEIVE_WINDOW\r
412 #define UIP_RECEIVE_WINDOW      UIP_TCP_MSS\r
413 #else\r
414 #define UIP_RECEIVE_WINDOW      UIP_CONF_RECEIVE_WINDOW\r
415 #endif\r
416 \r
417 /**\r
418  * How long a connection should stay in the TIME_WAIT state.\r
419  *\r
420  * This configuration option has no real implication, and it should be\r
421  * left untouched.\r
422  */\r
423 #define UIP_TIME_WAIT_TIMEOUT   120\r
424 \r
425 /** @} */\r
426 \r
427 /*------------------------------------------------------------------------------*/\r
428 \r
429 /**\r
430  * \defgroup uipoptarp ARP configuration options\r
431  * @{\r
432  */\r
433 \r
434 /**\r
435  * The size of the ARP table.\r
436  *\r
437  * This option should be set to a larger value if this uIP node will\r
438  * have many connections from the local network.\r
439  *\r
440  * \hideinitializer\r
441  */\r
442 #ifdef UIP_CONF_ARPTAB_SIZE\r
443 #define UIP_ARPTAB_SIZE UIP_CONF_ARPTAB_SIZE\r
444 #else\r
445 #define UIP_ARPTAB_SIZE 8\r
446 #endif\r
447 \r
448 /**\r
449  * The maximum age of ARP table entries measured in 10ths of seconds.\r
450  *\r
451  * An UIP_ARP_MAXAGE of 120 corresponds to 20 minutes (BSD\r
452  * default).\r
453  */\r
454 #define UIP_ARP_MAXAGE  120\r
455 \r
456 /** @} */\r
457 \r
458 /*------------------------------------------------------------------------------*/\r
459 \r
460 /**\r
461  * \defgroup uipoptmac layer 2 options (for ipv6)\r
462  * @{\r
463  */\r
464 #define UIP_DEFAULT_PREFIX_LEN  64\r
465 \r
466 /** @} */\r
467 \r
468 /*------------------------------------------------------------------------------*/\r
469 \r
470 /**\r
471  * \defgroup uipoptsics 6lowpan options (for ipv6)\r
472  * @{\r
473  */\r
474 \r
475 /**\r
476  * Timeout for packet reassembly at the 6lowpan layer\r
477  * (should be < 60s)\r
478  */\r
479 #ifdef SICSLOWPAN_CONF_MAXAGE\r
480 #define SICSLOWPAN_REASS_MAXAGE SICSLOWPAN_CONF_MAXAGE\r
481 #else\r
482 #define SICSLOWPAN_REASS_MAXAGE 20\r
483 #endif\r
484 \r
485 /**\r
486  * Do we compress the IP header or not (default: no)\r
487  */\r
488 #ifndef SICSLOWPAN_CONF_COMPRESSION\r
489 #define SICSLOWPAN_CONF_COMPRESSION 0\r
490 #endif\r
491 \r
492 /**\r
493  * If we use IPHC compression, how many address contexts do we support\r
494  */\r
495 #ifndef SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS\r
496 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS       1\r
497 #endif\r
498 \r
499 /**\r
500  * Do we support 6lowpan fragmentation\r
501  */\r
502 #ifndef SICSLOWPAN_CONF_FRAG\r
503 #define SICSLOWPAN_CONF_FRAG    0\r
504 #endif\r
505 \r
506 /** @} */\r
507 \r
508 /*------------------------------------------------------------------------------*/\r
509 \r
510 /**\r
511  * \defgroup uipoptgeneral General configuration options\r
512  * @{\r
513  */\r
514 \r
515 /**\r
516  * The size of the uIP packet buffer.\r
517  *\r
518  * The uIP packet buffer should not be smaller than 60 bytes, and does\r
519  * not need to be larger than 1514 bytes. Lower size results in lower\r
520  * TCP throughput, larger size results in higher TCP throughput.\r
521  *\r
522  * \hideinitializer\r
523  */\r
524 #ifndef UIP_CONF_BUFFER_SIZE\r
525 #define UIP_BUFSIZE UIP_LINK_MTU + UIP_LLH_LEN\r
526 #else /* UIP_CONF_BUFFER_SIZE */\r
527 #define UIP_BUFSIZE UIP_CONF_BUFFER_SIZE\r
528 #endif /* UIP_CONF_BUFFER_SIZE */\r
529 \r
530 /**\r
531  * Determines if statistics support should be compiled in.\r
532  *\r
533  * The statistics is useful for debugging and to show the user.\r
534  *\r
535  * \hideinitializer\r
536  */\r
537 #ifndef UIP_CONF_STATISTICS\r
538 #define UIP_STATISTICS  0\r
539 #else /* UIP_CONF_STATISTICS */\r
540 #define UIP_STATISTICS  UIP_CONF_STATISTICS\r
541 #endif /* UIP_CONF_STATISTICS */\r
542 \r
543 /**\r
544  * Determines if logging of certain events should be compiled in.\r
545  *\r
546  * This is useful mostly for debugging. The function uip_log()\r
547  * must be implemented to suit the architecture of the project, if\r
548  * logging is turned on.\r
549  *\r
550  * \hideinitializer\r
551  */\r
552 #ifndef UIP_CONF_LOGGING\r
553 #define UIP_LOGGING 0\r
554 #else /* UIP_CONF_LOGGING */\r
555 #define UIP_LOGGING UIP_CONF_LOGGING\r
556 #endif /* UIP_CONF_LOGGING */\r
557 \r
558 /**\r
559  * Broadcast support.\r
560  *\r
561  * This flag configures IP broadcast support. This is useful only\r
562  * together with UDP.\r
563  *\r
564  * \hideinitializer\r
565  *\r
566  */\r
567 #ifndef UIP_CONF_BROADCAST\r
568 #define UIP_BROADCAST   0\r
569 #else /* UIP_CONF_BROADCAST */\r
570 #define UIP_BROADCAST   UIP_CONF_BROADCAST\r
571 #endif /* UIP_CONF_BROADCAST */\r
572 \r
573 /**\r
574  * Print out a uIP log message.\r
575  *\r
576  * This function must be implemented by the module that uses uIP, and\r
577  * is called by uIP whenever a log message is generated.\r
578  */\r
579 void    uip_log( char *msg );\r
580 \r
581 /**\r
582  * The link level header length.\r
583  *\r
584  * This is the offset into the uip_buf where the IP header can be\r
585  * found. For Ethernet, this should be set to 14. For SLIP, this\r
586  * should be set to 0.\r
587  *\r
588  * \note we probably won't use this constant for other link layers than\r
589  * ethernet as they have variable header length (this is due to variable\r
590  * number and type of address fields and to optional security features)\r
591  * E.g.: 802.15.4 -> 2 + (1/2*4/8) + 0/5/6/10/14\r
592  *       802.11 -> 4 + (6*3/4) + 2\r
593  * \hideinitializer\r
594  */\r
595 #ifdef UIP_CONF_LLH_LEN\r
596 #define UIP_LLH_LEN UIP_CONF_LLH_LEN\r
597 #else /* UIP_LLH_LEN */\r
598 #define UIP_LLH_LEN 14\r
599 #endif /* UIP_CONF_LLH_LEN */\r
600 \r
601 /** @} */\r
602 \r
603 /*------------------------------------------------------------------------------*/\r
604 \r
605 /**\r
606  * \defgroup uipoptcpu CPU architecture configuration\r
607  * @{\r
608  *\r
609  * The CPU architecture configuration is where the endianess of the\r
610  * CPU on which uIP is to be run is specified. Most CPUs today are\r
611  * little endian, and the most notable exception are the Motorolas\r
612  * which are big endian. The BYTE_ORDER macro should be changed to\r
613  * reflect the CPU architecture on which uIP is to be run.\r
614  */\r
615 \r
616 /**\r
617  * The byte order of the CPU architecture on which uIP is to be run.\r
618  *\r
619  * This option can be either UIP_BIG_ENDIAN (Motorola byte order) or\r
620  * UIP_LITTLE_ENDIAN (Intel byte order).\r
621  *\r
622  * \hideinitializer\r
623  */\r
624 #ifdef UIP_CONF_BYTE_ORDER\r
625 #define UIP_BYTE_ORDER  UIP_CONF_BYTE_ORDER\r
626 #else /* UIP_CONF_BYTE_ORDER */\r
627 #define UIP_BYTE_ORDER  UIP_LITTLE_ENDIAN\r
628 #endif /* UIP_CONF_BYTE_ORDER */\r
629 \r
630 /** @} */\r
631 \r
632 /*------------------------------------------------------------------------------*/\r
633 \r
634 /**\r
635  * \defgroup uipoptapp Application specific configurations\r
636  * @{\r
637  *\r
638  * An uIP application is implemented using a single application\r
639  * function that is called by uIP whenever a TCP/IP event occurs. The\r
640  * name of this function must be registered with uIP at compile time\r
641  * using the UIP_APPCALL definition.\r
642  *\r
643  * uIP applications can store the application state within the\r
644  * uip_conn structure by specifying the type of the application\r
645  * structure by typedef:ing the type uip_tcp_appstate_t and uip_udp_appstate_t.\r
646  *\r
647  * The file containing the definitions must be included in the\r
648  * uipopt.h file.\r
649  *\r
650  * The following example illustrates how this can look.\r
651  \code\r
652 \r
653  void httpd_appcall(void);\r
654  #define UIP_APPCALL     httpd_appcall\r
655 \r
656  struct httpd_state {\r
657  u8_t state;\r
658  u16_t count;\r
659  char *dataptr;\r
660  char *script;\r
661  };\r
662  typedef struct httpd_state uip_tcp_appstate_t\r
663  \endcode\r
664 */\r
665 \r
666 /**\r
667  * \var #define UIP_APPCALL\r
668  *\r
669  * The name of the application function that uIP should call in\r
670  * response to TCP/IP events.\r
671  *\r
672  */\r
673 \r
674 /**\r
675  * \var typedef uip_tcp_appstate_t\r
676  *\r
677  * The type of the application state that is to be stored in the\r
678  * uip_conn structure. This usually is typedef:ed to a struct holding\r
679  * application state information.\r
680  */\r
681 \r
682 /**\r
683  * \var typedef uip_udp_appstate_t\r
684  *\r
685  * The type of the application state that is to be stored in the\r
686  * uip_conn structure. This usually is typedef:ed to a struct holding\r
687  * application state information.\r
688  */\r
689 \r
690 /** @} */\r
691 #endif /* __UIPOPT_H__ */\r
692 \r
693 /** @} */\r
694 \r
695 /** @} */\r