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

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

統計

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

常用鏈接

留言簿

隨筆分類

隨筆檔案

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

轉 部分飛鴿協議

最近看到一些朋友在編寫網絡程序是遇到一些問題,故把以前做IPMSG時翻譯的文檔貼過來,希望對網絡編程新手有所幫助,在尋找編程項目的同學們也可參照此文檔寫出自己的IPMSG。

本文只包含其中幾個比較重要的命令以及運行機制的中文翻譯,更詳細的內容請參照文后的IPMSG 協議英文文檔

聲明:下述協議內容略去了一些在編寫程序過程中沒有用到協議內容,最初的Ipmsg協議是用日文寫的,下面協議內容由本人(cugb_cat)翻譯自Mr.Kanazawa的英文文檔。本翻譯文檔可任意傳播和使用。

        IP信使傳輸協議(第9版草案)         1996/02/21
                2003/01/14 修訂

                H.Shirouzu
            shirouzu@h.email.ne.jp


關于IP信使:
  IP信使使用TCP/UDP協議提供收發消息及文件(目錄)。
特性:
IP信使能夠安裝在任何一個安裝了TCP/IP協議棧的操作系統上,使用在線用戶的動態識別機制,可以和在線所有用戶進行信息交換。
運行機制介紹:
使用TCP/UDP端口(默認端口為2425),消息的收發使用UDP協議,文件(文件夾)的收發使用TCP協議。
1、   命令字:
1)   基本命令字(32位命令字的低8位)
    IPMSG_NOOPERATION     不進行任何操作
    IPMSG_BR_ENTRY     用戶上線
    IPMSG_BR_EXIT         用戶退出
    IPMSG_ANSENTRY     通報在線
    IPMSG_SENDMSG         發送消息
    IPMSG_RECVMSG         通報收到消息
    IPMSG_GETFILEDATA     請求通過TCP傳輸文件
    IPMSG_RELEASEFILES   停止接收文件
    IPMSG_GETDIRFILES     請求傳輸文件夾
2)   選項位(32位命令字的高24位)
IPMSG_SENDCHECKOPT   傳送檢查(需要對方返回確認信息)
IPMSG_FILEATTACHOPT   傳送文件選項
3)   附件類型命令(文件類型命令字的低8位)
IPMSG_FILE_REGULAR   普通文件
IPMSG_FILE_DIR     目錄文件
IPMSG_FILE_RETPARENT   返回上一級目錄
2、   數據包格式(使用字符串):
1)   數據包格式(版本1的格式)
版本號(1):包編號:發送者姓名:發送者主機名:命令字:附加信息
2)   舉例如下
“1:100:shirouzu:Jupiter:32:Hello”
3、   數據包處理總述:
1)   用戶識別
當IPMSG 啟動時,命令IPMSG_BR_ENTRY被廣播到網絡中,向所有在線的用戶提示一個新用戶的到達(即表示“我來了”);所有在線用戶將把該新上線用戶添 加到自己的用戶列表中,并向該新上線用戶發送IPMSG_ANSENTRY命令(即表示“我在線”);該新上線用戶接收到IPMSG_ANSENTRY命 令后即將在線用戶添加到自己的用戶列表中。
2)   收發消息
使用IPMSG_SENDMSG命令發送消息,消息內容添加在附加信息中;在接收消息時,如果對方要求回信確認(IPMSG_SENDCHECKOPT位打開),則需發送IPMSG_RECVMSG命令并將對方發送的數據包的編號放在附加信息中一同發送至發送消息方
3)   附加文件的擴充(添加于第9版)
帶有IPMSG_FILEATTACHOPT位的IPMSG_SENDMSG命令可用來傳輸文件,文件屬性及內容添加在附加信息中,文件內容添加在消息內 容后并以’\0’與之分隔開。傳輸文件時以下信息將被添加到消息內容之后(包括格式):文件序號:文件名:大小(單位:字節):最后修改時間:文件屬性 [: 附加屬性=val1[,val2…][:附加信息=…]]:\a:文件序號…
(文件大小、最后修改時間和文件屬性為十六進制數,如果文件名中包含’:’則使用“::”代替)。
接收端開始接收文件時,請求傳輸文件命令IPMSG_GETFILEDATA將發送到發送端的TCP端口(和UDP的發送端口相同),并將發送端發送的包 編號:文件序號:偏移量(全為十六進制格式)寫到附加信息區一同發送,文件發送端接收到該請求信息并進行校驗正確后即開始發送文件(不使用任何格式,亦不 進行加密)。
當接收端接收到目錄文件時,將發送附加信息區為發送端發送的包編號:文件序號:偏移量(全為十六進制格式)的 IPMSG_GETDIRFILES命令,以用來請求傳輸目錄文件;發送端則將頭信息長度:文件名:文件大小:文件屬性:文件內容添加到附加信息區(除了 文件名和文件內容外,其余皆為十六進制),頭信息長度是從頭信息長度開始到文件內容前的‘:’分割符為止的字符個數。
當文件屬性為IPMSG_FILE_DIR時,IPMsg能夠自動識別其為目錄,下一個文件的數據在該目錄之后。
當文件屬性為IPMSG_FILE_RETPARENT時,IPMsg識別其動作為返回上一級目錄,在這種情況下,文件名為‘.’其屬性為當前目錄的值。

