2020年3月8日日曜日

【オブジェクト構造検討】IP Messenger Protocol(Draft14版 Ver4.99)【What is IPMSG】

IP Messenger Protocolを解析中。
以下備忘録。
本家はVisual C++で実装。

オブジェクト構造検討 Consider the Object Sstructure

Struct PacketRaw
Versionnumeric 32bit
PacketNonumeric unsigned 32bit
User NameString(Must Be ASCII)
Can not include :0x3a\n0x0anull0x00を含んではいけない。
制御文字を禁止とするのが無難。Better to disable control characters.
送受信時に制御文字をトリムする。Remove control characters when send and receive.
HostNameString(Must Be ASCII)
Can not include :0x3a\n0x0anull0x00を含んではいけない。
制御文字を禁止とするのが無難。Better to disable control characters.
送受信時に制御文字をトリムする。Remove control characters when send and receive.
Commandnumeric unsigned 32bit
下位8bit:モード lower nibble 8bit (bits 1~8)
上位24bit:オプション higher nibble 24bit (bits 9~32)
DataString
Can not include null0x00を含んではいけない。
ExData1String
Can not include null0x00を含んではいけない。その他禁止文字については各コマンド&オプション依存。There are other forbidden characters by the command.
ExData2String
Can not include null0x00を含んではいけない。その他禁止文字については各コマンド&オプション依存。There are other forbidden characters by the command.



Struct UserInfo
User NameString(ASCII recommended推奨)
Can not include :0x3a\n0x0anull0x00を含んではいけない。
制御文字を禁止とするのが無難。Better to disable control characters.
送受信時に制御文字をトリムする。Remove control characters when send and receive.
HostNameString(ASCII recommended推奨)
Can not include :0x3a\n0x0anull0x00を含んではいけない。
制御文字を禁止とするのが無難。Better to disable control characters.
送受信時に制御文字をトリムする。Remove control characters when send and receive.
NickNameString
Can not include :0x3a\n0x0anull0x00を含んではいけない。
制御文字を禁止とするのが無難。Better to disable control charaters.
送受信時に制御文字をトリムする。Remove control characters when send and receive.
本家フォーマット: ユーザ名+"[出家]"
Unwritten format: userName+"[overview of reason for absence]"
不在情報(不在理由概要)を付加するため、別途不在タイプ一覧が必要。
BR系パケットでのみ使用。
GroupNameString
Can not include :0x3a\n0x0anull0x00を含んではいけない。
制御文字を禁止とするのが無難。Better to disable control charaters.
送受信時に制御文字をトリムする。Remove control characters when send and receive.
BR系パケットでのみ使用。



Struct Status ( User and Client Status )
AbsenceMode
※User status
boolean
ユーザが不在。User is absence.
Server
※Client status ?
boolean
Client is Server. But I don't know the "IP Messenger Server".
Dialup
※Network status
boolean
Client is Dial-up.
DirMaster
※Client status
boolean
Client is Member-Master Mode.
CapabilityFileAttach
※Client status
boolean
Supports attached file data. File share to.
CapabilityClipBoardAttach
※Client status
boolean
Supports attached ClipBoard(in memory) data. memory data is unsaved data.
CapabilityUTF8
※Client status
boolean
Supports UTF8 charaset packet.
CapabilityEncrypt
※Client status
boolean
Supports encryption.
CapabilityExtraMessage
※Client status
boolean
Supports encrypted ExData1-2 Section. "Data{\0[ExData1][\0ExData2]}" to encrypt.
CapabilityFileEncrypt
※Client status
boolean
Supports encrypted TCP file packet.
CapabilityIPDict
※Client status
boolean
Supports IP Messenger Communication Protocol version 3.0



Absence List Item of Struct AbsenceType ( On the Application )
AbsenceTextString
不在理由概要。Overview of reason for absence.
Can not include :0x3a\n0x0anull0x00を含んではいけない。
制御文字を禁止とするのが無難。Better to disable control characters.
AbsenceInfoString
不在理由。Reason for absence.
For IPMSG_SENDABSENCEINFO
null0x00を含んではいけない。
改行以外の制御文字を禁止とするのが無難。Better to disable control characters other than line break.



Struct AppVersion
Typenumeric unsigned 32bit

ipmsg.h(Ver4.50)
IPMSG_VER_WIN32_TYPE = 0x00010001
IPMSG_VER_WIN64_TYPE = 0x00010002
IPMSG_VER_MAC_TYPE = 0x00020000
IPMSG_VER_IOS_TYPE = 0x00030000
IPMSG_VER_ANDROID_TYPE = 0x00040000
Majornumeric unsigned 16bit

ex) "4.99r3" = 4
Minornumeric unsigned 16bit

ex) "4.99r3" = 99
Revisionnumeric unsigned 16bit

ex) "4.99r3" = 3



執筆中…

【IPMSG_PASSWORDOPTとは】IP Messenger Protocol(Draft14版 Ver4.99)【What is IPMSG】

IP Messenger Protocolを解析中。
以下備忘録。
本家はVisual C++で実装。

IPMSG_PASSWORDOPTとは

IP メッセンジャーアプリ内で届いたメッセージの開封をパスワードでロックする機能。
IP Messenger Protocol上のIPMSG_SENDMSGコマンドのオプションとしてIPMSG_PASSWORDOPTを設定することができる。

送る側がパスワードを設定するわけでも、パスワードをキーに暗号化されるわけでもない。
アプリ上で自分で設定したパスワードで、開封操作をする仕組み。

メッセージ受信時の動作は、クライアント側に一任した方がセキュリティ上のリスクが小さい(?)ためかデフォルトで使用不可に設定されている。