mbed Phone Platform

Dependencies:   ulaw mbed ConfigFile

Committer:
okini3939
Date:
Sun Dec 26 15:49:07 2010 +0000
Revision:
1:0f82c574096f

        

Who changed what in which revision?

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