收藏 分享(赏)

飞鸽传输IPMsg协议.txt

上传人:myw993772 文档编号:5238485 上传时间:2019-02-13 格式:TXT 页数:10 大小:21.88KB
下载 相关 举报
飞鸽传输IPMsg协议.txt_第1页
第1页 / 共10页
飞鸽传输IPMsg协议.txt_第2页
第2页 / 共10页
飞鸽传输IPMsg协议.txt_第3页
第3页 / 共10页
飞鸽传输IPMsg协议.txt_第4页
第4页 / 共10页
飞鸽传输IPMsg协议.txt_第5页
第5页 / 共10页
点击查看更多>>
资源描述

1、飞鸽传输IPMsg协议+翻译 声明:下述协议内容略去了一些在编写程序过程中没有用到协议内容,最初的Ipmsg协议是用日文写的,下面协议内容基于cugb_cat翻译自Mr.Kanazawa的英文文档。我(赵崇日)做一些补充说明:)。本翻译文档可任意传播和使用。-IP信使传输协议(第9版草案) 1996/02/212003/01/14 修订H.Shirouzushirouzuh.email.ne.jpYLT64-MKFFG-8A1DY-4M8ZK OR LCT4T-24GFE-A816V-4MTQQ -关于IP信使:IP信使使用TCP/UDP协议提供收发消息及文件(目录)。特性:IP信使能够安装在

2、任何一个安装了TCP/IP协议栈的操作系统上,使用在线用户的动态识别机制,可以和在线所有用户进行信息交换。运行机制介绍:使用TCP/UDP端口(默认端口为2425),消息的收发使用UDP协议,文件(文件夹)的收发使用TCP协议。1、 命令字:1) 基本命令字(32位命令字的低8位)IPMSG_NOOPERATION 不进行任何操作IPMSG_BR_ENTRY 用户上线(以广播方式 IPMSG_BR_EXIT 用户下线(以广播方式 IPMSG_ANSENTRY 用户上线 IPMSG_BR_ABSENCE 为 式 IPMSG_BR_ISGETLIST 有 的可以发 用户 的 IPMSG_OKGET

3、LIST 用户 IPMSG_GETLIST 用户 发 IPMSG_ANSLIST 用户 发 IPMSG_SENDMSG 发 消息IPMSG_RECVMSG 消息 IPMSG_READMSG 消息 IPMSG_DELMSG 消息 IPMSG_ANSREADMSG 消息 认 (version-8中 IPMSG_GETFILEDATA 文件传输 IPMSG_RELEASEFILES 文件IPMSG_GETDIRFILES currency1文件 IPMSG_GETINFO IPMSG版本信息IPMSG_SENDINFO 发 IPMSG版本信息IPMSG_GETABSENCEINFO 信息IPMSG_

4、SENDABSENCEINFO 发 信息IPMSG_GETPUBKEY RSA“IPMSG_ANSPUBKEY RSA“2) 位(32位命令字的fi24位)IPMSG_ABSENCEOPT 式(Member recognition command)IPMSG_SERVEROPT fl ( IPMSG_DIALUPOPT 发 个 Send individual member recognition commandIPMSG_SENDCHECKOPT 传 IPMSG_SECRETOPT 的消息IPMSG_READCHECKOPT 消息 (ver8中 )IPMSG_PASSWORDOPT IPMSG

5、_BROADCASTOPT 广播IPMSG_MULTICASTOPT 播IPMSG_NEWMUTIOPT ”版本的播( IPMSG_AUTORETOPT 自动 (Ping-pong protection)IPMSG_NOLOGOPT 没有日文件IPMSG_NOADDLISTOPT 不用户 Notice to the members outside of BR_ENTRYIPMSG_FILEATTACHOPT 文件IPMSG_ENCRYPTOPT IPMSG_NOPOPUPOPT (不有 IPMSG_RETRYOPT 发 (用于 用户 3) Extended code flag (hex for

6、mat combination)IPMSG_RSA_512IPMSG_RSA_1024IPMSG_RSA_2048IPMSG_RC2_40IPMSG_RC2_128IPMSG_RC2_256IPMSG_BLOWFISH_128IPMSG_BLOWFISH_256IPMSG_SIGN_MD54) Extended files for attachment (fileattr low 8 bits)IPMSG_FILE_REGULARIPMSG_FILE_DIRIPMSG_FILE_RETPARENTIPMSG_FILE_SYMLINKIPMSG_FILE_CDEVIPMSG_FILE_BDEVI

7、PMSG_FILE_FIFOIPMSG_FILE_RESFORK5) Attachment file extended attribute(fileattr high 24 bits)IPMSG_FILE_RONLYOPTIPMSG_FILE_HIDDENOPTIPMSG_FILE_EXHIDDENOPTIPMSG_FILE_ARCHIVEOPTIPMSG_FILE_SYSTEMOPT6) Extended file attribute for attachment fileIPMSG_FILE_UIDIPMSG_FILE_USERNAMEIPMSG_FILE_GIDIPMSG_FILE_GR

8、OUPNAMEIPMSG_FILE_PERMIPMSG_FILE_MAJORNOIPMSG_FILE_MINORNOIPMSG_FILE_CTIMEIPMSG_FILE_MTIMEIPMSG_FILE_ATIMEIPMSG_FILE_CREATETIMEIPMSG_FILE_CREATORIPMSG_FILE_FILETYPEIPMSG_FILE_FINDERINFOIPMSG_FILE_ACLIPMSG_FILE_ALIASFNAMEIPMSG_FILE_UNICODEFNAME2、 式(使用字):1) 式(版本1的式)版本(1):编:发 :发 机 :命令字:信息2) 下1:100:shir

