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