青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

<2025年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

統(tǒng)計

  • 隨筆 - 21
  • 文章 - 0
  • 評論 - 2
  • 引用 - 0

常用鏈接

留言簿

隨筆分類

隨筆檔案

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

飛鴿協(xié)議以及其使用的UDP數(shù)據(jù)包格式和文件傳輸邏輯

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/21

                                                Modified 2003/01/14

 

                                                       H.Shirouzu

                                               shirouzu@h.email.ne.jp

----------------------------------------------------------------------

 

About IP Messenger

         This is a Send/Receive message service using the TCP/UDP Port.

 

Characteristics

         IP 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 members.

 

Function description

         Use TCP/UDP port(default:2425). See the following descriptions

         (Message Send/Receive: UDP, File Send/Receive: TCP)

 

  1. Command

 

     1) Command functions (Low 8 bits from command number 32 bits)

 

         IPMSG_NOOPERATION   No Operation

         IPMSG_BR_ENTRY           Entry to service (Start-up with a Broadcast command)

         IPMSG_BR_EXIT                Exit from service (End with a Broadcast command)

         IPMSG_ANSENTRY           Notify a new entry

         IPMSG_BR_ABSENCE      Change absence mode

 

         IPMSG_BR_ISGETLIST     Search valid sending host members

         IPMSG_OKGETLIST           Host list sending notice

         IPMSG_GETLIST                Host list sending request

         IPMSG_ANSLIST                Host list sending

 

         IPMSG_SENDMSG            Message transmission

         IPMSG_RECVMSG            Message receiving check

 

         IPMSG_READMSG            Message open notice

         IPMSG_DELMSG               Message discarded notice

         IPMSG_ANSREADMSG    Message open confirmation notice(added from version-8)

 

         IPMSG_GETFILEDATA      File Transfer request by TCP

         IPMSG_RELEASEFILES      Discard attachment file

         IPMSG_GETDIRFILES       Attachment hierarchical file request

 

         IPMSG_GETINFO               Get IPMSG version info.

         IPMSG_SENDINFO            Send IPMSG version info.

 

         IPMSG_GETABSENCEINFO       Get absence sentence

         IPMSG_SENDABSENCEINFO    Send absence sentence

 

         IPMSG_GETPUBKEY                  RSA Public Key Acquisition

         IPMSG_ANSPUBKEY                  RSA Public Key Response

 

     2) Option 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 command

 

         IPMSG_SENDCHECKOPT Transmission check

         IPMSG_SECRETOPT                   Sealed message

         IPMSG_READCHECKOPT Sealed message check(added from ver8)

         IPMSG_PASSWORDOPT   Lock

         IPMSG_BROADCASTOPT          Broadcast message

         IPMSG_MULTICASTOPT  Multi-cast(Multiple casts selection)

         IPMSG_NEWMUTIOPT    New version multi-cast(reserved)

         IPMSG_AUTORETOPT      Automatic response(Ping-pong protection)

         IPMSG_NOLOGOPT          No log files

         IPMSG_NOADDLISTOPT  Notice to the members outside of BR_ENTRY

 

         IPMSG_FILEATTACHOPT File attachment

         IPMSG_ENCRYPTOPT      Code

 

         IPMSG_NOPOPUPOPT     (No longer valid)

         IPMSG_RETRYOPT            Re-send flag(Use when acquiring HOSTLIST)

 

     3) Extended code flag (hex format combination)

 

         IPMSG_RSA_512

         IPMSG_RSA_1024

         IPMSG_RSA_2048

         IPMSG_RC2_40

         IPMSG_RC2_128

         IPMSG_RC2_256

         IPMSG_BLOWFISH_128

         IPMSG_BLOWFISH_256

         IPMSG_SIGN_MD5

 

     4) Extended files for attachment (fileattr low 8 bits)

 

         IPMSG_FILE_REGULAR

         IPMSG_FILE_DIR

         IPMSG_FILE_RETPARENT

         IPMSG_FILE_SYMLINK

         IPMSG_FILE_CDEV

         IPMSG_FILE_BDEV

         IPMSG_FILE_FIFO

         IPMSG_FILE_RESFORK

 

     5) Attachment file extended attribute(fileattr high 24 bits)

 

         IPMSG_FILE_RONLYOPT

         IPMSG_FILE_HIDDENOPT

         IPMSG_FILE_EXHIDDENOPT

         IPMSG_FILE_ARCHIVEOPT

         IPMSG_FILE_SYSTEMOPT

 

     6) Extended file attribute for attachment file

 

         IPMSG_FILE_UID

         IPMSG_FILE_USERNAME

         IPMSG_FILE_GID

         IPMSG_FILE_GROUPNAME

         IPMSG_FILE_PERM

         IPMSG_FILE_MAJORNO

         IPMSG_FILE_MINORNO

         IPMSG_FILE_CTIME

         IPMSG_FILE_MTIME

         IPMSG_FILE_ATIME

         IPMSG_FILE_CREATETIME

 

         IPMSG_FILE_CREATOR

         IPMSG_FILE_FILETYPE

         IPMSG_FILE_FINDERINFO

 

         IPMSG_FILE_ACL

         IPMSG_FILE_ALIASFNAME

         IPMSG_FILE_UNICODEFNAME

 

 

  2.Command format(Use all character strings)

 

     1) Command(Format version-1)

 

         Ver(1) : PacketNo : SenderName : SenderHost : CommandNo : AdditionalSection

 

     2) An example for Message Send/Receive by using the current command format

 

         "1:100:shirouzu:jupiter:32:Hello"

 

 

  3.Command process overview

 

     1) Member recognition

 

         An IPMSG_BR_ENTRY command notifies a new entry to the current

         members at start-up.

 

         All members add the new member to their list after getting a notification message.

         An IPMSG_ANSENTRY command sends a message back to the new member.

 

         The new member gets the current member data by a

         IPMSG_ANSENTRY command. All members can communicate as long as an

         IP packet exists.

 

         An IPMSG_BR_ABSENCE command broadcasts absence mode cancel or

         nickname change to all members. However, an IPMSG_ANSENTRY command

         does not send a message back, which is different from an IPMSG_BR_ENTRY

         command.

 

         IPMSG_BR_ENTRY, IPMSG_ANSENTRY, and IPMSG_BR_ABSENCE commands

         use an IPMSG_ABSENCEOPT flag for absence mode. Input a nickname to

         additional command.

         Add an IPMSG_DIALUPOPT flag for dial-up users who can't be reached by

         a broadcast command.  A member recognition command needs to be

         sent individually to the members with this optional flag.

 

         (Extended group)IPMSG_BR_ENTRY and IPMSG_BR_ABSENCE commands

         sends a group name by adding the new group name after the current

         command format character strings (Input '\0' between the current

         command and extended name).

 

     2) Send/Receive Message

         Send Message uses an IPMSG_SENDMSG command that can input a message

         in the extended area.

         Receive Message sends back an IPMSG_RECVMSG command only

         if an IPMSG_SENDCHECKOPT flag is ON. Input the original packet number

         to the extended area.

 

         Broadcast Message Send uses an IPMSG_BOADCASTOPT command

         and an IPMSG_SENDMSG flag should be ON.

         Auto-Send packet(absence notice) needs to be added to IPMSG_AUTORETOPT

         for ping-pong protection. If either one or another packet is ON, then

         confirmation/auto-send packet is not sent back.

 

         Send 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 is

         not on your Send/Receive list, IPMsg will either confirm a host by

         sending an IPMSG_BR_ENTRY command or add a host name to

         the 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 command contains an IPMSG_READCHECKOPT flag,

         IPMsg process is the same as IPMSG_SENDMSG with an

         IPMSG_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) and common key(RC2/Blowfish).

         (Encrypted extension area is used in hex format.)

 

         (Public key acquisition)Send an IPMSG_GETPUBKEY command to Receive

         Message. Receive Message gets an IPMSG_ANSPUBKEY that

         means receiving RSA public key from Send Message.

 

         IPMSG_GETPUBKEY/IPMSG_ANSPUBKEY both require the value which is

         encryption capability (Exp. IPMSG_RSA_1024) flag uses "OR" at first

         part of extension 

 

         In addition, In IPMSG_ANSPUBKEY, public key written as EE-NNNNNN

         E=ExponentN=method)devide by ':'. and Input the Fdelimiter '-'

         between E and N.

 

         This sequence can be skipped after the 2nd Send/Receive process by

         memorizing public key and encrypted data.

        

         (Encrypted message)After a sender creates a common key that is

         supported both sender and receiver, a common key can encrypt a message.

         In addition, a receiver's public key encrypts the common key.

 

 

         (Encrypted message transmission) IPMSG_ENCRYPTOPT is used in

         IPMSG_SENDMSG. At the first part of extension, input the value which

         is '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 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 of

         ecryption support using  IPMSG_ENCRYPTOPT

 

     4) Extension with file attachment(Available from version-9)

 

         An IPMSG_SENDMSG command with an IPMSG_FILEATTACHOPT flag for

         File transfer (download permission)notification sends a message

         with 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 describe hex format.

          If a filename contains ':', please replace with "::".)

 

         When Receive Message downloads an attachment file, an IPMSG_GETFILEDATA

         command requests a data transmission packet to the TCP port that is the same number 

         as 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 it's a correct request,

         then send the specified data (no format)

 

         When the data receiving side downloads a hierarchical attachment file,

         use an IPMSG_GETDIRFILES command and input a packetID:fileID

         to the extended area and send a data transmission request packet.

         (all hex format)

 

         Data sending side sends the following hierarchical data format.

         header-size:filename:file-size:fileattr[:extend-attr=val1

         [,val2...][:extend-attr2=...]]:contents-data

         Next headersize: Next filename...

         (All hex format except for filename and contetns-data)

 

         header-size is from the beginning of header-size to the delimiter ':'

         that is before contents-data. extend-attr can be omitted and used multiple

         extended attributes. Use '=' for data input.

 

         When fileattr is IPMSG_FILE_DIR, IPMsg recognizes that it is automatically

         in the directory, the next file data is after the directory.

 

         When fileattr is IPMSG_FILE_RETPARENT, IMPsg recognizes that it returns

         to the parent directory. In this case, File name is always "." and the attribute

         value is the current directory data.

 

         Sending process starts from the attachment directly and returns the

         IPMSG_FILE_RETPARENT command to the attachment directory.

 

         Add an IPMSG_FILEATTACHOPT flag for an Entry packet to support the

         attachment file.

 

     5) Other commands

 

         When acquiring different versions, send an IPMSG_GETINFO command.

         Receiving side sends the version information character string to

         extended area.

 

         Send an IPMSG_GETABSENCEINFO command for acquiring an absence message.

         Receiving side sends an IPMSG_SENDABSENCEINFO back if the status is absence mode.

         If the status is not absence mode, a character string "Not absence mode" will be sent back.

 

     6) Confirmation/Retry

 

         If a confirmation packet for IPMSG_SENDMSG or IPMSG_RECVMSG is not delivered

         within a specified time, then it will be sent again.

         A number of retry actions or interval period is depended on the current condition.

 

 

  4. Other

 

     1) Linefeed

 

         Linefeed characters in Send Message is standardized with UNIX type ('0x0a').

         Please change if needed.

 

     2) Delimiter ':'

 

         ':' is used as a delimiter. You can't use this delimiter for user name

         and host name.

         If the use/host names contain a ':', please replace with another sign,

         for an example ';'.

         Although using this delimiter isn't problem as yet, I may create an

         escape sequence.

        

 

     3) Kanji codes

 

         SJIS

 

 

  5. Contact e-mail address

 

         E-Mail shirouzu@h.email.ne.jp

 

 

