Java中关于Modem的PPP解码器的探讨2015-05-12 00:06:12

( 2人已投票,[高质量] )
分享: ╬收藏
31.3K

在Java中PPP协议是一种比较常用的协议。以下内容主要是PPP解码器针对基于ModemPPP协议进行解码。从中可以窥探PPP协议的工作情况。
PPP解码器是一个可以运行的Jar包。有需要下载的低部有载链接。
启动解码器可以使用如下指令:

Java –cp PPPDecoder.jar; PPPDecoder [file name]

其中file name指定了PPP协议的通讯记录日志。格式要求按照行进行整理,数据之间没有多余空格,开头和结尾都必须是“7E”。这个开头和结尾是典型的PPP协议要求。
例如一个典型的串口数据记录如下:

Java中关于Modem的PPP解码器的探讨


第一行通讯数据经过整理后可以如下:
7EFF7D23C0217D217D207D207D377D227D267D207D207D207D207D257D267D3BF13A387D277D227D287D227D2D7D237D2656CD7E
这样的数据就可以送往PPPDecoder进行解析。下面的表格中给出了部分标准解析结果仅供参考。


Experimentation.main : 0x7eff7d23c0217d217d207d207d377d227d267d207d207d207d207d257d267d3bf13a387d277d227d287d227d2d7d237d2656cd7e
    SimpleBuffer.dump : show parameters !
        size = 0
        position = 0
        (no data available !)
    HDLCPacket.dump : show parameters !
        acf_compression = false
        pf_compression = false
        (data is unavailable)
    SimpleBuffer.dump : show parameters !
        size = 50
        position = 0
        data = 0xff7d23c0217d217d207d207d377d227d267d207d207d207d207d257d267d3bf13a387d277d227d287d227d2d7d237d2656cd
    HDLCPacket.dump : show parameters !
        acf_compression = false
        pf_compression = false
        protocol = 0xc021 (LCP, Link Control Protocol)
        ppp_fcs16 = 0x56cd (GOOD)
        bytes = 0xff03c0210100001702060000000005061bf13a38070208020d0306
    LCPPacket.dump : show parameters !
        code = 0x01 (Configure-Request)
        identifier = 0
        total = 23
    LCPConfigureRequest.dump : show parameters !
    AsyncControlCharacterMap.dump : show parameters !
        accm = 0x00000000
    MagicNumber.dump : show parameters !
        magic_number = 0x1bf13a38
    PFCompression.dump : no parameters !
    ACFCompression.dump : no parameters !
    Callback.dump : show parameters !
        operation = 0x06 (unknown)
        message = 0x
    Experimentation.main : 0x7eff7d23c0217d217d207d203b7d227d267d207d207d207d207d237d25c223817d257d2639f75ea67d277d227d287d227d2d7d237d267d317d247d264e7d337d377d21ae5f8132e64e4a7d289c40eebb84e8b1a17d207d207d207d207d377d247d207d264b347e7eff7d23c0217d227d207d207d377d227d267d207d207d207d207d257d267d3bf13a387d277d227d287d227d2d7d237d267d3c5f7e
    SimpleBuffer.dump : show parameters !
        size = 0
        position = 0
        (no data available !)
    HDLCPacket.dump : show parameters !
        acf_compression = false
        pf_compression = false
        (data is unavailable)
    SimpleBuffer.dump : show parameters !
        size = 101
        position = 0
        data = 0xff7d23c0217d217d207d203b7d227d267d207d207d207d207d237d25c223817d257d2639f75ea67d277d227d287d227d2d7d237d267d317d247d264e7d337d377d21ae5f8132e64e4a7d289c40eebb84e8b1a17d207d207d207d207d377d247d207d264b34
    HDLCPacket.dump : show parameters !
        acf_compression = false
        pf_compression = false
        protocol = 0xc021 (LCP, Link Control Protocol)
        ppp_fcs16 = 0x4b34 (GOOD)
        bytes = 0xff03c0210100003b0206000000000305c22381050639f75ea6070208020d03061104064e131701ae5f8132e64e4a089c40eebb84e8b1a10000000017040006
    LCPPacket.dump : show parameters !
        code = 0x01 (Configure-Request)
        identifier = 0
        total = 59
    LCPConfigureRequest.dump : show parameters !
    AsyncControlCharacterMap.dump : show parameters !
        accm = 0x00000000
    AuthenticationProtocol.dump : show parameters !
        protocol = 0xc223 (Challenge Handshake Authentication Protocol)
    MagicNumber.dump : show parameters !
        magic_number = 0x39f75ea6
    PFCompression.dump : no parameters !
    ACFCompression.dump : no parameters !
    Callback.dump : show parameters !
        operation = 0x06 (unknown)
        message = 0x
    MultilinkMaxReceiveReconstructedUnit.dump : show parameters !
        mrru = 1614
    MultilinkEndpointDiscriminator.dump : show parameters !
        class = 0x01 (locally assigned address)
        address = 0xae5f8132e64e4a089c40eebb84e8b1a100000000
    LinkDiscriminatorForBACP.dump : show parameters !
        link_discriminatorr = 0x00000006
    SimpleBuffer.dump : show parameters !
        size = 0
        position = 0
        (no data available !)
    HDLCPacket.dump : show parameters !
        acf_compression = false
        pf_compression = false
        (data is unavailable)
    SimpleBuffer.dump : show parameters !
        size = 51
        position = 0
        data = 0xff7d23c0217d227d207d207d377d227d267d207d207d207d207d257d267d3bf13a387d277d227d287d227d2d7d237d267d3c5f
    HDLCPacket.dump : show parameters !
        acf_compression = false
        pf_compression = false
        protocol = 0xc021 (LCP, Link Control Protocol)
        ppp_fcs16 = 0x1c5f (GOOD)
        bytes = 0xff03c0210200001702060000000005061bf13a38070208020d0306
    LCPPacket.dump : show parameters !
        code = 0x02 (Configure-Ack)
        identifier = 0
        total = 23
    LCPConfigureAck.dump : show parameters !
    AsyncControlCharacterMap.dump : show parameters !
        accm = 0x00000000
    MagicNumber.dump : show parameters !
        magic_number = 0x1bf13a38
    PFCompression.dump : no parameters !
    ACFCompression.dump : no parameters !
    Callback.dump : show parameters !
        operation = 0x06 (unknown)
        message = 0x

PPP解码器Jar包下载:

Java中关于Modem的PPP解码器的探讨 PPPDecoder.rar [登录雪炭网后可见]






头像

snowcoal
  • java
  • ppp解码器

本文标签:

javappp解码器

收藏到我的私密空间

标题:Java中关于Modem的PPP解码器的探讨

作者:小麻雀

你暂未登录,请登录后才可收藏至您的私密空间 确认取消
雪炭网

键盘操作 更便捷 -雪炭网雪中送炭-乐趣无限