ltpc.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*** ltpc.h
  2. *
  3. *
  4. ***/
  5. #define LT_GETRESULT 0x00
  6. #define LT_WRITEMEM 0x01
  7. #define LT_READMEM 0x02
  8. #define LT_GETFLAGS 0x04
  9. #define LT_SETFLAGS 0x05
  10. #define LT_INIT 0x10
  11. #define LT_SENDLAP 0x13
  12. #define LT_RCVLAP 0x14
  13. /* the flag that we care about */
  14. #define LT_FLAG_ALLLAP 0x04
  15. struct lt_getresult {
  16. unsigned char command;
  17. unsigned char mailbox;
  18. };
  19. struct lt_mem {
  20. unsigned char command;
  21. unsigned char mailbox;
  22. unsigned short addr; /* host order */
  23. unsigned short length; /* host order */
  24. };
  25. struct lt_setflags {
  26. unsigned char command;
  27. unsigned char mailbox;
  28. unsigned char flags;
  29. };
  30. struct lt_getflags {
  31. unsigned char command;
  32. unsigned char mailbox;
  33. };
  34. struct lt_init {
  35. unsigned char command;
  36. unsigned char mailbox;
  37. unsigned char hint;
  38. };
  39. struct lt_sendlap {
  40. unsigned char command;
  41. unsigned char mailbox;
  42. unsigned char dnode;
  43. unsigned char laptype;
  44. unsigned short length; /* host order */
  45. };
  46. struct lt_rcvlap {
  47. unsigned char command;
  48. unsigned char dnode;
  49. unsigned char snode;
  50. unsigned char laptype;
  51. unsigned short length; /* host order */
  52. };
  53. union lt_command {
  54. struct lt_getresult getresult;
  55. struct lt_mem mem;
  56. struct lt_setflags setflags;
  57. struct lt_getflags getflags;
  58. struct lt_init init;
  59. struct lt_sendlap sendlap;
  60. struct lt_rcvlap rcvlap;
  61. };
  62. typedef union lt_command lt_command;