Note

         See ipmsg.h for command codes.

         Please e-mail me your comments and suggestions.

 

 

 

Ipmsg里面UDP使用的數(shù)據(jù)包是下面msgMng的結(jié)構(gòu)組成

msgMng數(shù)據(jù)包格式:

1 程序版本號

2數(shù)據(jù)包序列號

3用戶名

4主機(jī)名5

5命令

6消息內(nèi)容

7 額外數(shù)據(jù)

 

15的內(nèi)容是以“:”為分隔符,消息和額外數(shù)據(jù)以數(shù)據(jù)“0“分隔

 

 

 

發(fā)送文件的整個邏輯過程:

 

1發(fā)送端發(fā)送一個UDP數(shù)據(jù)包,通知接收端準(zhǔn)備接收文件,通知在一個socket上監(jiān)聽TCP連接事件

 

2 接收端回發(fā)一個UDP數(shù)據(jù)包,告訴發(fā)送端已準(zhǔn)備好接收數(shù)據(jù),并請求一個TCP的連接

 

3發(fā)送端接收連接的請求,并將文件映射到內(nèi)存中,然后創(chuàng)建發(fā)送文件線程,開始進(jìn)行數(shù)據(jù)的發(fā)送

 

4接收端創(chuàng)建接收的文件,然后創(chuàng)建接收數(shù)據(jù)的線程,開始收取數(shù)據(jù).接受完以后,將數(shù)據(jù)寫入到創(chuàng)建好的文件中.

