IP 封包中的 Header 的 Protocol 字段的 值

原文:http://www.cnblogs.com/stone/articles/216952.html

Assigned Internet Protocol Numbers

Decimal    Keyword     Protocol                         References
-------    -------     --------                         ----------
     0                 Reserved                              [JBP]
     1     ICMP        Internet Control Message       [RFC792,JBP]
     2     IGMP        Internet Group Management     [RFC1112,JBP]
     3     GGP         Gateway-to-Gateway              [RFC823,MB]
     4     IP          IP in IP (encasulation)               [JBP]
     5     ST          Stream                 [RFC1190,IEN119,JWF]
     6     TCP         Transmission Control           [RFC793,JBP]
     7     UCL         UCL                                    [PK]
     8     EGP         Exterior Gateway Protocol     [RFC888,DLM1]
     9     IGP         any private interior gateway          [JBP]
    10     BBN-RCC-MON BBN RCC Monitoring                    [SGC]
    11     NVP-II      Network Voice Protocol         [RFC741,SC3]
    12     PUP         PUP                             [PUP,XEROX]
    13     ARGUS       ARGUS                                [RWS4]
    14     EMCON       EMCON                                 [BN7]
    15     XNET        Cross Net Debugger            [IEN158,JFH2]
    16     CHAOS       Chaos                                 [NC3]
    17     UDP         User Datagram                  [RFC768,JBP]
    18     MUX         Multiplexing                    [IEN90,JBP]
    19     DCN-MEAS    DCN Measurement Subsystems           [DLM1]
    20     HMP         Host Monitoring                [RFC869,RH6]
    21     PRM         Packet Radio Measurement              [ZSU]
    22     XNS-IDP     XEROX NS IDP               [ETHERNET,XEROX]
    23     TRUNK-1     Trunk-1                              [BWB6]
    24     TRUNK-2     Trunk-2                              [BWB6]
    25     LEAF-1      Leaf-1                               [BWB6]
    26     LEAF-2      Leaf-2                               [BWB6]
    27     RDP         Reliable Data Protocol         [RFC908,RH6]
    28     IRTP        Internet Reliable Transaction  [RFC938,TXM]
    29     ISO-TP4     ISO Transport Protocol Class 4 [RFC905,RC77]
    30     NETBLT      Bulk Data Transfer Protocol    [RFC969,DDC1]
    31     MFE-NSP     MFE Network Services Protocol  [MFENET,BCH2]
    32     MERIT-INP   MERIT Internodal Protocol             [HWB]
    33     SEP         Sequential Exchange Protocol        [JC120]
    34     3PC         Third Party Connect Protocol         [SAF3]
    35     IDPR        Inter-Domain Policy Routing Protocol [MXS1]

    36     XTP         XTP                                   [GXC]
    37     DDP         Datagram Delivery Protocol            [WXC]
    38     IDPR-CMTP   IDPR Control Message Transport Proto [MXS1]
    39     TP++        TP++ Transport Protocol               [DXF]
    40     IL          IL Transport Protocol                [DXP2]
    41     SIP         Simple Internet Protocol              [SXD]
    42     SDRP        Source Demand Routing Protocol       [DXE1]
    43     SIP-SR      SIP Source Route                      [SXD]
    44     SIP-FRAG    SIP Fragment                          [SXD]
    45     IDRP        Inter-Domain Routing Protocol   [Sue Hares]
    46     RSVP        Reservation Protocol           [Bob Braden]
    47     GRE         General Routing Encapsulation     [Tony Li]
    48     MHRP        Mobile Host Routing Protocol[David Johnson]
    49     BNA         BNA                          [Gary Salamon]
    50     SIPP-ESP    SIPP Encap Security Payload [Steve Deering]
    51     SIPP-AH     SIPP Authentication Header  [Steve Deering]
    52     I-NLSP      Integrated Net Layer Security  TUBA [GLENN]
    53     SWIPE       IP with Encryption                    [JI6]
    54     NHRP        NBMA Next Hop Resolution Protocol
