CDC/ECM driver for mbed, based on USBDevice by mbed-official. Uses PicoTCP to access Ethernet USB device. License: GPLv2
Fork of USB_Ethernet by
pico_addressing.h
00001 /********************************************************************* 00002 PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved. 00003 See LICENSE and COPYING for usage. 00004 00005 *********************************************************************/ 00006 #ifndef _INCLUDE_PICO_ADDRESSING 00007 #define _INCLUDE_PICO_ADDRESSING 00008 #include <stdint.h> 00009 00010 00011 struct pico_ip4 00012 { 00013 uint32_t addr; 00014 }; 00015 #define PICO_SIZE_IP4 4 00016 00017 00018 struct pico_ip6 00019 { 00020 uint8_t addr[16]; 00021 }; 00022 #define PICO_SIZE_IP6 16 00023 00024 struct pico_eth 00025 { 00026 uint8_t addr[6]; 00027 uint8_t padding[2]; 00028 }; 00029 #define PICO_SIZE_ETH 6 00030 00031 extern const uint8_t PICO_ETHADDR_ALL[]; 00032 00033 00034 struct pico_trans 00035 { 00036 uint16_t sport; 00037 uint16_t dport; 00038 00039 }; 00040 #define PICO_SIZE_TRANS 8 00041 00042 00043 /* Here are some protocols. */ 00044 #define PICO_PROTO_IPV4 0 00045 #define PICO_PROTO_ICMP4 1 00046 #define PICO_PROTO_IGMP 2 00047 #define PICO_PROTO_TCP 6 00048 #define PICO_PROTO_UDP 17 00049 #define PICO_PROTO_IPV6 41 00050 #define PICO_PROTO_ICMP6 58 00051 00052 #endif
Generated on Wed Jul 13 2022 02:20:45 by 1.7.2