9、ouzu:Jupiter:32:Hello”3、 述:1) 用户识别IPMSG 动,命令IPMSG_BR_ENTRY 广播到 中, 所有在线的用户提 一个”用户的到 ( 我 了 )。所有在线用户 ”上线用户到自 的用户 中, ”上线用户发 IPMSG_ANSENTRY命令( 我在线 )。”上线用户 收到IPMSG_ANSENTRY命令 在线用户到自 的用户 中。 IP 在所有用户可以 交。式 ,PMSG_BR_ABSENCE命令 所有用户广播。 ,IPMSG_ANSENTRY 命令不currency1于IPMSG_BR_ENTRY命令, 不 一个 消息。IPMSG_BR_ENTRY, IPMS

10、G_ANSENTRY, 和 IPMSG_BR_ABSENCE命令在 式下 使用IPMSG_ABSENCEOPT ,在命令 一个。IPMSG_DIALUPOPT 用于 些不能 广播系的用户。有个, 识别命令 发 些用户。(Extended group)IPMSG_BR_ENTRY 和IPMSG_BR_ABSENCE命令发 一个 是 过在 有的式 的字 面上个” 的。(在 有命令和扩展 之间入0 2) 收发消息使用IPMSG_SENDMSG命令发 消息,消息内容在信息中;在 收消息,果对方 信认(IPMSG_SENDCHECKOPT位 ),则 发 IPMSG_RECVMSG命令 对方发 的 的编放

