HPD API 1.0

Hex Packet Decoder provides an HTTP API for you to parse network packets.

To use the API, you must query https://hpd.gasmi.net/api.php and provide the following parameters as a GET request:
Example:
curl https://hpd.gasmi.net/api.php?force=ipv4&data=4500002852924000408837498B85CCB08B85CCB7800004D2000CF53F68656C6C6F20776F726C640A000000000000

The API server will output the packet details in XML format:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="pdml2html.xsl"?>
<pdml version="0" creator="hpd.gasmi.net" time="Tue Jul 14 0:17:03 2020" capture_file="generated.pcap">
<hpd_info>
	<bytes>00000000000000000000000008004500002852924000408837498B85CCB08B85CCB7800004D2000CF53F68656C6C6F20776F726C640A000000000000</bytes>
	<force_ipv4>True</force_ipv4>
	<force_ipv6>False</force_ipv6>
	<time_ms>374</time_ms>
	<request_error>False</request_error>
	<packet_error>False</packet_error>
</hpd_info>
<packet>
  <proto name="geninfo" pos="0" showname="General information" size="60">
    <field name="num" pos="0" show="1" showname="Number" value="1" size="60"/>
    <field name="len" pos="0" show="60" showname="Frame Length" value="3c" size="60"/>
    <field name="caplen" pos="0" show="60" showname="Captured Length" value="3c" size="60"/>
    <field name="timestamp" pos="0" show="Jul 14, 2020 00:17:02.000000000 CEST" showname="Captured Time" value="1594678622.000000000" size="60"/>
  </proto>
  <proto name="frame" showname="Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)" size="60" pos="0">
    <field name="frame.encap_type" showname="Encapsulation type: Ethernet (1)" size="0" pos="0" show="1"/>
    <field name="frame.time" showname="Arrival Time: Jul 14, 2020 00:17:02.000000000 CEST" size="0" pos="0" show="Jul 14, 2020 00:17:02.000000000 CEST"/>
    <field name="frame.offset_shift" showname="Time shift for this packet: 0.000000000 seconds" size="0" pos="0" show="0.000000000"/>
    <field name="frame.time_epoch" showname="Epoch Time: 1594678622.000000000 seconds" size="0" pos="0" show="1594678622.000000000"/>
    <field name="frame.time_delta" showname="Time delta from previous captured frame: 0.000000000 seconds" size="0" pos="0" show="0.000000000"/>
    <field name="frame.time_delta_displayed" showname="Time delta from previous displayed frame: 0.000000000 seconds" size="0" pos="0" show="0.000000000"/>
    <field name="frame.time_relative" showname="Time since reference or first frame: 0.000000000 seconds" size="0" pos="0" show="0.000000000"/>
    <field name="frame.number" showname="Frame Number: 1" size="0" pos="0" show="1"/>
    <field name="frame.len" showname="Frame Length: 60 bytes (480 bits)" size="0" pos="0" show="60"/>
    <field name="frame.cap_len" showname="Capture Length: 60 bytes (480 bits)" size="0" pos="0" show="60"/>
    <field name="frame.marked" showname="Frame is marked: False" size="0" pos="0" show="0"/>
    <field name="frame.ignored" showname="Frame is ignored: False" size="0" pos="0" show="0"/>
    <field name="frame.protocols" showname="Protocols in frame: eth:ethertype:ip:udplite:data" size="0" pos="0" show="eth:ethertype:ip:udplite:data"/>
  </proto>
  <proto name="eth" showname="Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00)" size="14" pos="0">
    <field name="eth.dst" showname="Destination: 00:00:00_00:00:00 (00:00:00:00:00:00)" size="6" pos="0" show="00:00:00:00:00:00" value="000000000000">
      <field name="eth.dst_resolved" showname="Destination (resolved): 00:00:00_00:00:00" hide="yes" size="6" pos="0" show="00:00:00_00:00:00" value="000000000000"/>
      <field name="eth.dst.oui" showname="Destination OUI: 00:00:00 (Officially Xerox, but" hide="yes" size="3" pos="0" show="0" value="000000"/>
      <field name="eth.dst.oui_resolved" showname="Destination OUI (resolved): Officially Xerox, but 0:0:0:0:0:0 is more common" hide="yes" size="6" pos="0" show="Officially Xerox, but 0:0:0:0:0:0 is more common" value="000000000000"/>
      <field name="eth.addr" showname="Address: 00:00:00_00:00:00 (00:00:00:00:00:00)" size="6" pos="0" show="00:00:00:00:00:00" value="000000000000"/>
      <field name="eth.addr_resolved" showname="Address (resolved): 00:00:00_00:00:00" hide="yes" size="6" pos="0" show="00:00:00_00:00:00" value="000000000000"/>
      <field name="eth.addr.oui" showname="Address OUI: 00:00:00 (Officially Xerox, but" hide="yes" size="3" pos="0" show="0" value="000000"/>
      <field name="eth.addr.oui_resolved" showname="Address OUI (resolved): Officially Xerox, but 0:0:0:0:0:0 is more common" hide="yes" size="6" pos="0" show="Officially Xerox, but 0:0:0:0:0:0 is more common" value="000000000000"/>
      <field name="eth.dst.lg" showname=".... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)" size="3" pos="0" show="0" value="0" unmaskedvalue="000000"/>
      <field name="eth.lg" showname=".... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)" hide="yes" size="3" pos="0" show="0" value="0" unmaskedvalue="000000"/>
      <field name="eth.dst.ig" showname=".... ...0 .... .... .... .... = IG bit: Individual address (unicast)" size="3" pos="0" show="0" value="0" unmaskedvalue="000000"/>
      <field name="eth.ig" showname=".... ...0 .... .... .... .... = IG bit: Individual address (unicast)" hide="yes" size="3" pos="0" show="0" value="0" unmaskedvalue="000000"/>
    </field>
    <field name="eth.src" showname="Source: 00:00:00_00:00:00 (00:00:00:00:00:00)" size="6" pos="6" show="00:00:00:00:00:00" value="000000000000">
      <field name="eth.src_resolved" showname="Source (resolved): 00:00:00_00:00:00" hide="yes" size="6" pos="6" show="00:00:00_00:00:00" value="000000000000"/>
      <field name="eth.src.oui" showname="Source OUI: 00:00:00 (Officially Xerox, but" hide="yes" size="3" pos="6" show="0" value="000000"/>
      <field name="eth.src.oui_resolved" showname="Source OUI (resolved): Officially Xerox, but 0:0:0:0:0:0 is more common" hide="yes" size="6" pos="6" show="Officially Xerox, but 0:0:0:0:0:0 is more common" value="000000000000"/>
      <field name="eth.addr" showname="Address: 00:00:00_00:00:00 (00:00:00:00:00:00)" size="6" pos="6" show="00:00:00:00:00:00" value="000000000000"/>
      <field name="eth.addr_resolved" showname="Address (resolved): 00:00:00_00:00:00" hide="yes" size="6" pos="6" show="00:00:00_00:00:00" value="000000000000"/>
      <field name="eth.addr.oui" showname="Address OUI: 00:00:00 (Officially Xerox, but" hide="yes" size="3" pos="6" show="0" value="000000"/>
      <field name="eth.addr.oui_resolved" showname="Address OUI (resolved): Officially Xerox, but 0:0:0:0:0:0 is more common" hide="yes" size="6" pos="6" show="Officially Xerox, but 0:0:0:0:0:0 is more common" value="000000000000"/>
      <field name="eth.src.lg" showname=".... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)" size="3" pos="6" show="0" value="0" unmaskedvalue="000000"/>
      <field name="eth.lg" showname=".... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)" hide="yes" size="3" pos="6" show="0" value="0" unmaskedvalue="000000"/>
      <field name="eth.src.ig" showname=".... ...0 .... .... .... .... = IG bit: Individual address (unicast)" size="3" pos="6" show="0" value="0" unmaskedvalue="000000"/>
      <field name="eth.ig" showname=".... ...0 .... .... .... .... = IG bit: Individual address (unicast)" hide="yes" size="3" pos="6" show="0" value="0" unmaskedvalue="000000"/>
    </field>
    <field name="eth.type" showname="Type: IPv4 (0x0800)" size="2" pos="12" show="0x00000800" value="0800"/>
    <field name="eth.padding" showname="Padding: 000000000000" size="6" pos="54" show="00:00:00:00:00:00" value="000000000000"/>
  </proto>
  <proto name="ip" showname="Internet Protocol Version 4, Src: 139.133.204.176, Dst: 139.133.204.183" size="20" pos="14">
    <field name="ip.version" showname="0100 .... = Version: 4" size="1" pos="14" show="4" value="4" unmaskedvalue="45"/>
    <field name="ip.hdr_len" showname=".... 0101 = Header Length: 20 bytes (5)" size="1" pos="14" show="20" value="45"/>
    <field name="ip.dsfield" showname="Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)" size="1" pos="15" show="0x00000000" value="00">
      <field name="ip.dsfield.dscp" showname="0000 00.. = Differentiated Services Codepoint: Default (0)" size="1" pos="15" show="0" value="0" unmaskedvalue="00"/>
      <field name="ip.dsfield.ecn" showname=".... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)" size="1" pos="15" show="0" value="0" unmaskedvalue="00"/>
    </field>
    <field name="ip.len" showname="Total Length: 40" size="2" pos="16" show="40" value="0028"/>
    <field name="ip.id" showname="Identification: 0x5292 (21138)" size="2" pos="18" show="0x00005292" value="5292"/>
    <field name="ip.flags" showname="Flags: 0x4000, Don't fragment" size="2" pos="20" show="0x00004000" value="4000">
      <field name="ip.flags.rb" showname="0... .... .... .... = Reserved bit: Not set" size="2" pos="20" show="0" value="0" unmaskedvalue="4000"/>
      <field name="ip.flags.df" showname=".1.. .... .... .... = Don't fragment: Set" size="2" pos="20" show="1" value="1" unmaskedvalue="4000"/>
      <field name="ip.flags.mf" showname="..0. .... .... .... = More fragments: Not set" size="2" pos="20" show="0" value="0" unmaskedvalue="4000"/>
    </field>
    <field name="ip.frag_offset" showname="Fragment offset: 0" size="2" pos="20" show="0" value="4000"/>
    <field name="ip.ttl" showname="Time to live: 64" size="1" pos="22" show="64" value="40"/>
    <field name="ip.proto" showname="Protocol: UDPLite (136)" size="1" pos="23" show="136" value="88"/>
    <field name="ip.checksum" showname="Header checksum: 0x3749" size="2" pos="24" show="0x00003749" value="3749"/>
    <field name="ip.checksum.status" showname="Header checksum status: Unverified" size="0" pos="24" show="2"/>
    <field name="ip.src" showname="Source: 139.133.204.176" size="4" pos="26" show="139.133.204.176" value="8b85ccb0"/>
    <field name="ip.addr" showname="Source or Destination Address: 139.133.204.176" hide="yes" size="4" pos="26" show="139.133.204.176" value="8b85ccb0"/>
    <field name="ip.src_host" showname="Source Host: 139.133.204.176" hide="yes" size="4" pos="26" show="139.133.204.176" value="8b85ccb0"/>
    <field name="ip.host" showname="Source or Destination Host: 139.133.204.176" hide="yes" size="4" pos="26" show="139.133.204.176" value="8b85ccb0"/>
    <field name="ip.dst" showname="Destination: 139.133.204.183" size="4" pos="30" show="139.133.204.183" value="8b85ccb7"/>
    <field name="ip.addr" showname="Source or Destination Address: 139.133.204.183" hide="yes" size="4" pos="30" show="139.133.204.183" value="8b85ccb7"/>
    <field name="ip.dst_host" showname="Destination Host: 139.133.204.183" hide="yes" size="4" pos="30" show="139.133.204.183" value="8b85ccb7"/>
    <field name="ip.host" showname="Source or Destination Host: 139.133.204.183" hide="yes" size="4" pos="30" show="139.133.204.183" value="8b85ccb7"/>
  </proto>
  <proto name="udplite" showname="Lightweight User Datagram Protocol, Src Port: 32768, Dst Port: 1234" size="8" pos="34">
    <field name="udp.srcport" showname="Source Port: 32768" size="2" pos="34" show="32768" value="8000"/>
    <field name="udp.dstport" showname="Destination Port: 1234" size="2" pos="36" show="1234" value="04d2"/>
    <field name="udp.port" showname="Source or Destination Port: 32768" hide="yes" size="2" pos="34" show="32768" value="8000"/>
    <field name="udp.port" showname="Source or Destination Port: 1234" hide="yes" size="2" pos="36" show="1234" value="04d2"/>
    <field name="udp.checksum_coverage" showname="Checksum coverage: 12" size="2" pos="38" show="12" value="000c"/>
    <field name="udp.length" showname="Length: 20" size="0" pos="38" show="20"/>
    <field name="udp.checksum" showname="Checksum: 0xf53f" size="2" pos="40" show="0x0000f53f" value="f53f"/>
    <field name="udp.checksum.status" showname="Checksum Status: Unverified" size="0" pos="40" show="2"/>
    <field name="udp.stream" showname="Stream index: 0" size="0" pos="42" show="0"/>
    <field name="" show="Timestamps" size="0" pos="34">
      <field name="udp.time_relative" showname="Time since first frame: 0.000000000 seconds" size="0" pos="34" show="0.000000000"/>
      <field name="udp.time_delta" showname="Time since previous frame: 0.000000000 seconds" size="0" pos="34" show="0.000000000"/>
    </field>
  </proto>
  <proto name="fake-field-wrapper">
    <field name="data" value="68656c6c6f20776f726c640a">
      <field name="data.data" showname="Data: 68656c6c6f20776f726c640a" size="12" pos="42" show="68:65:6c:6c:6f:20:77:6f:72:6c:64:0a" value="68656c6c6f20776f726c640a"/>
      <field name="data.len" showname="Length: 12" size="0" pos="42" show="12"/>
  </field>
  </proto>
