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
extlib/EthernetNetIf/LPC2368/lwip/include/lwip/memp_std.h@0:521ba375aa0f, 2012-08-06 (annotated)
- Committer:
- shintamainjp
- Date:
- Mon Aug 06 12:37:59 2012 +0000
- Revision:
- 0:521ba375aa0f
Pachube renamed to Cosm.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shintamainjp | 0:521ba375aa0f | 1 | /* |
shintamainjp | 0:521ba375aa0f | 2 | * SETUP: Make sure we define everything we will need. |
shintamainjp | 0:521ba375aa0f | 3 | * |
shintamainjp | 0:521ba375aa0f | 4 | * We have create three types of pools: |
shintamainjp | 0:521ba375aa0f | 5 | * 1) MEMPOOL - standard pools |
shintamainjp | 0:521ba375aa0f | 6 | * 2) MALLOC_MEMPOOL - to be used by mem_malloc in mem.c |
shintamainjp | 0:521ba375aa0f | 7 | * 3) PBUF_MEMPOOL - a mempool of pbuf's, so include space for the pbuf struct |
shintamainjp | 0:521ba375aa0f | 8 | * |
shintamainjp | 0:521ba375aa0f | 9 | * If the include'r doesn't require any special treatment of each of the types |
shintamainjp | 0:521ba375aa0f | 10 | * above, then will declare #2 & #3 to be just standard mempools. |
shintamainjp | 0:521ba375aa0f | 11 | */ |
shintamainjp | 0:521ba375aa0f | 12 | #ifndef LWIP_MALLOC_MEMPOOL |
shintamainjp | 0:521ba375aa0f | 13 | /* This treats "malloc pools" just like any other pool. |
shintamainjp | 0:521ba375aa0f | 14 | The pools are a little bigger to provide 'size' as the amount of user data. */ |
shintamainjp | 0:521ba375aa0f | 15 | #define LWIP_MALLOC_MEMPOOL(num, size) LWIP_MEMPOOL(POOL_##size, num, (size + sizeof(struct memp_malloc_helper)), "MALLOC_"#size) |
shintamainjp | 0:521ba375aa0f | 16 | #define LWIP_MALLOC_MEMPOOL_START |
shintamainjp | 0:521ba375aa0f | 17 | #define LWIP_MALLOC_MEMPOOL_END |
shintamainjp | 0:521ba375aa0f | 18 | #endif /* LWIP_MALLOC_MEMPOOL */ |
shintamainjp | 0:521ba375aa0f | 19 | |
shintamainjp | 0:521ba375aa0f | 20 | #ifndef LWIP_PBUF_MEMPOOL |
shintamainjp | 0:521ba375aa0f | 21 | /* This treats "pbuf pools" just like any other pool. |
shintamainjp | 0:521ba375aa0f | 22 | * Allocates buffers for a pbuf struct AND a payload size */ |
shintamainjp | 0:521ba375aa0f | 23 | #define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (MEMP_ALIGN_SIZE(sizeof(struct pbuf)) + MEMP_ALIGN_SIZE(payload)), desc) |
shintamainjp | 0:521ba375aa0f | 24 | #endif /* LWIP_PBUF_MEMPOOL */ |
shintamainjp | 0:521ba375aa0f | 25 | |
shintamainjp | 0:521ba375aa0f | 26 | |
shintamainjp | 0:521ba375aa0f | 27 | /* |
shintamainjp | 0:521ba375aa0f | 28 | * A list of internal pools used by LWIP. |
shintamainjp | 0:521ba375aa0f | 29 | * |
shintamainjp | 0:521ba375aa0f | 30 | * LWIP_MEMPOOL(pool_name, number_elements, element_size, pool_description) |
shintamainjp | 0:521ba375aa0f | 31 | * creates a pool name MEMP_pool_name. description is used in stats.c |
shintamainjp | 0:521ba375aa0f | 32 | */ |
shintamainjp | 0:521ba375aa0f | 33 | #if LWIP_RAW |
shintamainjp | 0:521ba375aa0f | 34 | LWIP_MEMPOOL(RAW_PCB, MEMP_NUM_RAW_PCB, sizeof(struct raw_pcb), "RAW_PCB") |
shintamainjp | 0:521ba375aa0f | 35 | #endif /* LWIP_RAW */ |
shintamainjp | 0:521ba375aa0f | 36 | |
shintamainjp | 0:521ba375aa0f | 37 | #if LWIP_UDP |
shintamainjp | 0:521ba375aa0f | 38 | LWIP_MEMPOOL(UDP_PCB, MEMP_NUM_UDP_PCB, sizeof(struct udp_pcb), "UDP_PCB") |
shintamainjp | 0:521ba375aa0f | 39 | #endif /* LWIP_UDP */ |
shintamainjp | 0:521ba375aa0f | 40 | |
shintamainjp | 0:521ba375aa0f | 41 | #if LWIP_TCP |
shintamainjp | 0:521ba375aa0f | 42 | LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB, sizeof(struct tcp_pcb), "TCP_PCB") |
shintamainjp | 0:521ba375aa0f | 43 | LWIP_MEMPOOL(TCP_PCB_LISTEN, MEMP_NUM_TCP_PCB_LISTEN, sizeof(struct tcp_pcb_listen), "TCP_PCB_LISTEN") |
shintamainjp | 0:521ba375aa0f | 44 | LWIP_MEMPOOL(TCP_SEG, MEMP_NUM_TCP_SEG, sizeof(struct tcp_seg), "TCP_SEG") |
shintamainjp | 0:521ba375aa0f | 45 | #endif /* LWIP_TCP */ |
shintamainjp | 0:521ba375aa0f | 46 | |
shintamainjp | 0:521ba375aa0f | 47 | #if IP_REASSEMBLY |
shintamainjp | 0:521ba375aa0f | 48 | LWIP_MEMPOOL(REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip_reassdata), "REASSDATA") |
shintamainjp | 0:521ba375aa0f | 49 | #endif /* IP_REASSEMBLY */ |
shintamainjp | 0:521ba375aa0f | 50 | #if IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF |
shintamainjp | 0:521ba375aa0f | 51 | LWIP_MEMPOOL(FRAG_PBUF, MEMP_NUM_FRAG_PBUF, sizeof(struct pbuf_custom_ref),"FRAG_PBUF") |
shintamainjp | 0:521ba375aa0f | 52 | #endif /* IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF */ |
shintamainjp | 0:521ba375aa0f | 53 | |
shintamainjp | 0:521ba375aa0f | 54 | #if LWIP_NETCONN |
shintamainjp | 0:521ba375aa0f | 55 | LWIP_MEMPOOL(NETBUF, MEMP_NUM_NETBUF, sizeof(struct netbuf), "NETBUF") |
shintamainjp | 0:521ba375aa0f | 56 | LWIP_MEMPOOL(NETCONN, MEMP_NUM_NETCONN, sizeof(struct netconn), "NETCONN") |
shintamainjp | 0:521ba375aa0f | 57 | #endif /* LWIP_NETCONN */ |
shintamainjp | 0:521ba375aa0f | 58 | |
shintamainjp | 0:521ba375aa0f | 59 | #if NO_SYS==0 |
shintamainjp | 0:521ba375aa0f | 60 | LWIP_MEMPOOL(TCPIP_MSG_API, MEMP_NUM_TCPIP_MSG_API, sizeof(struct tcpip_msg), "TCPIP_MSG_API") |
shintamainjp | 0:521ba375aa0f | 61 | #if !LWIP_TCPIP_CORE_LOCKING_INPUT |
shintamainjp | 0:521ba375aa0f | 62 | LWIP_MEMPOOL(TCPIP_MSG_INPKT,MEMP_NUM_TCPIP_MSG_INPKT, sizeof(struct tcpip_msg), "TCPIP_MSG_INPKT") |
shintamainjp | 0:521ba375aa0f | 63 | #endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ |
shintamainjp | 0:521ba375aa0f | 64 | #endif /* NO_SYS==0 */ |
shintamainjp | 0:521ba375aa0f | 65 | |
shintamainjp | 0:521ba375aa0f | 66 | #if ARP_QUEUEING |
shintamainjp | 0:521ba375aa0f | 67 | LWIP_MEMPOOL(ARP_QUEUE, MEMP_NUM_ARP_QUEUE, sizeof(struct etharp_q_entry), "ARP_QUEUE") |
shintamainjp | 0:521ba375aa0f | 68 | #endif /* ARP_QUEUEING */ |
shintamainjp | 0:521ba375aa0f | 69 | |
shintamainjp | 0:521ba375aa0f | 70 | #if LWIP_IGMP |
shintamainjp | 0:521ba375aa0f | 71 | LWIP_MEMPOOL(IGMP_GROUP, MEMP_NUM_IGMP_GROUP, sizeof(struct igmp_group), "IGMP_GROUP") |
shintamainjp | 0:521ba375aa0f | 72 | #endif /* LWIP_IGMP */ |
shintamainjp | 0:521ba375aa0f | 73 | |
shintamainjp | 0:521ba375aa0f | 74 | #if (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) /* LWIP_TIMERS */ |
shintamainjp | 0:521ba375aa0f | 75 | LWIP_MEMPOOL(SYS_TIMEOUT, MEMP_NUM_SYS_TIMEOUT, sizeof(struct sys_timeo), "SYS_TIMEOUT") |
shintamainjp | 0:521ba375aa0f | 76 | #endif /* LWIP_TIMERS */ |
shintamainjp | 0:521ba375aa0f | 77 | |
shintamainjp | 0:521ba375aa0f | 78 | #if LWIP_SNMP |
shintamainjp | 0:521ba375aa0f | 79 | LWIP_MEMPOOL(SNMP_ROOTNODE, MEMP_NUM_SNMP_ROOTNODE, sizeof(struct mib_list_rootnode), "SNMP_ROOTNODE") |
shintamainjp | 0:521ba375aa0f | 80 | LWIP_MEMPOOL(SNMP_NODE, MEMP_NUM_SNMP_NODE, sizeof(struct mib_list_node), "SNMP_NODE") |
shintamainjp | 0:521ba375aa0f | 81 | LWIP_MEMPOOL(SNMP_VARBIND, MEMP_NUM_SNMP_VARBIND, sizeof(struct snmp_varbind), "SNMP_VARBIND") |
shintamainjp | 0:521ba375aa0f | 82 | LWIP_MEMPOOL(SNMP_VALUE, MEMP_NUM_SNMP_VALUE, SNMP_MAX_VALUE_SIZE, "SNMP_VALUE") |
shintamainjp | 0:521ba375aa0f | 83 | #endif /* LWIP_SNMP */ |
shintamainjp | 0:521ba375aa0f | 84 | #if LWIP_DNS && LWIP_SOCKET |
shintamainjp | 0:521ba375aa0f | 85 | LWIP_MEMPOOL(NETDB, MEMP_NUM_NETDB, NETDB_ELEM_SIZE, "NETDB") |
shintamainjp | 0:521ba375aa0f | 86 | #endif /* LWIP_DNS && LWIP_SOCKET */ |
shintamainjp | 0:521ba375aa0f | 87 | #if LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC |
shintamainjp | 0:521ba375aa0f | 88 | LWIP_MEMPOOL(LOCALHOSTLIST, MEMP_NUM_LOCALHOSTLIST, LOCALHOSTLIST_ELEM_SIZE, "LOCALHOSTLIST") |
shintamainjp | 0:521ba375aa0f | 89 | #endif /* LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ |
shintamainjp | 0:521ba375aa0f | 90 | #if PPP_SUPPORT && PPPOE_SUPPORT |
shintamainjp | 0:521ba375aa0f | 91 | LWIP_MEMPOOL(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES, sizeof(struct pppoe_softc), "PPPOE_IF") |
shintamainjp | 0:521ba375aa0f | 92 | #endif /* PPP_SUPPORT && PPPOE_SUPPORT */ |
shintamainjp | 0:521ba375aa0f | 93 | |
shintamainjp | 0:521ba375aa0f | 94 | /* |
shintamainjp | 0:521ba375aa0f | 95 | * A list of pools of pbuf's used by LWIP. |
shintamainjp | 0:521ba375aa0f | 96 | * |
shintamainjp | 0:521ba375aa0f | 97 | * LWIP_PBUF_MEMPOOL(pool_name, number_elements, pbuf_payload_size, pool_description) |
shintamainjp | 0:521ba375aa0f | 98 | * creates a pool name MEMP_pool_name. description is used in stats.c |
shintamainjp | 0:521ba375aa0f | 99 | * This allocates enough space for the pbuf struct and a payload. |
shintamainjp | 0:521ba375aa0f | 100 | * (Example: pbuf_payload_size=0 allocates only size for the struct) |
shintamainjp | 0:521ba375aa0f | 101 | */ |
shintamainjp | 0:521ba375aa0f | 102 | LWIP_PBUF_MEMPOOL(PBUF, MEMP_NUM_PBUF, 0, "PBUF_REF/ROM") |
shintamainjp | 0:521ba375aa0f | 103 | LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE, PBUF_POOL_BUFSIZE, "PBUF_POOL") |
shintamainjp | 0:521ba375aa0f | 104 | |
shintamainjp | 0:521ba375aa0f | 105 | |
shintamainjp | 0:521ba375aa0f | 106 | /* |
shintamainjp | 0:521ba375aa0f | 107 | * Allow for user-defined pools; this must be explicitly set in lwipopts.h |
shintamainjp | 0:521ba375aa0f | 108 | * since the default is to NOT look for lwippools.h |
shintamainjp | 0:521ba375aa0f | 109 | */ |
shintamainjp | 0:521ba375aa0f | 110 | #if MEMP_USE_CUSTOM_POOLS |
shintamainjp | 0:521ba375aa0f | 111 | #include "lwippools.h" |
shintamainjp | 0:521ba375aa0f | 112 | #endif /* MEMP_USE_CUSTOM_POOLS */ |
shintamainjp | 0:521ba375aa0f | 113 | |
shintamainjp | 0:521ba375aa0f | 114 | /* |
shintamainjp | 0:521ba375aa0f | 115 | * REQUIRED CLEANUP: Clear up so we don't get "multiply defined" error later |
shintamainjp | 0:521ba375aa0f | 116 | * (#undef is ignored for something that is not defined) |
shintamainjp | 0:521ba375aa0f | 117 | */ |
shintamainjp | 0:521ba375aa0f | 118 | #undef LWIP_MEMPOOL |
shintamainjp | 0:521ba375aa0f | 119 | #undef LWIP_MALLOC_MEMPOOL |
shintamainjp | 0:521ba375aa0f | 120 | #undef LWIP_MALLOC_MEMPOOL_START |
shintamainjp | 0:521ba375aa0f | 121 | #undef LWIP_MALLOC_MEMPOOL_END |
shintamainjp | 0:521ba375aa0f | 122 | #undef LWIP_PBUF_MEMPOOL |