Modified version of NetServices. Fixes an issue where connections failed should the HTTP response status line be received in a packet on its own prior to any further headers. Changes are made to the HTTPClient.cpp file's readHeaders method.
lwip/include/ipv4/lwip/igmp.h@0:ec559500a63f, 2011-04-08 (annotated)
- Committer:
- andrewbonney
- Date:
- Fri Apr 08 14:39:41 2011 +0000
- Revision:
- 0:ec559500a63f
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewbonney | 0:ec559500a63f | 1 | /* |
andrewbonney | 0:ec559500a63f | 2 | * Copyright (c) 2002 CITEL Technologies Ltd. |
andrewbonney | 0:ec559500a63f | 3 | * All rights reserved. |
andrewbonney | 0:ec559500a63f | 4 | * |
andrewbonney | 0:ec559500a63f | 5 | * Redistribution and use in source and binary forms, with or without |
andrewbonney | 0:ec559500a63f | 6 | * modification, are permitted provided that the following conditions |
andrewbonney | 0:ec559500a63f | 7 | * are met: |
andrewbonney | 0:ec559500a63f | 8 | * 1. Redistributions of source code must retain the above copyright |
andrewbonney | 0:ec559500a63f | 9 | * notice, this list of conditions and the following disclaimer. |
andrewbonney | 0:ec559500a63f | 10 | * 2. Redistributions in binary form must reproduce the above copyright |
andrewbonney | 0:ec559500a63f | 11 | * notice, this list of conditions and the following disclaimer in the |
andrewbonney | 0:ec559500a63f | 12 | * documentation and/or other materials provided with the distribution. |
andrewbonney | 0:ec559500a63f | 13 | * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors |
andrewbonney | 0:ec559500a63f | 14 | * may be used to endorse or promote products derived from this software |
andrewbonney | 0:ec559500a63f | 15 | * without specific prior written permission. |
andrewbonney | 0:ec559500a63f | 16 | * |
andrewbonney | 0:ec559500a63f | 17 | * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' |
andrewbonney | 0:ec559500a63f | 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
andrewbonney | 0:ec559500a63f | 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
andrewbonney | 0:ec559500a63f | 20 | * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE |
andrewbonney | 0:ec559500a63f | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
andrewbonney | 0:ec559500a63f | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
andrewbonney | 0:ec559500a63f | 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
andrewbonney | 0:ec559500a63f | 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
andrewbonney | 0:ec559500a63f | 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
andrewbonney | 0:ec559500a63f | 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
andrewbonney | 0:ec559500a63f | 27 | * SUCH DAMAGE. |
andrewbonney | 0:ec559500a63f | 28 | * |
andrewbonney | 0:ec559500a63f | 29 | * This file is a contribution to the lwIP TCP/IP stack. |
andrewbonney | 0:ec559500a63f | 30 | * The Swedish Institute of Computer Science and Adam Dunkels |
andrewbonney | 0:ec559500a63f | 31 | * are specifically granted permission to redistribute this |
andrewbonney | 0:ec559500a63f | 32 | * source code. |
andrewbonney | 0:ec559500a63f | 33 | */ |
andrewbonney | 0:ec559500a63f | 34 | |
andrewbonney | 0:ec559500a63f | 35 | #ifndef __LWIP_IGMP_H__ |
andrewbonney | 0:ec559500a63f | 36 | #define __LWIP_IGMP_H__ |
andrewbonney | 0:ec559500a63f | 37 | |
andrewbonney | 0:ec559500a63f | 38 | #include "lwip/opt.h" |
andrewbonney | 0:ec559500a63f | 39 | #include "lwip/ip_addr.h" |
andrewbonney | 0:ec559500a63f | 40 | #include "lwip/netif.h" |
andrewbonney | 0:ec559500a63f | 41 | #include "lwip/pbuf.h" |
andrewbonney | 0:ec559500a63f | 42 | |
andrewbonney | 0:ec559500a63f | 43 | #if LWIP_IGMP /* don't build if not configured for use in lwipopts.h */ |
andrewbonney | 0:ec559500a63f | 44 | |
andrewbonney | 0:ec559500a63f | 45 | #ifdef __cplusplus |
andrewbonney | 0:ec559500a63f | 46 | extern "C" { |
andrewbonney | 0:ec559500a63f | 47 | #endif |
andrewbonney | 0:ec559500a63f | 48 | |
andrewbonney | 0:ec559500a63f | 49 | |
andrewbonney | 0:ec559500a63f | 50 | /* IGMP timer */ |
andrewbonney | 0:ec559500a63f | 51 | #define IGMP_TMR_INTERVAL 100 /* Milliseconds */ |
andrewbonney | 0:ec559500a63f | 52 | #define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL) |
andrewbonney | 0:ec559500a63f | 53 | #define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL) |
andrewbonney | 0:ec559500a63f | 54 | |
andrewbonney | 0:ec559500a63f | 55 | /* MAC Filter Actions, these are passed to a netif's |
andrewbonney | 0:ec559500a63f | 56 | * igmp_mac_filter callback function. */ |
andrewbonney | 0:ec559500a63f | 57 | #define IGMP_DEL_MAC_FILTER 0 |
andrewbonney | 0:ec559500a63f | 58 | #define IGMP_ADD_MAC_FILTER 1 |
andrewbonney | 0:ec559500a63f | 59 | |
andrewbonney | 0:ec559500a63f | 60 | |
andrewbonney | 0:ec559500a63f | 61 | /** |
andrewbonney | 0:ec559500a63f | 62 | * igmp group structure - there is |
andrewbonney | 0:ec559500a63f | 63 | * a list of groups for each interface |
andrewbonney | 0:ec559500a63f | 64 | * these should really be linked from the interface, but |
andrewbonney | 0:ec559500a63f | 65 | * if we keep them separate we will not affect the lwip original code |
andrewbonney | 0:ec559500a63f | 66 | * too much |
andrewbonney | 0:ec559500a63f | 67 | * |
andrewbonney | 0:ec559500a63f | 68 | * There will be a group for the all systems group address but this |
andrewbonney | 0:ec559500a63f | 69 | * will not run the state machine as it is used to kick off reports |
andrewbonney | 0:ec559500a63f | 70 | * from all the other groups |
andrewbonney | 0:ec559500a63f | 71 | */ |
andrewbonney | 0:ec559500a63f | 72 | struct igmp_group { |
andrewbonney | 0:ec559500a63f | 73 | /** next link */ |
andrewbonney | 0:ec559500a63f | 74 | struct igmp_group *next; |
andrewbonney | 0:ec559500a63f | 75 | /** interface on which the group is active */ |
andrewbonney | 0:ec559500a63f | 76 | struct netif *netif; |
andrewbonney | 0:ec559500a63f | 77 | /** multicast address */ |
andrewbonney | 0:ec559500a63f | 78 | ip_addr_t group_address; |
andrewbonney | 0:ec559500a63f | 79 | /** signifies we were the last person to report */ |
andrewbonney | 0:ec559500a63f | 80 | u8_t last_reporter_flag; |
andrewbonney | 0:ec559500a63f | 81 | /** current state of the group */ |
andrewbonney | 0:ec559500a63f | 82 | u8_t group_state; |
andrewbonney | 0:ec559500a63f | 83 | /** timer for reporting, negative is OFF */ |
andrewbonney | 0:ec559500a63f | 84 | u16_t timer; |
andrewbonney | 0:ec559500a63f | 85 | /** counter of simultaneous uses */ |
andrewbonney | 0:ec559500a63f | 86 | u8_t use; |
andrewbonney | 0:ec559500a63f | 87 | }; |
andrewbonney | 0:ec559500a63f | 88 | |
andrewbonney | 0:ec559500a63f | 89 | /* Prototypes */ |
andrewbonney | 0:ec559500a63f | 90 | void igmp_init(void); |
andrewbonney | 0:ec559500a63f | 91 | err_t igmp_start(struct netif *netif); |
andrewbonney | 0:ec559500a63f | 92 | err_t igmp_stop(struct netif *netif); |
andrewbonney | 0:ec559500a63f | 93 | void igmp_report_groups(struct netif *netif); |
andrewbonney | 0:ec559500a63f | 94 | struct igmp_group *igmp_lookfor_group(struct netif *ifp, ip_addr_t *addr); |
andrewbonney | 0:ec559500a63f | 95 | void igmp_input(struct pbuf *p, struct netif *inp, ip_addr_t *dest); |
andrewbonney | 0:ec559500a63f | 96 | err_t igmp_joingroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr); |
andrewbonney | 0:ec559500a63f | 97 | err_t igmp_leavegroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr); |
andrewbonney | 0:ec559500a63f | 98 | void igmp_tmr(void); |
andrewbonney | 0:ec559500a63f | 99 | |
andrewbonney | 0:ec559500a63f | 100 | #ifdef __cplusplus |
andrewbonney | 0:ec559500a63f | 101 | } |
andrewbonney | 0:ec559500a63f | 102 | #endif |
andrewbonney | 0:ec559500a63f | 103 | |
andrewbonney | 0:ec559500a63f | 104 | #endif /* LWIP_IGMP */ |
andrewbonney | 0:ec559500a63f | 105 | |
andrewbonney | 0:ec559500a63f | 106 | #endif /* __LWIP_IGMP_H__ */ |