posted on 2010-01-11 15:23 ChinaPanda 閱讀(2098) 評論(0)  編輯 收藏 引用 所屬分類: network

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            国产精品一区免费视频| 欧美一区二区视频在线观看2020| 欧美成人综合| 欧美在线免费看| 欧美在线日韩| 久久成人免费电影| 久久一区二区三区av| 老色鬼精品视频在线观看播放| 老司机午夜精品视频| 欧美精品18+| 国产精品久久久久久久久久ktv| 国产精品系列在线| 国内久久精品视频| 亚洲精品国产精品乱码不99| 一本色道久久加勒比88综合| 午夜免费日韩视频| 麻豆免费精品视频| 日韩亚洲视频在线| 亚洲欧美日韩国产成人| 久久久久成人网| 欧美精品久久久久久久久老牛影院| 欧美日一区二区在线观看 | 亚洲欧美日韩精品一区二区| 久久精品视频免费观看| 欧美国产日韩xxxxx| 一本色道久久综合狠狠躁篇的优点| 午夜影院日韩| 麻豆免费精品视频| 欧美~级网站不卡| 欧美四级电影网站| 在线精品视频一区二区| 亚洲性感美女99在线| 久久香蕉国产线看观看网| 最新国产拍偷乱拍精品| 亚洲伦理中文字幕| 欧美伊人精品成人久久综合97 | 欧美日韩在线综合| 在线日韩日本国产亚洲| 性欧美1819sex性高清| 亚洲国产一区二区a毛片| 亚洲欧美激情在线视频| 欧美精品少妇一区二区三区| 国产一区二区三区四区在线观看| 国产精品99久久久久久久久久久久| 久久婷婷色综合| 亚洲免费人成在线视频观看| 欧美日韩高清不卡| 亚洲国产欧美一区二区三区久久| 欧美有码视频| 中文一区二区| 欧美喷水视频| 亚洲国产精品精华液2区45| 久久精品最新地址| 亚洲尤物视频网| 国产精品www网站| 一区二区黄色| 亚洲黄色在线看| 农夫在线精品视频免费观看| 在线精品国产欧美| 欧美国产精品日韩| 欧美成人69av| 亚洲精品你懂的| 亚洲国产一区二区精品专区| 欧美国产日韩a欧美在线观看| 亚洲高清在线| 亚洲国产成人久久| 欧美1区2区3区| 亚洲精品国产精品国自产观看| 免费观看亚洲视频大全| 久久国产精品久久久久久电车| 国产日韩欧美综合在线| 欧美中文字幕| 久久免费视频在线观看| 亚洲国产精品电影在线观看| 亚洲经典在线| 国产精品国产三级国产a| 午夜精品视频在线| 亚洲欧美激情视频| 黄色一区二区在线| 蜜桃视频一区| 欧美激情精品久久久久久免费印度| av不卡在线| 亚洲一区二区在线视频| 国产一区二区视频在线观看| 欧美大片免费观看在线观看网站推荐| 麻豆国产va免费精品高清在线| 欧美日韩美女在线观看| 欧美日韩二区三区| 久久国产黑丝| 欧美成人黑人xx视频免费观看| 在线亚洲自拍| 欧美一区二区三区在线看| 亚洲第一色在线| 日韩视频一区二区三区| 国产女人18毛片水18精品| 免费不卡视频| 欧美日韩亚洲激情| 久久久久久久久久久一区| 欧美激情亚洲精品| 欧美在线视频一区| 老司机免费视频一区二区| 亚洲欧美另类国产| 久久综合色综合88| 亚洲欧美日韩国产综合| 久久综合图片| 久久激情一区| 欧美片网站免费| 欧美a级在线| 国产精品一区二区你懂的| 欧美国产精品中文字幕| 国产精品免费视频xxxx| 亚洲国产欧美一区二区三区久久 | 韩国视频理论视频久久| 99国产精品国产精品毛片| 一区二区三区中文在线观看| 在线一区二区三区四区五区| 亚洲精品一级| 久久久久久久波多野高潮日日| 亚洲综合99| 欧美日韩裸体免费视频| 亚洲国产精品成人| 伊人夜夜躁av伊人久久| 午夜精彩视频在线观看不卡 | 亚洲欧美成aⅴ人在线观看| 亚洲精品国偷自产在线99热| 久久精品中文字幕一区| 欧美在线观看视频一区二区| 欧美日韩日日骚| 亚洲国产女人aaa毛片在线| 一区二区视频免费在线观看| 欧美在线视频一区二区三区| 午夜在线a亚洲v天堂网2018| 欧美精品久久99久久在免费线| 老鸭窝91久久精品色噜噜导演| 国产日韩欧美三级| 亚洲综合色网站| 久久动漫亚洲| 国产视频欧美视频| 午夜在线观看免费一区| 欧美亚洲尤物久久| 国产精品午夜春色av| 亚洲影院在线| 久久精品国产在热久久| 国产一区免费视频| 久久久久国产精品www| 久久综合久久88| 亚洲电影免费观看高清完整版在线| 久久国产精品99国产| 亚洲电影免费在线观看| 免费在线一区二区| 一区二区三区在线观看欧美| 久久蜜桃av一区精品变态类天堂| 久久精品亚洲国产奇米99| 国产日韩欧美中文| 久久久久国产精品一区二区| 欧美va亚洲va国产综合| 亚洲片国产一区一级在线观看| 欧美黄色日本| 一卡二卡3卡四卡高清精品视频| 亚洲一区观看| 国产一二精品视频| 蜜臀va亚洲va欧美va天堂| 欧美电影免费观看| 在线亚洲电影| 国产一区二区三区av电影| 老司机亚洲精品| 一本久久综合亚洲鲁鲁| 欧美专区在线观看一区| 亚洲第一在线视频| 欧美日韩免费看| 欧美一区二区三区男人的天堂| 久热国产精品| 中文久久精品| 影音先锋亚洲电影| 欧美日韩视频专区在线播放 | 亚洲在线视频观看| 久久综合给合久久狠狠狠97色69| 亚洲精华国产欧美| 国产精品三级久久久久久电影| 性欧美xxxx视频在线观看| 欧美大色视频| 亚洲欧美日韩精品久久| 亚洲狠狠婷婷| 国产亚洲va综合人人澡精品| 欧美成人国产| 欧美中文字幕第一页| 欧美一区二区福利在线| 亚洲国产毛片完整版| 欧美新色视频| 欧美成人精品一区| 亚洲一级特黄| 亚洲电影第三页| 久久成人18免费网站| 日韩亚洲国产精品| 国产自产v一区二区三区c| 亚洲视频1区| 国产一区二区三区高清播放| 欧美日韩激情网| 嫩草影视亚洲| 久久婷婷一区|