Free (GPLv2) TCP/IP stack developed by TASS Belgium

Dependents:   lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pico_addressing.h Source File

pico_addressing.h

00001 /*********************************************************************
00002    PicoTCP. Copyright (c) 2012-2015 Altran Intelligent Systems. Some rights reserved.
00003    See LICENSE and COPYING for usage.
00004 
00005  *********************************************************************/
00006 #ifndef INCLUDE_PICO_ADDRESSING
00007 #define INCLUDE_PICO_ADDRESSING
00008 
00009 #include "pico_config.h"
00010 
00011 PACKED_STRUCT_DEF pico_ip4
00012 {
00013     uint32_t addr;
00014 };
00015 
00016 PACKED_STRUCT_DEF pico_ip6
00017 {
00018     uint8_t addr[16];
00019 };
00020 
00021 union pico_address
00022 {
00023     struct pico_ip4 ip4;
00024     struct pico_ip6 ip6;
00025 };
00026 
00027 PACKED_STRUCT_DEF pico_eth
00028 {
00029     uint8_t addr[6];
00030     uint8_t padding[2];
00031 };
00032 
00033 extern const uint8_t PICO_ETHADDR_ALL[];
00034 
00035 
00036 PACKED_STRUCT_DEF pico_trans
00037 {
00038     uint16_t sport;
00039     uint16_t dport;
00040 
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