55-60                 Unassigned                            [JBP]
    61                 any host internal protocol            [JBP]
    62     CFTP        CFTP                            [CFTP,HCF2]
    63                 any local network                     [JBP]
    64     SAT-EXPAK   SATNET and Backroom EXPAK             [SHB]
    65     KRYPTOLAN   Kryptolan                            [PXL1]
    66     RVD         MIT Remote Virtual Disk Protocol      [MBG]
    67     IPPC        Internet Pluribus Packet Core         [SHB]
    68                 any distributed file system           [JBP]
    69     SAT-MON     SATNET Monitoring                     [SHB]
    70     VISA        VISA Protocol                        [GXT1]
    71     IPCV        Internet Packet Core Utility          [SHB]
    72     CPNX        Computer Protocol Network Executive  [DXM2]
    73     CPHB        Computer Protocol Heart Beat         [DXM2]
    74     WSN         Wang Span Network                     [VXD]
    75     PVP         Packet Video Protocol                 [SC3]
    76     BR-SAT-MON  Backroom SATNET Monitoring            [SHB]
    77     SUN-ND      SUN ND PROTOCOL-Temporary             [WM3]
    78     WB-MON      WIDEBAND Monitoring                   [SHB]
    79     WB-EXPAK    WIDEBAND EXPAK                        [SHB]
    80     ISO-IP      ISO Internet Protocol                 [MTR]
    81     VMTP        VMTP                                 [DRC3]
    82     SECURE-VMTP SECURE-VMTP                          [DRC3]
    83     VINES       VINES                                 [BXH]
    84     TTP         TTP                                   [JXS]
    85     NSFNET-IGP  NSFNET-IGP                            [HWB]
    86     DGP         Dissimilar Gateway Protocol     [DGP,ML109]
    87     TCF         TCF                                  [GAL5]
    88     IGRP        IGRP                            [CISCO,GXS]

    89     OSPFIGP     OSPFIGP                      [RFC1583,JTM4]
    90     Sprite-RPC  Sprite RPC Protocol            [SPRITE,BXW]
    91     LARP        Locus Address Resolution Protocol     [BXH]
    92     MTP         Multicast Transport Protocol          [SXA]
    93     AX.25       AX.25 Frames                         [BK29]
    94     IPIP        IP-within-IP Encapsulation Protocol   [JI6]
    95     MICP        Mobile Internetworking Control Pro.   [JI6]
    96     SCC-SP      Semaphore Communications Sec. Pro.    [HXH]
    97     ETHERIP     Ethernet-within-IP Encapsulation     [RXH1]
    98     ENCAP       Encapsulation Header         [RFC1241,RXB3]
    99                 any private encryption scheme         [JBP]
   100     GMTP        GMTP                                 [RXB5]
101-254                Unassigned                            [JBP]
    255                Reserved                              [JBP]

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
易语言是一种简单易学的编程语言,常用于快速开发简单的Windows应用程序。在易语言,发送封包可以使用网络编程的相关函数来实现。 首先,需要使用Socket组件来建立与目标服务器的连接。使用Socket组件的open函数,可以指定目标服务器的IP地址和端口号,建立起与服务器的连接。然后,可以使用Socket组件的send函数来发送封包的数据。 发送封包的数据可以使用字符串来表示,字符串包含了需要发送的数据的各个字段,可以根据需要添加分隔符。例如,可以使用逗号作为字段之间的分隔符,将各个字段连接起来,形成一个字符串。 在发送封包之前,需要先将字符串转换为字节数组。可以使用字符串的toBytes函数来实现这一转换。然后,可以使用Socket组件的sendBytes函数来发送字节数组。 发送封包的源码如下所示: ```python // 建立与服务器的连接 Socket.open("目标服务器IP地址", 端口号) // 构造封包数据字符串 数据字符串 = "字段1,字段2,字段3..." // 将数据字符串转换为字节数组 数据字节数组 = 数据字符串.toBytes() // 发送封包数据 Socket.sendBytes(数据字节数组) // 关闭与服务器的连接 Socket.close() ``` 以上就是使用易语言发送封包的源码。通过建立与服务器的连接,构造封包数据字符串,将字符串转换为字节数组,再使用Socket组件发送字节数组,就可以成功发送封包数据。同时,记得在封包发送完成后,关闭与服务器的连接,释放资源。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值