11、在信息中一currency1发 至发 消息方。发 广播消息 使用IPMSG_BOADCASTOPT 和IPMSG_SENDMSG命令。自动发 ( 还上IPMSG_AUTORETOPT 以 到 - 护(for ping-pong protection 。果没有任何一个 , 么认/自动发 就没有 。(的IPMSG_NOADDLISTOPT 从一台机 到一个没有在你的发 / 中的IPMSG_SENDMSG,IPMsg发 一个IPMSG_BR_ENTRY命令 他的的机 到发 / 中。 , 避免single-shot消息的发 / 行为。 在IPMSG_SENDMSG命令上一个IPMSG_NOADDLIS

12、TOPT 。(version8 中的IPMSG_READCHECKOPT 一个IPMSG_READMSG命令含一个IPMSG_READCHECKOPT ;IPMsgIPMSG_SENDMSGcurrency1样 一个IPMSG_SENDCHECKOPT。但是,发 消息使用IPMSG_ANSREADMSG命令, 不是IPMSG_RECVMSG。3 收发消息|扩展(于第9版 使用Public-key(RSA)和common key(RC2/Blowfish)双。(区使用十六进制 (Public-key 发 IPMSG_GETPUBKEY 命令 到。 到的消息中有IPMSG_ANSPUBKEY,意味

13、 到了RSA的Public-key。IPMSG_GETPUBKEY/IPMSG_ANSPUBKEY都 长度值( IPMSG_RSA_1024 在扩展的第一部分使用OR 。另外,在IPMSG_ANSPUBKEY,public key 以种式 写:EE-NNNNNN E=Exponent丄N=method使用:分隔,在E和N之间输入分隔Fdelimiter -在第二次收发记住了public key和 ,个顺序可以略过。 (消息 发 创建了一个common key , 可以一个消息。另外, 的public keycommon key(消息传输 IPMSG_SENDMSG 使用IPMSG_ENCRYP

14、TOPT。在扩展的第一部分,输入值which is or resoult from Convination of public key and common key type。 使用 common key which encrypt with public key devide by :, 输入消息which iseccrypted by public key devide by :. If both supports IPMSG_SIGN_XXX, then add: and signeture.Also, In the method of encode padding, PKCS#1ECB

15、 key is used for RSA,PKCS#5 CBC common key is used for RC2/blowfish.Also, The Packet related to Entry manifestation the capability of ecryption support using IPMSG_ENCRYPTOPT4) 文件的扩充(于第9版)带有IPMSG_FILEATTACHOPT位的IPMSG_SENDMSG命令可用 传输文件,文件属性及内容在信息中,文件内容在消息内容 以0与之分隔 。传输文件以下信息 到消息内容之 (括式):文件序:文件 :大小(位:字节

16、):最 修 间:文件属性: 属性=val1,val2:信息=:a:文件序(文件大小、最 修 间和文件属性为十六进制 ,果文件 中含:则使用:”代替)。收端 始 收文件, 传输文件命令IPMSG_GETFILEDATA 发 到发 端的TCP端口(和UDP的发 端口 currency1), 发 端发 的编:文件序:偏移量(全为十六进制式)写到信息区一currency1发 ,文件发 端 收到 信息进行校 正 始发 文件(不使用任何式,亦不进行)。收端 收到目录文件, 发 信息区为发 端发 的编:文件序:偏移量(全为十六进制式)的 IPMSG_GETDIRFILES命令,以用 传输目录文件。发 端则

17、头信息长度:文件 :文件大小:文件属性:文件内容到信息区(除了文件 和文件内容外,其余皆为十六进制)。头信息长度是从头信息长度 始到文件内容前的:分割为止的字个 。扩展属性 忽略且使用个扩展属性。内容输入使用=。文件属性为IPMSG_FILE_DIR,IPMsg能够自动识别其为目录,下一个文件的 在 目录之 。文件属性为IPMSG_FILE_RETPARENT,IPMsg识别其动作为 上一目录,在种情况下,文件 为.其属性为 前目录的值。发 始于文件且 IPMSG_FILE_RETPARENT命令 目录。Entry一个IPMSG_FILEATTACHOPT 支持文件。5) 其他命令不curre

18、ncy1版本信息,发 IPMSG_GETINFO命令。 方在扩展信息区上版本信息 。发 IPMSG_GETABSENCEINFO命令 到 式的信息。果 方是在 式下,则发 IPMSG_SENDABSENCEINFO;果不是,则发 字“Not absence mode“。6) 认/发果IPMSG_SENDMSG 和 IPMSG_RECVMSG的认在一个设定的间内没有 , 就 发。发次 和间间隔依赖于 前条件。4、其他1 换行发 消息中换行是UNIX的类型(0x0a),果 可以 。2 分隔:你不能在用户 和机 中使用分隔:。果用户 /机 含了:, 用其他的替换,比;。使用分隔不是问题所在,可以创建

19、一个escape sequence。 /水平有限,仅作参考,有什么问题建议 系:IPMSG协议英文版:QUOTE:Original ipmsg protocol specification is written in Japanese.This document was translated by Mr.Kanazawa.This document is not verified yet.-IP Messenger communication protocol (Draft-9) 1996/02/21Modified 2003/01/14H.Shirouzushirouzuh.email.ne

20、.jp-About IP MessengerThis is a Send/Receive message service using the TCP/UDP Port.CharacteristicsIP Messenger can be installed in any OS if TCP/IP is used on your machine.Dynamic member recognition can be done within your network or specified network.You can exchange messages between all IPMsg mem

21、bers.Function descriptionUse TCP/UDP port(default:2425). See the following descriptions(Message Send/Receive: UDP, File Send/Receive: TCP)1. Command1) Command functions (Low 8 bits from command number 32 bits)IPMSG_NOOPERATION No OperationIPMSG_BR_ENTRY Entry to service (Start-up with a Broadcast co

22、mmand)IPMSG_BR_EXIT Exit from service (End with a Broadcast command)IPMSG_ANSENTRY Notify a new entryIPMSG_BR_ABSENCE Change absence modeIPMSG_BR_ISGETLIST Search valid sending host membersIPMSG_OKGETLIST Host list sending noticeIPMSG_GETLIST Host list sending requestIPMSG_ANSLIST Host list sendingI

23、PMSG_SENDMSG Message transmissionIPMSG_RECVMSG Message receiving checkIPMSG_READMSG Message open noticeIPMSG_DELMSG Message discarded noticeIPMSG_ANSREADMSG Message open confirmation notice(added from version-8 )IPMSG_GETFILEDATA File Transfer request by TCPIPMSG_RELEASEFILES Discard attachment file

24、IPMSG_GETDIRFILES Attachment hierarchical file requestIPMSG_GETINFO Get IPMSG version info.IPMSG_SENDINFO Send IPMSG version info.IPMSG_GETABSENCEINFO Get absence sentenceIPMSG_SENDABSENCEINFO Send absence sentenceIPMSG_GETPUBKEY RSA Public Key AcquisitionIPMSG_ANSPUBKEY RSA Public Key Response2) Op

25、tion flag (High 24 bits from command number 32 bits)IPMSG_ABSENCEOPT Absence mode(Member recognition command)IPMSG_SERVEROPT Server(Reserved)IPMSG_DIALUPOPT Send individual member recognition commandIPMSG_SENDCHECKOPT Transmission checkIPMSG_SECRETOPT Sealed messageIPMSG_READCHECKOPT Sealed message

26、check(added from ver8 )IPMSG_PASSWORDOPT LockIPMSG_BROADCASTOPT Broadcast messageIPMSG_MULTICASTOPT Multi-cast(Multiple casts selection)IPMSG_NEWMUTIOPT New version multi-cast(reserved)IPMSG_AUTORETOPT Automatic response(Ping-pong protection)IPMSG_NOLOGOPT No log filesIPMSG_NOADDLISTOPT Notice to th

27、e members outside of BR_ENTRYIPMSG_FILEATTACHOPT File attachmentIPMSG_ENCRYPTOPT CodeIPMSG_NOPOPUPOPT (No longer valid)IPMSG_RETRYOPT Re-send flag(Use when acquiring HOSTLIST)3) Extended code flag (hex format combination)IPMSG_RSA_512IPMSG_RSA_1024IPMSG_RSA_2048IPMSG_RC2_40IPMSG_RC2_128IPMSG_RC2_256

28、IPMSG_BLOWFISH_128IPMSG_BLOWFISH_256IPMSG_SIGN_MD54) Extended files for attachment (fileattr low 8 bits)IPMSG_FILE_REGULARIPMSG_FILE_DIRIPMSG_FILE_RETPARENTIPMSG_FILE_SYMLINKIPMSG_FILE_CDEVIPMSG_FILE_BDEVIPMSG_FILE_FIFOIPMSG_FILE_RESFORK5) Attachment file extended attribute(fileattr high 24 bits)IPM

29、SG_FILE_RONLYOPTIPMSG_FILE_HIDDENOPTIPMSG_FILE_EXHIDDENOPTIPMSG_FILE_ARCHIVEOPTIPMSG_FILE_SYSTEMOPT6) Extended file attribute for attachment fileIPMSG_FILE_UIDIPMSG_FILE_USERNAMEIPMSG_FILE_GIDIPMSG_FILE_GROUPNAMEIPMSG_FILE_PERMIPMSG_FILE_MAJORNOIPMSG_FILE_MINORNOIPMSG_FILE_CTIMEIPMSG_FILE_MTIMEIPMSG

30、_FILE_ATIMEIPMSG_FILE_CREATETIMEIPMSG_FILE_CREATORIPMSG_FILE_FILETYPEIPMSG_FILE_FINDERINFOIPMSG_FILE_ACLIPMSG_FILE_ALIASFNAMEIPMSG_FILE_UNICODEFNAME2.Command format(Use all character strings)1) Command(Format version-1)Ver(1) : PacketNo : SenderName : SenderHost : CommandNo : AdditionalSection2) An