附IPMSG協議英文版:



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=Exponent丄N=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

posted on 2010-01-07 11:15 ChinaPanda 閱讀(596) 評論(0)  編輯 收藏 引用

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            久久久久久久久久久久久久一区| 欧美国产精品v| 亚洲日韩欧美视频| 久久精品在线视频| 国产亚洲欧美日韩一区二区| 亚洲天堂av电影| 欧美在线视频一区二区| 亚洲视频免费在线观看| 欧美日韩亚洲一区二区三区在线观看| 亚洲第一偷拍| 久久久成人精品| 亚洲午夜免费福利视频| 久久九九国产精品怡红院| 狠狠色丁香婷婷综合久久片| 久久视频国产精品免费视频在线| 久久久国产一区二区| 在线成人欧美| 亚洲人成在线播放| 国产精品福利在线观看| 香蕉国产精品偷在线观看不卡| 一区二区三区四区五区视频| 久久国产视频网| 亚洲欧洲三级电影| 99综合在线| 国产精品资源| 欧美成人免费观看| 欧美日韩视频一区二区| 亚洲乱码久久| 一区二区三区毛片| 韩日精品中文字幕| 亚洲国产精品黑人久久久| 欧美日韩精品欧美日韩精品| 久久爱91午夜羞羞| 女女同性精品视频| 亚洲欧洲精品一区二区三区不卡| 亚洲黄色天堂| 国产视频一区在线观看一区免费| 亚洲欧美影院| 久久综合九色99| 亚洲免费网址| 蜜臀久久99精品久久久久久9 | 亚洲乱码国产乱码精品精| 欧美成人三级在线| 欧美一区二区免费视频| 久久噜噜亚洲综合| 另类综合日韩欧美亚洲| 99re6这里只有精品| 午夜性色一区二区三区免费视频| 亚洲一级特黄| 亚洲国产精品尤物yw在线观看 | 免费在线国产精品| 国产亚洲精品久| 亚洲一区二区欧美日韩| 亚洲一区二区三区影院| 欧美日韩国产综合一区二区| 亚洲大片在线| 亚洲国产精品成人久久综合一区| 欧美一级日韩一级| 久久九九久久九九| 国产欧美日韩综合一区在线观看| 制服丝袜激情欧洲亚洲| 亚洲一区免费视频| 欧美性开放视频| 亚洲午夜精品网| 欧美一级播放| 国产一区激情| 久久婷婷国产综合国色天香| 可以免费看不卡的av网站| 国产一区欧美| 美女免费视频一区| 欧美激情在线| 一区二区三区高清在线| 欧美天天视频| 先锋影音一区二区三区| 久久只有精品| 亚洲精品久久久久中文字幕欢迎你| 欧美国产另类| 在线视频一区二区| 欧美在线二区| 亚洲大片免费看| 欧美日本韩国一区| 亚洲一区二区三区免费在线观看| 久久gogo国模啪啪人体图| 黄色av一区| 欧美日韩精品免费观看视频完整| 亚洲午夜精品| 你懂的一区二区| 亚洲一区二区精品在线| 国产一区二区成人| 欧美岛国激情| 午夜精品久久久久久久| 欧美成人精品在线| 亚洲欧美成人综合| 在线精品视频一区二区| 欧美日韩中文字幕在线视频| 性久久久久久久久| 亚洲人体1000| 久久久av毛片精品| 99天天综合性| 精品不卡视频| 国产精品vip| 欧美成人资源| 欧美一区影院| 99这里有精品| 亚洲国产精品一区二区www| 午夜激情一区| 99国产精品久久久| 韩国精品久久久999| 欧美视频免费| 欧美国产专区| 久久久久88色偷偷免费| 亚洲午夜久久久| 亚洲精品一区中文| 免费在线亚洲| 久久久久99精品国产片| 亚洲视频精选| 日韩网站在线观看| 在线成人激情视频| 国产一区视频观看| 国产精品视频免费| 国产精品高清在线| 欧美日韩xxxxx| 欧美国产成人精品| 老**午夜毛片一区二区三区| 欧美怡红院视频| 亚洲欧美日韩一区二区三区在线| 亚洲精品一区二区三区樱花| 欧美fxxxxxx另类| 久久躁狠狠躁夜夜爽| 欧美在线播放视频| 午夜精品理论片| 亚洲综合欧美| 亚洲欧美一区二区视频| 亚洲女人天堂成人av在线| 一区二区三区国产盗摄| a4yy欧美一区二区三区| 日韩午夜在线视频| av成人老司机| 一本色道久久综合亚洲精品婷婷 | 在线成人激情黄色| 伊人久久亚洲热| 一区二区视频欧美| 亚洲第一精品福利| 亚洲电影免费观看高清| 在线观看免费视频综合| 亚洲国产高清视频| 亚洲精品国产欧美| 亚洲美女网站| 亚洲视频axxx| 香蕉久久久久久久av网站| 欧美一区二区三区视频免费播放| 欧美在线视频观看免费网站| 欧美在线观看视频在线| 久久理论片午夜琪琪电影网| 另类春色校园亚洲| 亚洲国产日韩欧美在线动漫 | 亚洲一区高清| 久久精品在线观看| 欧美激情在线| 亚洲深夜影院| 欧美在线1区| 欧美激情亚洲另类| 国产精品视频yy9299一区| 国产一区二区三区的电影 | 亚洲一区日韩| 久久九九99视频| 免费av成人在线| 国产精品99免视看9| 国产资源精品在线观看| 亚洲精品乱码久久久久久蜜桃91| 在线中文字幕一区| 久久九九国产| 亚洲黄网站在线观看| 亚洲尤物精选| 欧美大秀在线观看| 国产日韩精品一区观看 | 国产综合自拍| 亚洲视频免费在线观看| 久久久久久一区二区| 亚洲精品激情| 久久精品国产一区二区三| 欧美老女人xx| 在线观看日韩| 欧美一区二区三区四区在线 | 久久久人成影片一区二区三区 | 久久国产一区| 99热免费精品在线观看| 久久久999精品免费| 国产精品99免费看| 亚洲精品一区二区三区蜜桃久| 欧美在线看片| 一区二区免费看| 男人的天堂亚洲| 国内精品伊人久久久久av影院| 一区二区三区久久| 欧美成人69av| 久久久999精品免费| 国产欧美日韩三级| 亚洲欧美日韩系列| 99视频在线精品国自产拍免费观看 |