net8022.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. net8022.h
  5. Abstract:
  6. This header contains definitions for the IEEE 802.2 Logical Link Layer.
  7. Author:
  8. Chris Stevens 22-Oct-2015
  9. --*/
  10. //
  11. // ------------------------------------------------------------------- Includes
  12. //
  13. //
  14. // --------------------------------------------------------------------- Macros
  15. //
  16. //
  17. // ---------------------------------------------------------------- Definitions
  18. //
  19. //
  20. // Define the set of SAP addresses.
  21. //
  22. #define NET8022_SAP_ADDRESS_SNAP_EXTENSION 0xAA
  23. //
  24. // Define the bits for the LLC header's control field.
  25. //
  26. #define NET8022_CONTROL_TYPE_MASK 0x03
  27. #define NET8022_CONTROL_TYPE_SHIFT 0
  28. #define NET8022_CONTROL_TYPE_UNNUMBERED 0x3
  29. //
  30. // ------------------------------------------------------ Data Type Definitions
  31. //
  32. /*++
  33. Structure Description:
  34. This structure defines the IEEE 802.2 logical link layer header.
  35. Members:
  36. DestinationSapAddress - Stores the destination SAP address for the frame.
  37. SourceSapAddress - Stores the source SAP address for the frame.
  38. Control - Stores a bitmask of bits that describe the frame. See
  39. NET8022_CONTROL_* for definitions.
  40. --*/
  41. typedef struct _NET8022_LLC_HEADER {
  42. UCHAR DestinationSapAddress;
  43. UCHAR SourceSapAddress;
  44. UCHAR Control;
  45. } PACKED NET8022_LLC_HEADER, *PNET8022_LLC_HEADER;
  46. /*++
  47. Structure Description:
  48. This structure defines the 802.2 SNAP extension.
  49. Members:
  50. OrganizationCode - Stores the 24-bit organization code for the frame.
  51. EthernetType - Stores the frame type. Values are taken from the IEEE 802.3
  52. Ethernet standard.
  53. --*/
  54. typedef struct _NET8022_SNAP_EXTENSION {
  55. UCHAR OrganizationCode[3];
  56. USHORT EthernetType;
  57. } PACKED NET8022_SNAP_EXTENSION, *PNET8022_SNAP_EXTENSION;
  58. //
  59. // -------------------------------------------------------------------- Globals
  60. //
  61. //
  62. // -------------------------------------------------------- Function Prototypes
  63. //