31、example for Message Send/Receive by using the current command format“1:100:shirouzu:jupiter:32:Hello“3.Command process overview1) Member recognitionAn IPMSG_BR_ENTRY command notifies a new entry to the currentmembers at start-up.All members add the new member to their list after getting a notificati

32、on message.An IPMSG_ANSENTRY command sends a message back to the new member.The new member gets the current member data by aIPMSG_ANSENTRY command. All members can communicate as long as anIP packet exists.An IPMSG_BR_ABSENCE command broadcasts absence mode cancel ornickname change to all members. H

33、owever, an IPMSG_ANSENTRY commanddoes not send a message back, which is different from an IPMSG_BR_ENTRYcommand.IPMSG_BR_ENTRY, IPMSG_ANSENTRY, and IPMSG_BR_ABSENCE commandsuse an IPMSG_ABSENCEOPT flag for absence mode. Input a nickname toadditional command.Add an IPMSG_DIALUPOPT flag for dial-up us

34、ers who cant be reached bya broadcast command. A member recognition command needs to besent individually to the members with this optional flag.(Extended group)IPMSG_BR_ENTRY and IPMSG_BR_ABSENCE commandssends a group name by adding the new group name after the currentcommand format character string

35、s (Input 0 between the currentcommand and extended name).2) Send/Receive MessageSend Message uses an IPMSG_SENDMSG command that can input a messagein the extended area.Receive Message sends back an IPMSG_RECVMSG command onlyif an IPMSG_SENDCHECKOPT flag is ON. Input the original packet numberto the

