ipmsg.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /* @(#)Copyright (C) H.Shirouzu 1996-2004 ipmsg.h Ver2.05 */
  2. /* ========================================================================
  3. Project Name : IP Messenger for Win32
  4. Module Name : Main Header
  5. Create : 1996-06-01(Sat)
  6. Update : 2004-01-01(Thu)
  7. Copyright : H.Shirouzu
  8. Reference :
  9. ======================================================================== */
  10. #ifndef IPMSG_H
  11. #define IPMSG_H
  12. #include <time.h>
  13. /* IP Messenger Communication Protocol version 1.2 define */
  14. /* macro */
  15. #define GET_MODE(command) (command & 0x000000ffUL)
  16. #define GET_OPT(command) (command & 0xffffff00UL)
  17. /* header */
  18. #define IPMSG_VERSION 0x0001
  19. #define IPMSG_DEFAULT_PORT 0x0979
  20. /* command */
  21. #define IPMSG_NOOPERATION 0x00000000UL
  22. #define IPMSG_BR_ENTRY 0x00000001UL
  23. #define IPMSG_BR_EXIT 0x00000002UL
  24. #define IPMSG_ANSENTRY 0x00000003UL
  25. #define IPMSG_BR_ABSENCE 0x00000004UL
  26. #define IPMSG_BR_ISGETLIST 0x00000010UL
  27. #define IPMSG_OKGETLIST 0x00000011UL
  28. #define IPMSG_GETLIST 0x00000012UL
  29. #define IPMSG_ANSLIST 0x00000013UL
  30. #define IPMSG_BR_ISGETLIST2 0x00000018UL
  31. #define IPMSG_SENDMSG 0x00000020UL
  32. #define IPMSG_RECVMSG 0x00000021UL
  33. #define IPMSG_READMSG 0x00000030UL
  34. #define IPMSG_DELMSG 0x00000031UL
  35. #define IPMSG_ANSREADMSG 0x00000032UL
  36. #define IPMSG_GETINFO 0x00000040UL
  37. #define IPMSG_SENDINFO 0x00000041UL
  38. #define IPMSG_GETABSENCEINFO 0x00000050UL
  39. #define IPMSG_SENDABSENCEINFO 0x00000051UL
  40. #define IPMSG_GETFILEDATA 0x00000060UL
  41. #define IPMSG_RELEASEFILES 0x00000061UL
  42. #define IPMSG_GETDIRFILES 0x00000062UL
  43. #define IPMSG_GETPUBKEY 0x00000072UL
  44. #define IPMSG_ANSPUBKEY 0x00000073UL
  45. /* option for all command */
  46. #define IPMSG_ABSENCEOPT 0x00000100UL
  47. #define IPMSG_SERVEROPT 0x00000200UL
  48. #define IPMSG_DIALUPOPT 0x00010000UL
  49. #define IPMSG_FILEATTACHOPT 0x00200000UL
  50. #define IPMSG_ENCRYPTOPT 0x00400000UL
  51. /* option for send command */
  52. #define IPMSG_SENDCHECKOPT 0x00000100UL
  53. #define IPMSG_SECRETOPT 0x00000200UL
  54. #define IPMSG_BROADCASTOPT 0x00000400UL
  55. #define IPMSG_MULTICASTOPT 0x00000800UL
  56. #define IPMSG_NOPOPUPOPT 0x00001000UL
  57. #define IPMSG_AUTORETOPT 0x00002000UL
  58. #define IPMSG_RETRYOPT 0x00004000UL
  59. #define IPMSG_PASSWORDOPT 0x00008000UL
  60. #define IPMSG_NOLOGOPT 0x00020000UL
  61. #define IPMSG_NEWMUTIOPT 0x00040000UL
  62. #define IPMSG_NOADDLISTOPT 0x00080000UL
  63. #define IPMSG_READCHECKOPT 0x00100000UL
  64. #define IPMSG_SECRETEXOPT (IPMSG_READCHECKOPT|IPMSG_SECRETOPT)
  65. /* encryption flags for encrypt command */
  66. #define IPMSG_RSA_512 0x00000001UL
  67. #define IPMSG_RSA_1024 0x00000002UL
  68. #define IPMSG_RSA_2048 0x00000004UL
  69. #define IPMSG_RC2_40 0x00001000UL
  70. #define IPMSG_RC2_128 0x00004000UL
  71. #define IPMSG_RC2_256 0x00008000UL
  72. #define IPMSG_BLOWFISH_128 0x00020000UL
  73. #define IPMSG_BLOWFISH_256 0x00040000UL
  74. #define IPMSG_SIGN_MD5 0x10000000UL
  75. /* compatibilty for Win beta version */
  76. #define IPMSG_RC2_40OLD 0x00000010UL // for beta1-4 only
  77. #define IPMSG_RC2_128OLD 0x00000040UL // for beta1-4 only
  78. #define IPMSG_BLOWFISH_128OLD 0x00000400UL // for beta1-4 only
  79. #define IPMSG_RC2_40ALL (IPMSG_RC2_40|IPMSG_RC2_40OLD)
  80. #define IPMSG_RC2_128ALL (IPMSG_RC2_128|IPMSG_RC2_128OLD)
  81. #define IPMSG_BLOWFISH_128ALL (IPMSG_BLOWFISH_128|IPMSG_BLOWFISH_128OLD)
  82. /* file types for fileattach command */
  83. #define IPMSG_FILE_REGULAR 0x00000001UL
  84. #define IPMSG_FILE_DIR 0x00000002UL
  85. #define IPMSG_FILE_RETPARENT 0x00000003UL // return parent directory
  86. #define IPMSG_FILE_SYMLINK 0x00000004UL
  87. #define IPMSG_FILE_CDEV 0x00000005UL // for UNIX
  88. #define IPMSG_FILE_BDEV 0x00000006UL // for UNIX
  89. #define IPMSG_FILE_FIFO 0x00000007UL // for UNIX
  90. #define IPMSG_FILE_RESFORK 0x00000010UL // for Mac
  91. /* file attribute options for fileattach command */
  92. #define IPMSG_FILE_RONLYOPT 0x00000100UL
  93. #define IPMSG_FILE_HIDDENOPT 0x00001000UL
  94. #define IPMSG_FILE_EXHIDDENOPT 0x00002000UL // for MacOS X
  95. #define IPMSG_FILE_ARCHIVEOPT 0x00004000UL
  96. #define IPMSG_FILE_SYSTEMOPT 0x00008000UL
  97. /* extend attribute types for fileattach command */
  98. #define IPMSG_FILE_UID 0x00000001UL
  99. #define IPMSG_FILE_USERNAME 0x00000002UL // uid by string
  100. #define IPMSG_FILE_GID 0x00000003UL
  101. #define IPMSG_FILE_GROUPNAME 0x00000004UL // gid by string
  102. #define IPMSG_FILE_PERM 0x00000010UL // for UNIX
  103. #define IPMSG_FILE_MAJORNO 0x00000011UL // for UNIX devfile
  104. #define IPMSG_FILE_MINORNO 0x00000012UL // for UNIX devfile
  105. #define IPMSG_FILE_CTIME 0x00000013UL // for UNIX
  106. #define IPMSG_FILE_MTIME 0x00000014UL
  107. #define IPMSG_FILE_ATIME 0x00000015UL
  108. #define IPMSG_FILE_CREATETIME 0x00000016UL
  109. #define IPMSG_FILE_CREATOR 0x00000020UL // for Mac
  110. #define IPMSG_FILE_FILETYPE 0x00000021UL // for Mac
  111. #define IPMSG_FILE_FINDERINFO 0x00000022UL // for Mac
  112. #define IPMSG_FILE_ACL 0x00000030UL
  113. #define IPMSG_FILE_ALIASFNAME 0x00000040UL // alias fname
  114. #define IPMSG_FILE_UNICODEFNAME 0x00000041UL // UNICODE fname
  115. #define FILELIST_SEPARATOR '\a'
  116. #define HOSTLIST_SEPARATOR '\a'
  117. #define HOSTLIST_DUMMY "\b"
  118. /* end of IP Messenger Communication Protocol version 1.2 define */
  119. /* IP Messenger for Windows internal define */
  120. #define IPMSG_REVERSEICON 0x0100
  121. #define IPMSG_TIMERINTERVAL 500
  122. #define IPMSG_ENTRYMINSEC 5
  123. #define IPMSG_GETLIST_FINISH 0
  124. #define IPMSG_BROADCAST_TIMER 0x0101
  125. #define IPMSG_SEND_TIMER 0x0102
  126. #define IPMSG_LISTGET_TIMER 0x0104
  127. #define IPMSG_LISTGETRETRY_TIMER 0x0105
  128. #define IPMSG_ENTRY_TIMER 0x0106
  129. #define IPMSG_DUMMY_TIMER 0x0107
  130. #define IPMSG_RECV_TIMER 0x0108
  131. #define IPMSG_ANS_TIMER 0x0109
  132. #define IPMSG_NICKNAME 1
  133. #define IPMSG_FULLNAME 2
  134. #define IPMSG_NAMESORT 0x00000000
  135. #define IPMSG_IPADDRSORT 0x00000001
  136. #define IPMSG_HOSTSORT 0x00000002
  137. #define IPMSG_NOGROUPSORTOPT 0x00000100
  138. #define IPMSG_ICMPSORTOPT 0x00000200
  139. #define IPMSG_NOKANJISORTOPT 0x00000400
  140. #define IPMSG_ALLREVSORTOPT 0x00000800
  141. #define IPMSG_GROUPREVSORTOPT 0x00001000
  142. #define IPMSG_SUBREVSORTOPT 0x00002000
  143. #endif