John Lowe
/
WebSockets2
Embedded WebSockets Experiment
Core/lwIP/include/ipv4/lwip/inet_chksum.h@0:6dee052a3fa4, 2011-07-26 (annotated)
- Committer:
- nandgate
- Date:
- Tue Jul 26 05:30:53 2011 +0000
- Revision:
- 0:6dee052a3fa4
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nandgate | 0:6dee052a3fa4 | 1 | /* |
nandgate | 0:6dee052a3fa4 | 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. |
nandgate | 0:6dee052a3fa4 | 3 | * All rights reserved. |
nandgate | 0:6dee052a3fa4 | 4 | * |
nandgate | 0:6dee052a3fa4 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
nandgate | 0:6dee052a3fa4 | 6 | * are permitted provided that the following conditions are met: |
nandgate | 0:6dee052a3fa4 | 7 | * |
nandgate | 0:6dee052a3fa4 | 8 | * 1. Redistributions of source code must retain the above copyright notice, |
nandgate | 0:6dee052a3fa4 | 9 | * this list of conditions and the following disclaimer. |
nandgate | 0:6dee052a3fa4 | 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
nandgate | 0:6dee052a3fa4 | 11 | * this list of conditions and the following disclaimer in the documentation |
nandgate | 0:6dee052a3fa4 | 12 | * and/or other materials provided with the distribution. |
nandgate | 0:6dee052a3fa4 | 13 | * 3. The name of the author may not be used to endorse or promote products |
nandgate | 0:6dee052a3fa4 | 14 | * derived from this software without specific prior written permission. |
nandgate | 0:6dee052a3fa4 | 15 | * |
nandgate | 0:6dee052a3fa4 | 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
nandgate | 0:6dee052a3fa4 | 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
nandgate | 0:6dee052a3fa4 | 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
nandgate | 0:6dee052a3fa4 | 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
nandgate | 0:6dee052a3fa4 | 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
nandgate | 0:6dee052a3fa4 | 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
nandgate | 0:6dee052a3fa4 | 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
nandgate | 0:6dee052a3fa4 | 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
nandgate | 0:6dee052a3fa4 | 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
nandgate | 0:6dee052a3fa4 | 25 | * OF SUCH DAMAGE. |
nandgate | 0:6dee052a3fa4 | 26 | * |
nandgate | 0:6dee052a3fa4 | 27 | * This file is part of the lwIP TCP/IP stack. |
nandgate | 0:6dee052a3fa4 | 28 | * |
nandgate | 0:6dee052a3fa4 | 29 | * Author: Adam Dunkels <adam@sics.se> |
nandgate | 0:6dee052a3fa4 | 30 | * |
nandgate | 0:6dee052a3fa4 | 31 | */ |
nandgate | 0:6dee052a3fa4 | 32 | #ifndef __LWIP_INET_CHKSUM_H__ |
nandgate | 0:6dee052a3fa4 | 33 | #define __LWIP_INET_CHKSUM_H__ |
nandgate | 0:6dee052a3fa4 | 34 | |
nandgate | 0:6dee052a3fa4 | 35 | #include "lwip/opt.h" |
nandgate | 0:6dee052a3fa4 | 36 | |
nandgate | 0:6dee052a3fa4 | 37 | #include "lwip/pbuf.h" |
nandgate | 0:6dee052a3fa4 | 38 | #include "lwip/ip_addr.h" |
nandgate | 0:6dee052a3fa4 | 39 | |
nandgate | 0:6dee052a3fa4 | 40 | #ifdef __cplusplus |
nandgate | 0:6dee052a3fa4 | 41 | extern "C" { |
nandgate | 0:6dee052a3fa4 | 42 | #endif |
nandgate | 0:6dee052a3fa4 | 43 | |
nandgate | 0:6dee052a3fa4 | 44 | u16_t inet_chksum(void *dataptr, u16_t len); |
nandgate | 0:6dee052a3fa4 | 45 | u16_t inet_chksum_pbuf(struct pbuf *p); |
nandgate | 0:6dee052a3fa4 | 46 | u16_t inet_chksum_pseudo(struct pbuf *p, |
nandgate | 0:6dee052a3fa4 | 47 | struct ip_addr *src, struct ip_addr *dest, |
nandgate | 0:6dee052a3fa4 | 48 | u8_t proto, u16_t proto_len); |
nandgate | 0:6dee052a3fa4 | 49 | #if LWIP_UDPLITE |
nandgate | 0:6dee052a3fa4 | 50 | u16_t inet_chksum_pseudo_partial(struct pbuf *p, |
nandgate | 0:6dee052a3fa4 | 51 | struct ip_addr *src, struct ip_addr *dest, |
nandgate | 0:6dee052a3fa4 | 52 | u8_t proto, u16_t proto_len, u16_t chksum_len); |
nandgate | 0:6dee052a3fa4 | 53 | #endif |
nandgate | 0:6dee052a3fa4 | 54 | |
nandgate | 0:6dee052a3fa4 | 55 | #ifdef __cplusplus |
nandgate | 0:6dee052a3fa4 | 56 | } |
nandgate | 0:6dee052a3fa4 | 57 | #endif |
nandgate | 0:6dee052a3fa4 | 58 | |
nandgate | 0:6dee052a3fa4 | 59 | #endif /* __LWIP_INET_H__ */ |
nandgate | 0:6dee052a3fa4 | 60 |