]> git.donarmstrong.com Git - qmk_firmware.git/blob - protocol/lufa/LUFA-git/Demos/Device/ClassDriver/RNDISEthernet/Lib/EthernetProtocols.h
Squashed 'tmk_core/' changes from caca2c0..dc0e46e
[qmk_firmware.git] / protocol / lufa / LUFA-git / Demos / Device / ClassDriver / RNDISEthernet / Lib / EthernetProtocols.h
1 /*
2              LUFA Library
3      Copyright (C) Dean Camera, 2014.
4
5   dean [at] fourwalledcubicle [dot] com
6            www.lufa-lib.org
7 */
8
9 /*
10   Copyright 2014  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         /* Includes: */
41                 #include <LUFA/Drivers/USB/USB.h>
42
43         /* Macros: */
44                 #define ETHERTYPE_IPV4                   0x0800
45                 #define ETHERTYPE_ARP                    0x0806
46                 #define ETHERTYPE_RARP                   0x8035
47                 #define ETHERTYPE_APPLETALK              0x809b
48                 #define ETHERTYPE_APPLETALKARP           0x80f3
49                 #define ETHERTYPE_IEEE8021Q              0x8100
50                 #define ETHERTYPE_NOVELLIPX              0x8137
51                 #define ETHERTYPE_NOVELL                 0x8138
52                 #define ETHERTYPE_IPV6                   0x86DD
53                 #define ETHERTYPE_COBRANET               0x8819
54                 #define ETHERTYPE_PROVIDERBRIDGING       0x88a8
55                 #define ETHERTYPE_MPLSUNICAST            0x8847
56                 #define ETHERTYPE_MPLSMULTICAST          0x8848
57                 #define ETHERTYPE_PPPoEDISCOVERY         0x8863
58                 #define ETHERTYPE_PPPoESESSION           0x8864
59                 #define ETHERTYPE_EAPOVERLAN             0x888E
60                 #define ETHERTYPE_HYPERSCSI              0x889A
61                 #define ETHERTYPE_ATAOVERETHERNET        0x88A2
62                 #define ETHERTYPE_ETHERCAT               0x88A4
63                 #define ETHERTYPE_SERCOSIII              0x88CD
64                 #define ETHERTYPE_CESoE                  0x88D8
65                 #define ETHERTYPE_MACSECURITY            0x88E5
66                 #define ETHERTYPE_FIBRECHANNEL           0x8906
67                 #define ETHERTYPE_QINQ                   0x9100
68                 #define ETHERTYPE_VLLT                   0xCAFE
69
70                 #define PROTOCOL_ICMP                    1
71                 #define PROTOCOL_IGMP                    2
72                 #define PROTOCOL_TCP                     6
73                 #define PROTOCOL_UDP                     17
74                 #define PROTOCOL_OSPF                    89
75                 #define PROTOCOL_SCTP                    132
76
77         /* Type Defines: */
78                 /** Type define for an Ethernet frame buffer data and information structure. */
79                 typedef struct
80                 {
81                         uint8_t  FrameData[ETHERNET_FRAME_SIZE_MAX]; /**< Ethernet frame contents. */
82                         uint16_t FrameLength; /**< Length in bytes of the Ethernet frame stored in the buffer. */
83                 } Ethernet_Frame_Info_t;
84
85                 /** Type define for a protocol IP address of a device on a network. */
86                 typedef struct
87                 {
88                         uint8_t  Octets[4]; /**< Individual bytes of an IP address */
89                 } IP_Address_t;
90
91 #endif
92