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