CDC/ECM driver for mbed, based on USBDevice by mbed-official. Uses PicoTCP to access Ethernet USB device. License: GPLv2

Dependents:   USBEthernet_TEST

Fork of USB_Ethernet by Daniele Lacamera

include/pico_addressing.h

Committer:
daniele
Date:
2013-08-03
Revision:
2:540f6e142d59

File content as of revision 2:540f6e142d59:

/*********************************************************************
PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved.
See LICENSE and COPYING for usage.

*********************************************************************/
#ifndef _INCLUDE_PICO_ADDRESSING
#define _INCLUDE_PICO_ADDRESSING
#include <stdint.h>


struct pico_ip4
{
  uint32_t addr;
};
#define PICO_SIZE_IP4 4


struct pico_ip6
{
  uint8_t addr[16];
};
#define PICO_SIZE_IP6 16

struct pico_eth
{
  uint8_t addr[6];
  uint8_t padding[2];
};
#define PICO_SIZE_ETH 6

extern const uint8_t PICO_ETHADDR_ALL[];


struct pico_trans
{
  uint16_t sport;
  uint16_t dport;

};
#define PICO_SIZE_TRANS 8


/* Here are some protocols. */
#define PICO_PROTO_IPV4   0
#define PICO_PROTO_ICMP4  1
#define PICO_PROTO_IGMP  2
#define PICO_PROTO_TCP    6
#define PICO_PROTO_UDP    17
#define PICO_PROTO_IPV6   41
#define PICO_PROTO_ICMP6  58

#endif