Hi. This is the feed program for Cosm. (The previous name of the services is Pachube.)

Dependencies:   mbed ThermistorPack Pachube ConfigFile EthernetNetIf TextLCD HTTPClient_ToBeRemoved FatFileSystem SDFileSystem

Committer:
shintamainjp
Date:
Mon Aug 06 12:37:59 2012 +0000
Revision:
0:521ba375aa0f
Pachube renamed to Cosm.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shintamainjp 0:521ba375aa0f 1 /*
shintamainjp 0:521ba375aa0f 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
shintamainjp 0:521ba375aa0f 3 * All rights reserved.
shintamainjp 0:521ba375aa0f 4 *
shintamainjp 0:521ba375aa0f 5 * Redistribution and use in source and binary forms, with or without modification,
shintamainjp 0:521ba375aa0f 6 * are permitted provided that the following conditions are met:
shintamainjp 0:521ba375aa0f 7 *
shintamainjp 0:521ba375aa0f 8 * 1. Redistributions of source code must retain the above copyright notice,
shintamainjp 0:521ba375aa0f 9 * this list of conditions and the following disclaimer.
shintamainjp 0:521ba375aa0f 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
shintamainjp 0:521ba375aa0f 11 * this list of conditions and the following disclaimer in the documentation
shintamainjp 0:521ba375aa0f 12 * and/or other materials provided with the distribution.
shintamainjp 0:521ba375aa0f 13 * 3. The name of the author may not be used to endorse or promote products
shintamainjp 0:521ba375aa0f 14 * derived from this software without specific prior written permission.
shintamainjp 0:521ba375aa0f 15 *
shintamainjp 0:521ba375aa0f 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
shintamainjp 0:521ba375aa0f 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
shintamainjp 0:521ba375aa0f 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
shintamainjp 0:521ba375aa0f 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
shintamainjp 0:521ba375aa0f 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
shintamainjp 0:521ba375aa0f 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
shintamainjp 0:521ba375aa0f 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
shintamainjp 0:521ba375aa0f 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
shintamainjp 0:521ba375aa0f 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
shintamainjp 0:521ba375aa0f 25 * OF SUCH DAMAGE.
shintamainjp 0:521ba375aa0f 26 *
shintamainjp 0:521ba375aa0f 27 * This file is part of the lwIP TCP/IP stack.
shintamainjp 0:521ba375aa0f 28 *
shintamainjp 0:521ba375aa0f 29 * Author: Adam Dunkels <adam@sics.se>
shintamainjp 0:521ba375aa0f 30 *
shintamainjp 0:521ba375aa0f 31 */
shintamainjp 0:521ba375aa0f 32 #ifndef __LWIP_ICMP_H__
shintamainjp 0:521ba375aa0f 33 #define __LWIP_ICMP_H__
shintamainjp 0:521ba375aa0f 34
shintamainjp 0:521ba375aa0f 35 #include "lwip/opt.h"
shintamainjp 0:521ba375aa0f 36 #include "lwip/pbuf.h"
shintamainjp 0:521ba375aa0f 37 #include "lwip/ip_addr.h"
shintamainjp 0:521ba375aa0f 38 #include "lwip/netif.h"
shintamainjp 0:521ba375aa0f 39
shintamainjp 0:521ba375aa0f 40 #ifdef __cplusplus
shintamainjp 0:521ba375aa0f 41 extern "C" {
shintamainjp 0:521ba375aa0f 42 #endif
shintamainjp 0:521ba375aa0f 43
shintamainjp 0:521ba375aa0f 44 #define ICMP_ER 0 /* echo reply */
shintamainjp 0:521ba375aa0f 45 #define ICMP_DUR 3 /* destination unreachable */
shintamainjp 0:521ba375aa0f 46 #define ICMP_SQ 4 /* source quench */
shintamainjp 0:521ba375aa0f 47 #define ICMP_RD 5 /* redirect */
shintamainjp 0:521ba375aa0f 48 #define ICMP_ECHO 8 /* echo */
shintamainjp 0:521ba375aa0f 49 #define ICMP_TE 11 /* time exceeded */
shintamainjp 0:521ba375aa0f 50 #define ICMP_PP 12 /* parameter problem */
shintamainjp 0:521ba375aa0f 51 #define ICMP_TS 13 /* timestamp */
shintamainjp 0:521ba375aa0f 52 #define ICMP_TSR 14 /* timestamp reply */
shintamainjp 0:521ba375aa0f 53 #define ICMP_IRQ 15 /* information request */
shintamainjp 0:521ba375aa0f 54 #define ICMP_IR 16 /* information reply */
shintamainjp 0:521ba375aa0f 55
shintamainjp 0:521ba375aa0f 56 enum icmp_dur_type {
shintamainjp 0:521ba375aa0f 57 ICMP_DUR_NET = 0, /* net unreachable */
shintamainjp 0:521ba375aa0f 58 ICMP_DUR_HOST = 1, /* host unreachable */
shintamainjp 0:521ba375aa0f 59 ICMP_DUR_PROTO = 2, /* protocol unreachable */
shintamainjp 0:521ba375aa0f 60 ICMP_DUR_PORT = 3, /* port unreachable */
shintamainjp 0:521ba375aa0f 61 ICMP_DUR_FRAG = 4, /* fragmentation needed and DF set */
shintamainjp 0:521ba375aa0f 62 ICMP_DUR_SR = 5 /* source route failed */
shintamainjp 0:521ba375aa0f 63 };
shintamainjp 0:521ba375aa0f 64
shintamainjp 0:521ba375aa0f 65 enum icmp_te_type {
shintamainjp 0:521ba375aa0f 66 ICMP_TE_TTL = 0, /* time to live exceeded in transit */
shintamainjp 0:521ba375aa0f 67 ICMP_TE_FRAG = 1 /* fragment reassembly time exceeded */
shintamainjp 0:521ba375aa0f 68 };
shintamainjp 0:521ba375aa0f 69
shintamainjp 0:521ba375aa0f 70 #ifdef PACK_STRUCT_USE_INCLUDES
shintamainjp 0:521ba375aa0f 71 # include "arch/bpstruct.h"
shintamainjp 0:521ba375aa0f 72 #endif
shintamainjp 0:521ba375aa0f 73 /* This is the standard ICMP header only that the u32_t data
shintamainjp 0:521ba375aa0f 74 * is splitted to two u16_t like ICMP echo needs it.
shintamainjp 0:521ba375aa0f 75 * This header is also used for other ICMP types that do not
shintamainjp 0:521ba375aa0f 76 * use the data part.
shintamainjp 0:521ba375aa0f 77 */
shintamainjp 0:521ba375aa0f 78 PACK_STRUCT_BEGIN
shintamainjp 0:521ba375aa0f 79 struct icmp_echo_hdr {
shintamainjp 0:521ba375aa0f 80 PACK_STRUCT_FIELD(u8_t type);
shintamainjp 0:521ba375aa0f 81 PACK_STRUCT_FIELD(u8_t code);
shintamainjp 0:521ba375aa0f 82 PACK_STRUCT_FIELD(u16_t chksum);
shintamainjp 0:521ba375aa0f 83 PACK_STRUCT_FIELD(u16_t id);
shintamainjp 0:521ba375aa0f 84 PACK_STRUCT_FIELD(u16_t seqno);
shintamainjp 0:521ba375aa0f 85 } PACK_STRUCT_STRUCT;
shintamainjp 0:521ba375aa0f 86 PACK_STRUCT_END
shintamainjp 0:521ba375aa0f 87 #ifdef PACK_STRUCT_USE_INCLUDES
shintamainjp 0:521ba375aa0f 88 # include "arch/epstruct.h"
shintamainjp 0:521ba375aa0f 89 #endif
shintamainjp 0:521ba375aa0f 90
shintamainjp 0:521ba375aa0f 91 #define ICMPH_TYPE(hdr) ((hdr)->type)
shintamainjp 0:521ba375aa0f 92 #define ICMPH_CODE(hdr) ((hdr)->code)
shintamainjp 0:521ba375aa0f 93
shintamainjp 0:521ba375aa0f 94 /* Combines type and code to an u16_t */
shintamainjp 0:521ba375aa0f 95 #define ICMPH_TYPE_SET(hdr, t) ((hdr)->type = (t))
shintamainjp 0:521ba375aa0f 96 #define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c))
shintamainjp 0:521ba375aa0f 97
shintamainjp 0:521ba375aa0f 98
shintamainjp 0:521ba375aa0f 99 #if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */
shintamainjp 0:521ba375aa0f 100
shintamainjp 0:521ba375aa0f 101 void icmp_input(struct pbuf *p, struct netif *inp);
shintamainjp 0:521ba375aa0f 102 void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t);
shintamainjp 0:521ba375aa0f 103 void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t);
shintamainjp 0:521ba375aa0f 104
shintamainjp 0:521ba375aa0f 105 #endif /* LWIP_ICMP */
shintamainjp 0:521ba375aa0f 106
shintamainjp 0:521ba375aa0f 107 #ifdef __cplusplus
shintamainjp 0:521ba375aa0f 108 }
shintamainjp 0:521ba375aa0f 109 #endif
shintamainjp 0:521ba375aa0f 110
shintamainjp 0:521ba375aa0f 111 #endif /* __LWIP_ICMP_H__ */