llc.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * Copyright (c) 1993, 1994, 1997
  3. * The Regents of the University of California. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that: (1) source code distributions
  7. * retain the above copyright notice and this paragraph in its entirety, (2)
  8. * distributions including binary code include the above copyright notice and
  9. * this paragraph in its entirety in the documentation or other materials
  10. * provided with the distribution, and (3) all advertising materials mentioning
  11. * features or use of this software display the following acknowledgement:
  12. * ``This product includes software developed by the University of California,
  13. * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  14. * the University nor the names of its contributors may be used to endorse
  15. * or promote products derived from this software without specific prior
  16. * written permission.
  17. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  18. * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  19. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  20. */
  21. /*
  22. * Definitions for information in the LLC header.
  23. */
  24. #define LLC_U_FMT 3
  25. #define LLC_GSAP 1
  26. #define LLC_IG 1 /* Individual / Group */
  27. #define LLC_S_FMT 1
  28. #define LLC_U_POLL 0x10
  29. #define LLC_IS_POLL 0x0100
  30. #define LLC_XID_FI 0x81
  31. #define LLC_U_CMD_MASK 0xef
  32. #define LLC_UI 0x03
  33. #define LLC_UA 0x63
  34. #define LLC_DISC 0x43
  35. #define LLC_DM 0x0f
  36. #define LLC_SABME 0x6f
  37. #define LLC_TEST 0xe3
  38. #define LLC_XID 0xaf
  39. #define LLC_FRMR 0x87
  40. #define LLC_S_CMD_MASK 0x0f
  41. #define LLC_RR 0x0001
  42. #define LLC_RNR 0x0005
  43. #define LLC_REJ 0x0009
  44. #define LLC_IS_NR(is) (((is) >> 9) & 0x7f)
  45. #define LLC_I_NS(is) (((is) >> 1) & 0x7f)
  46. /*
  47. * 802.2 LLC SAP values.
  48. */
  49. #ifndef LLCSAP_NULL
  50. #define LLCSAP_NULL 0x00
  51. #endif
  52. #ifndef LLCSAP_GLOBAL
  53. #define LLCSAP_GLOBAL 0xff
  54. #endif
  55. #ifndef LLCSAP_8021B_I
  56. #define LLCSAP_8021B_I 0x02
  57. #endif
  58. #ifndef LLCSAP_8021B_G
  59. #define LLCSAP_8021B_G 0x03
  60. #endif
  61. #ifndef LLCSAP_IP
  62. #define LLCSAP_IP 0x06
  63. #endif
  64. #ifndef LLCSAP_PROWAYNM
  65. #define LLCSAP_PROWAYNM 0x0e
  66. #endif
  67. #ifndef LLCSAP_8021D
  68. #define LLCSAP_8021D 0x42
  69. #endif
  70. #ifndef LLCSAP_RS511
  71. #define LLCSAP_RS511 0x4e
  72. #endif
  73. #ifndef LLCSAP_ISO8208
  74. #define LLCSAP_ISO8208 0x7e
  75. #endif
  76. #ifndef LLCSAP_PROWAY
  77. #define LLCSAP_PROWAY 0x8e
  78. #endif
  79. #ifndef LLCSAP_SNAP
  80. #define LLCSAP_SNAP 0xaa
  81. #endif
  82. #ifndef LLCSAP_IPX
  83. #define LLCSAP_IPX 0xe0
  84. #endif
  85. #ifndef LLCSAP_NETBEUI
  86. #define LLCSAP_NETBEUI 0xf0
  87. #endif
  88. #ifndef LLCSAP_ISONS
  89. #define LLCSAP_ISONS 0xfe
  90. #endif