ncb.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: ncb.h /main/2 1996/05/09 04:12:28 drk $ */
  24. /*
  25. * COMPONENT_NAME: austext
  26. *
  27. * FUNCTIONS: none
  28. *
  29. * ORIGINS: 157
  30. *
  31. */
  32. #define NETNAME_LEN 16
  33. #ifndef NULL
  34. #define NULL (char *)0
  35. #endif
  36. #define NETBIOS_INT 0x5c
  37. #define ADDNAME 0x30
  38. #define DELNAME 0x31
  39. #define RESET 0x32
  40. #define STATUS 0x33
  41. #define SESSTAT 0x34
  42. #define CALL 0x10
  43. #define LISTEN 0x11
  44. #define HANGUP 0x12
  45. #define SEND 0x14
  46. #define RECEIVE 0x15
  47. #define ADDNAIT 0xB0
  48. #define DELNAIT 0xB1
  49. #define CALNAIT 0x90
  50. #define LISNAIT 0x91
  51. #define HANNAIT 0x92
  52. #define SENNAIT 0x94
  53. #define RECNAIT 0x95
  54. #define ARENAIT 0x96
  55. #define ANY 0xFF
  56. #define PENDING 0xFFFF
  57. #define NCBSIZE 64
  58. #ifdef TURBO
  59. #ifdef __SMALL__
  60. #define SMALL_DATA
  61. #endif
  62. #ifdef __MEDIUM__
  63. #define SMALL_DATA
  64. #endif
  65. #endif
  66. #ifdef MSC
  67. #ifdef M_I86SM
  68. #define SMALL_DATA
  69. #endif
  70. #ifdef M_I86MM
  71. #define SMALL_DATA
  72. #endif
  73. #endif
  74. #ifdef LAT
  75. #ifdef SPTR
  76. #define SMALL_DATA
  77. #endif
  78. #endif
  79. /***** NCB Commands parameter block *****/
  80. typedef struct {
  81. char command; /* NETBIOS Command */
  82. char retcode; /* Return value (some enumerated below) */
  83. char lsn; /* Local session number */
  84. char num; /* Name number */
  85. char *buffer_off; /* Message buffer offset */
  86. #ifdef SMALL_DATA
  87. int buffer_seg; /* Message buffer segment */
  88. #endif
  89. int length; /* Length of message buffer */
  90. char callname[NETNAME_LEN]; /* Name of user being called */
  91. char name[NETNAME_LEN]; /* My name */
  92. char rto; /* Receive timeout (500ms units) */
  93. char sto; /* Send timeout (500ms units) */
  94. char *post_off; /* Post function offset */
  95. #ifdef SMALL_DATA
  96. int post_seg; /* Post function segment */
  97. #endif
  98. char lana_num; /* Local area network adapter number (use 0) */
  99. char cmd_cplt; /* Command complete return value, used when posting */
  100. char reserve[14]; /* reserved for Net BIOS */
  101. } NCB;
  102. typedef struct {
  103. char rep_sess;
  104. char name_sess;
  105. char gram;
  106. char rcvany;
  107. struct {
  108. char lsn;
  109. char state_sess;
  110. char loc_name[16];
  111. char rem_name[16];
  112. char rcvs;
  113. char sends;
  114. } s[32];
  115. } SESSION;
  116. #define NCB_H
  117. /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ncb.h */