36、extended area.Broadcast Message Send uses an IPMSG_BOADCASTOPT commandand an IPMSG_SENDMSG flag should be ON.Auto-Send packet(absence notice) needs to be added to IPMSG_AUTORETOPTfor ping-pong protection. If either one or another packet is ON, thenconfirmation/auto-send packet is not sent back.Send

37、Message Sealing needs to be an IPMSG_SECRETOPT packet ON.In this case, Receive Message sends an IPMSG_READMSG command.Input the original packet number to the extended area.(Additional IPMSG_NOADDLISTOPT)When receiving an IPMSG_SENDMSG packet from a host that isnot on your Send/Receive list, IPMsg wi

38、ll either confirm a host bysending an IPMSG_BR_ENTRY command or add a host name tothe Send/Receive list.However, single-shot Message Send/Receive action needs to be avoided.Add an IPMSG_NOADDLISTOPT flag to an IPMSG_SENDMSG command.(Additional IPMSG_READCHECKOPT from version-8 )When an IPMSG_READMSG

39、 command contains an IPMSG_READCHECKOPT flag,IPMsg process is the same as IPMSG_SENDMSG with anIPMSG_SENDCHECKOPT flag.However, Send Message uses an IPMSG_ANSREADMSG command,not IPMSG_RECVMSG.3) Message Send/Receive 亅encrypted extension (Added in the version-9 )Use the combination of Public-key(RSA)

40、 and common key(RC2/Blowfish).(Encrypted extension area is used in hex format.)(Public key acquisition)Send an IPMSG_GETPUBKEY command to ReceiveMessage. Receive Message gets an IPMSG_ANSPUBKEY thatmeans receiving RSA public key from Send Message.IPMSG_GETPUBKEY/IPMSG_ANSPUBKEY both require the valu

41、e which isencryption capability (Exp. IPMSG_RSA_1024) flag uses “OR“ at firstpart of extensionIn addition, In IPMSG_ANSPUBKEY, public key written as EE-NNNNNNE=Exponent丄N=method)devide by :. and Input the Fdelimiter -between E and N.This sequence can be skipped after the 2nd Send/Receive process bym

42、emorizing public key and encrypted data.(Encrypted message)After a sender creates a common key that issupported both sender and receiver, a common key can encrypt a message.In addition, a receivers public key encrypts the common key.(Encrypted message transmission) IPMSG_ENCRYPTOPT is used inIPMSG_S

43、ENDMSG. At the first part of extension, input the value whichis or resoult from Convination of public key and common key type .Then use common key which encrypt with public key devide by :.Then input message which is eccrypted by public key devide by :.If both supports IPMSG_SIGN_XXX, then add : and

44、 signeture.Also, In the method of encode padding, PKCS#1ECB key is used for RSA,PKCS#5 CBC common key is used for RC2/blowfish.Also, The Packet related to Entry manifestation the capability ofecryption support using IPMSG_ENCRYPTOPT4) Extension with file attachment(Available from version-9 )An IPMSG

45、_SENDMSG command with an IPMSG_FILEATTACHOPT flag forFile transfer (download permission)notification sends a messagewith attachment.Input 0 after the message and attachment file data.fileID:filename:size:mtime:fileattr:extend-attr=val1,val2.:extend-attr2=.:a:fileID.(size, mtime, and fileattr describ

46、e hex format.If a filename contains :, please replace with “:“.)When Receive Message downloads an attachment file, an IPMSG_GETFILEDATAcommand requests a data transmission packet to the TCP port that is the samenumberas the UDP sending port number. Input packetID:fileID: offset to the extended area.(Use all hex format.)File Transfer side receives the request. After recognizing that its a correct request,then send the specified data (no format)When the data receiving side downloads a hierarchical a

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 实用文档 > 事务文书

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报