Rewrite from scratch a TCP/IP stack for mbed. So far the following parts are usable: Drivers: - EMAC driver (from CMSIS 2.0) Protocols: - Ethernet protocol - ARP over ethernet for IPv4 - IPv4 over Ethernet - ICMPv4 over IPv4 - UDPv4 over IPv4 APIs: - Sockets for UDPv4 The structure of this stack is designed to be very modular. Each protocol can register one or more protocol to handle its payload, and in each protocol, an API can be hooked (like Sockets for example). This is an early release.
CQueue.h
00001 /* 00002 * $Id: Queue.h 26 2011-06-09 10:24:02Z benoit $ 00003 * $Author: benoit $ 00004 * $Date: 2011-06-09 12:24:02 +0200 (jeu., 09 juin 2011) $ 00005 * $Rev: 26 $ 00006 * 00007 * 00008 * 00009 * 00010 * 00011 */ 00012 00013 #ifndef __CQUEUE_H__ 00014 #define __CQUEUE_H__ 00015 00016 00017 #include <stdint.h> 00018 #include "mbedNet.h" 00019 00020 struct CQueue 00021 { 00022 uint8_t pushIndex, 00023 popIndex; 00024 void *entries[QUEUE_MAX_ENTRY_COUNT + 1]; 00025 int16_t size; 00026 }; 00027 typedef struct CQueue CQueue_t; 00028 00029 00030 CQueue_t *CQueue_Alloc(int16_t size); 00031 int32_t CQueue_Push(CQueue_t *queue, void *entry); 00032 int32_t CQueue_Pop(CQueue_t *queue, void **entry); 00033 int32_t CQueue_Peek(CQueue_t *queue, void **entry); 00034 int32_t CQueue_Free(CQueue_t *queue); 00035 Bool_t CQueue_IsEmpty(const CQueue_t *queue); 00036 Bool_t CQueue_IsFull(const CQueue_t *queue); 00037 00038 00039 #endif /* __QUEUE_H__ */ 00040
Generated on Wed Jul 13 2022 06:09:33 by 1.7.2