Version of http://mbed.org/cookbook/NetServicesTribute with setting set the same for LPC2368
Dependents: UDPSocketExample 24LCxx_I2CApp WeatherPlatform_pachube HvZServerLib ... more
lwip/include/ipv4/lwip/ip_frag.h@0:350011bf8be7, 2010-11-23 (annotated)
- Committer:
- simon
- Date:
- Tue Nov 23 14:15:36 2010 +0000
- Revision:
- 0:350011bf8be7
Experimental version for testing UDP
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:350011bf8be7 | 1 | /* |
simon | 0:350011bf8be7 | 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. |
simon | 0:350011bf8be7 | 3 | * All rights reserved. |
simon | 0:350011bf8be7 | 4 | * |
simon | 0:350011bf8be7 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
simon | 0:350011bf8be7 | 6 | * are permitted provided that the following conditions are met: |
simon | 0:350011bf8be7 | 7 | * |
simon | 0:350011bf8be7 | 8 | * 1. Redistributions of source code must retain the above copyright notice, |
simon | 0:350011bf8be7 | 9 | * this list of conditions and the following disclaimer. |
simon | 0:350011bf8be7 | 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
simon | 0:350011bf8be7 | 11 | * this list of conditions and the following disclaimer in the documentation |
simon | 0:350011bf8be7 | 12 | * and/or other materials provided with the distribution. |
simon | 0:350011bf8be7 | 13 | * 3. The name of the author may not be used to endorse or promote products |
simon | 0:350011bf8be7 | 14 | * derived from this software without specific prior written permission. |
simon | 0:350011bf8be7 | 15 | * |
simon | 0:350011bf8be7 | 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
simon | 0:350011bf8be7 | 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
simon | 0:350011bf8be7 | 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
simon | 0:350011bf8be7 | 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
simon | 0:350011bf8be7 | 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
simon | 0:350011bf8be7 | 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
simon | 0:350011bf8be7 | 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
simon | 0:350011bf8be7 | 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
simon | 0:350011bf8be7 | 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
simon | 0:350011bf8be7 | 25 | * OF SUCH DAMAGE. |
simon | 0:350011bf8be7 | 26 | * |
simon | 0:350011bf8be7 | 27 | * This file is part of the lwIP TCP/IP stack. |
simon | 0:350011bf8be7 | 28 | * |
simon | 0:350011bf8be7 | 29 | * Author: Jani Monoses <jani@iv.ro> |
simon | 0:350011bf8be7 | 30 | * |
simon | 0:350011bf8be7 | 31 | */ |
simon | 0:350011bf8be7 | 32 | |
simon | 0:350011bf8be7 | 33 | #ifndef __LWIP_IP_FRAG_H__ |
simon | 0:350011bf8be7 | 34 | #define __LWIP_IP_FRAG_H__ |
simon | 0:350011bf8be7 | 35 | |
simon | 0:350011bf8be7 | 36 | #include "lwip/opt.h" |
simon | 0:350011bf8be7 | 37 | #include "lwip/err.h" |
simon | 0:350011bf8be7 | 38 | #include "lwip/pbuf.h" |
simon | 0:350011bf8be7 | 39 | #include "lwip/netif.h" |
simon | 0:350011bf8be7 | 40 | #include "lwip/ip_addr.h" |
simon | 0:350011bf8be7 | 41 | #include "lwip/ip.h" |
simon | 0:350011bf8be7 | 42 | |
simon | 0:350011bf8be7 | 43 | #ifdef __cplusplus |
simon | 0:350011bf8be7 | 44 | extern "C" { |
simon | 0:350011bf8be7 | 45 | #endif |
simon | 0:350011bf8be7 | 46 | |
simon | 0:350011bf8be7 | 47 | #if IP_REASSEMBLY |
simon | 0:350011bf8be7 | 48 | /* The IP reassembly timer interval in milliseconds. */ |
simon | 0:350011bf8be7 | 49 | #define IP_TMR_INTERVAL 1000 |
simon | 0:350011bf8be7 | 50 | |
simon | 0:350011bf8be7 | 51 | /* IP reassembly helper struct. |
simon | 0:350011bf8be7 | 52 | * This is exported because memp needs to know the size. |
simon | 0:350011bf8be7 | 53 | */ |
simon | 0:350011bf8be7 | 54 | struct ip_reassdata { |
simon | 0:350011bf8be7 | 55 | struct ip_reassdata *next; |
simon | 0:350011bf8be7 | 56 | struct pbuf *p; |
simon | 0:350011bf8be7 | 57 | struct ip_hdr iphdr; |
simon | 0:350011bf8be7 | 58 | u16_t datagram_len; |
simon | 0:350011bf8be7 | 59 | u8_t flags; |
simon | 0:350011bf8be7 | 60 | u8_t timer; |
simon | 0:350011bf8be7 | 61 | }; |
simon | 0:350011bf8be7 | 62 | |
simon | 0:350011bf8be7 | 63 | void ip_reass_init(void); |
simon | 0:350011bf8be7 | 64 | void ip_reass_tmr(void); |
simon | 0:350011bf8be7 | 65 | struct pbuf * ip_reass(struct pbuf *p); |
simon | 0:350011bf8be7 | 66 | #endif /* IP_REASSEMBLY */ |
simon | 0:350011bf8be7 | 67 | |
simon | 0:350011bf8be7 | 68 | #if IP_FRAG |
simon | 0:350011bf8be7 | 69 | #if !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF |
simon | 0:350011bf8be7 | 70 | /** A custom pbuf that holds a reference to another pbuf, which is freed |
simon | 0:350011bf8be7 | 71 | * when this custom pbuf is freed. This is used to create a custom PBUF_REF |
simon | 0:350011bf8be7 | 72 | * that points into the original pbuf. */ |
simon | 0:350011bf8be7 | 73 | struct pbuf_custom_ref { |
simon | 0:350011bf8be7 | 74 | /** 'base class' */ |
simon | 0:350011bf8be7 | 75 | struct pbuf_custom pc; |
simon | 0:350011bf8be7 | 76 | /** pointer to the original pbuf that is referenced */ |
simon | 0:350011bf8be7 | 77 | struct pbuf *original; |
simon | 0:350011bf8be7 | 78 | }; |
simon | 0:350011bf8be7 | 79 | #endif /* !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF */ |
simon | 0:350011bf8be7 | 80 | |
simon | 0:350011bf8be7 | 81 | err_t ip_frag(struct pbuf *p, struct netif *netif, ip_addr_t *dest); |
simon | 0:350011bf8be7 | 82 | #endif /* IP_FRAG */ |
simon | 0:350011bf8be7 | 83 | |
simon | 0:350011bf8be7 | 84 | #ifdef __cplusplus |
simon | 0:350011bf8be7 | 85 | } |
simon | 0:350011bf8be7 | 86 | #endif |
simon | 0:350011bf8be7 | 87 | |
simon | 0:350011bf8be7 | 88 | #endif /* __LWIP_IP_FRAG_H__ */ |