</packet>
</pdml>

Or if text format has been selected:
Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
    Encapsulation type: Ethernet (1)
    Arrival Time: Jul 14, 2020 01:58:36.000000000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1594684716.000000000 seconds
    [Time delta from previous captured frame: 0.000000000 seconds]
    [Time delta from previous displayed frame: 0.000000000 seconds]
    [Time since reference or first frame: 0.000000000 seconds]
    Frame Number: 1
    Frame Length: 60 bytes (480 bits)
    Capture Length: 60 bytes (480 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:ip:udplite:data]
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00)
    Destination: 00:00:00_00:00:00 (00:00:00:00:00:00)
        Address: 00:00:00_00:00:00 (00:00:00:00:00:00)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Source: 00:00:00_00:00:00 (00:00:00:00:00:00)
        Address: 00:00:00_00:00:00 (00:00:00:00:00:00)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Type: IPv4 (0x0800)
    Padding: 000000000000
Internet Protocol Version 4, Src: 139.133.204.176, Dst: 139.133.204.183
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
        0000 00.. = Differentiated Services Codepoint: Default (0)
        .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
    Total Length: 40
    Identification: 0x5292 (21138)
    Flags: 0x4000, Don't fragment
        0... .... .... .... = Reserved bit: Not set
        .1.. .... .... .... = Don't fragment: Set
        ..0. .... .... .... = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDPLite (136)
    Header checksum: 0x3749 [validation disabled]
    [Header checksum status: Unverified]
    Source: 139.133.204.176
    Destination: 139.133.204.183
Lightweight User Datagram Protocol, Src Port: 32768, Dst Port: 1234
    Source Port: 32768
    Destination Port: 1234
    Checksum coverage: 12
    [Length: 20]
    Checksum: 0xf53f [unverified]
    [Checksum Status: Unverified]
    [Stream index: 0]
    [Timestamps]
        [Time since first frame: 0.000000000 seconds]
        [Time since previous frame: 0.000000000 seconds]
Data (12 bytes)

0000  68 65 6c 6c 6f 20 77 6f 72 6c 64 0a               hello world.
    Data: 68656c6c6f20776f726c640a
    [Length: 12]