diff options
Diffstat (limited to 'lib/lufa/Demos/Device/LowLevel/RNDISEthernet/Lib/EthernetProtocols.h')
| -rw-r--r-- | lib/lufa/Demos/Device/LowLevel/RNDISEthernet/Lib/EthernetProtocols.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/lib/lufa/Demos/Device/LowLevel/RNDISEthernet/Lib/EthernetProtocols.h b/lib/lufa/Demos/Device/LowLevel/RNDISEthernet/Lib/EthernetProtocols.h new file mode 100644 index 000000000..ca738cd0d --- /dev/null +++ b/lib/lufa/Demos/Device/LowLevel/RNDISEthernet/Lib/EthernetProtocols.h | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | /* | ||
| 2 | LUFA Library | ||
| 3 | Copyright (C) Dean Camera, 2017. | ||
| 4 | |||
| 5 | dean [at] fourwalledcubicle [dot] com | ||
| 6 | www.lufa-lib.org | ||
| 7 | */ | ||
| 8 | |||
| 9 | /* | ||
| 10 | Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) | ||
| 11 | |||
| 12 | Permission to use, copy, modify, distribute, and sell this | ||
| 13 | software and its documentation for any purpose is hereby granted | ||
| 14 | without fee, provided that the above copyright notice appear in | ||
| 15 | all copies and that both that the copyright notice and this | ||
| 16 | permission notice and warranty disclaimer appear in supporting | ||
| 17 | documentation, and that the name of the author not be used in | ||
| 18 | advertising or publicity pertaining to distribution of the | ||
| 19 | software without specific, written prior permission. | ||
| 20 | |||
| 21 | The author disclaims all warranties with regard to this | ||
| 22 | software, including all implied warranties of merchantability | ||
| 23 | and fitness. In no event shall the author be liable for any | ||
| 24 | special, indirect or consequential damages or any damages | ||
| 25 | whatsoever resulting from loss of use, data or profits, whether | ||
| 26 | in an action of contract, negligence or other tortious action, | ||
| 27 | arising out of or in connection with the use or performance of | ||
| 28 | this software. | ||
| 29 | */ | ||
| 30 | |||
| 31 | /** \file | ||
| 32 | * | ||
| 33 | * General Ethernet protocol constants and type defines, for use by | ||
| 34 | * all network protocol portions of the TCP/IP stack. | ||
| 35 | */ | ||
| 36 | |||
| 37 | #ifndef _ETHERNET_PROTOCOLS_H_ | ||
| 38 | #define _ETHERNET_PROTOCOLS_H_ | ||
| 39 | |||
| 40 | /* Macros: */ | ||
| 41 | #define ETHERTYPE_IPV4 0x0800 | ||
| 42 | #define ETHERTYPE_ARP 0x0806 | ||
| 43 | #define ETHERTYPE_RARP 0x8035 | ||
| 44 | #define ETHERTYPE_APPLETALK 0x809b | ||
| 45 | #define ETHERTYPE_APPLETALKARP 0x80f3 | ||
| 46 | #define ETHERTYPE_IEEE8021Q 0x8100 | ||
| 47 | #define ETHERTYPE_NOVELLIPX 0x8137 | ||
| 48 | #define ETHERTYPE_NOVELL 0x8138 | ||
| 49 | #define ETHERTYPE_IPV6 0x86DD | ||
| 50 | #define ETHERTYPE_COBRANET 0x8819 | ||
| 51 | #define ETHERTYPE_PROVIDERBRIDGING 0x88a8 | ||
| 52 | #define ETHERTYPE_MPLSUNICAST 0x8847 | ||
| 53 | #define ETHERTYPE_MPLSMULTICAST 0x8848 | ||
| 54 | #define ETHERTYPE_PPPoEDISCOVERY 0x8863 | ||
| 55 | #define ETHERTYPE_PPPoESESSION 0x8864 | ||
| 56 | #define ETHERTYPE_EAPOVERLAN 0x888E | ||
| 57 | #define ETHERTYPE_HYPERSCSI 0x889A | ||
| 58 | #define ETHERTYPE_ATAOVERETHERNET 0x88A2 | ||
| 59 | #define ETHERTYPE_ETHERCAT 0x88A4 | ||
| 60 | #define ETHERTYPE_SERCOSIII 0x88CD | ||
| 61 | #define ETHERTYPE_CESoE 0x88D8 | ||
| 62 | #define ETHERTYPE_MACSECURITY 0x88E5 | ||
| 63 | #define ETHERTYPE_FIBRECHANNEL 0x8906 | ||
| 64 | #define ETHERTYPE_QINQ 0x9100 | ||
| 65 | #define ETHERTYPE_VLLT 0xCAFE | ||
| 66 | |||
| 67 | #define PROTOCOL_ICMP 1 | ||
| 68 | #define PROTOCOL_IGMP 2 | ||
| 69 | #define PROTOCOL_TCP 6 | ||
| 70 | #define PROTOCOL_UDP 17 | ||
| 71 | #define PROTOCOL_OSPF 89 | ||
| 72 | #define PROTOCOL_SCTP 132 | ||
| 73 | |||
| 74 | /* Type Defines: */ | ||
| 75 | /** Type define for a physical MAC address of a device on a network. */ | ||
| 76 | typedef struct | ||
| 77 | { | ||
| 78 | uint8_t Octets[6]; /**< Individual bytes of a MAC address */ | ||
| 79 | } RNDIS_MAC_Address_t; | ||
| 80 | |||
| 81 | /** Type define for a protocol IP address of a device on a network. */ | ||
| 82 | typedef struct | ||
| 83 | { | ||
| 84 | uint8_t Octets[4]; /**< Individual bytes of an IP address */ | ||
| 85 | } IP_Address_t; | ||
| 86 | |||
| 87 | #endif | ||
| 88 | |||
