Skip to content

v0.1.2a Release of protocol

Latest
Compare
Choose a tag to compare
@ryungmin ryungmin released this 25 Oct 04:11
· 18 commits to main since this release

Add function for protocol <protocol>

$ protocol

protocol.exe v0.1.2a
Copyright (C) 2022, Ryeong-Min Kim ([email protected]).
This software comes with ABSOLUTELY NO WARRANTY.

Usage: protocol.exe "{<protocol> or <spec>}"
PARAMETERS:
 <spec>              : Field by field specification of non-existing protocol
 <protocol>          : Name of an existing protocol
 -l, --list          : List of supported protocols

usage

$ protocol tcp
 0                   1                   2                   3  
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Source Port          |       Destination Port        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Acknowledgment Number                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Offset | Res.  |     Flags     |            Window             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Checksum            |        Urgent Pointer         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Options                    |    Padding    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

* Source Port (16 bytes)
* Destination Port (16 bytes)
* Sequence Number (32 bytes)
* Acknowledgment Number (32 bytes)
* Offset (4 bytes)
* Res. (4 bytes)
* Flags (8 bytes)
* Window (16 bytes)
* Checksum (16 bytes)
* Urgent Pointer (16 bytes)
* Options (24 bytes)
* Padding (8 bytes)
total 192 bytes

Add usage for "List of supproted protocols"

$ protocol --list
Usage: protocol.exe "<protocol>"

+----------------------------------------------------------------------------------------+
| Protocol                                                          | <protocol>         |
+----------------------------------------------------------------------------------------+
| COTP for Connect Confirm                                          | cotp_cc            |
| COTP for Data                                                     | cotp_dt            |
| COTP for Disconnect Request                                       | cotp_dr            |
| Connection-oriented Transport Protocol (COTP) for Connect Request | cotp_cr            |
| Distributed Network Protocol 3.0 (DNP3)                           | dnp3               |
| Dynamic Host Configuration Protocol                               | dhcp               |
| Ethernet                                                          | ethernet           |
| Example                                                           | example            |
| ICMP Destination Unreachable                                      | icmp-destination   |
| ICMP Echo Request/Reply                                           | icmp-echo          |
| ICMP Information Request/Reply                                    | icmp-information   |
| ICMP Parameter Problem                                            | icmp-parameter     |
| ICMP Redirect                                                     | icmp-redirect      |
| ICMP Source Quench                                                | icmp-source        |
| ICMP Time Exceeded                                                | icmp-time          |
| ICMP Timestamp Request/Reply                                      | icmp-timestamp     |
| ICMP for IPv6 (ICMPv6)                                            | icmpv6             |
| ICMPv6 Destination Unreachable                                    | icmpv6-destination |
| ICMPv6 Echo Request/Reply                                         | icmpv6-echo        |
| ICMPv6 Neighbor Advertisement                                     | icmpv6-nadv        |
| ICMPv6 Neighbor Solicitation                                      | icmpv6-nsol        |
| ICMPv6 Packet Too Big                                             | icmpv6-big         |
| ICMPv6 Parameter Problem                                          | icmpv6-parameter   |
| ICMPv6 Redirect                                                   | icmpv6-redirect    |
| ICMPv6 Router Advertisement                                       | icmpv6-radv        |
| ICMPv6 Router Solicitation                                        | icmpv6-rsol        |
| ICMPv6 Time Exceeded                                              | icmpv6-time        |
| IEEE 802.1q                                                       | dot1q              |
| IEEE 802.1q                                                       | 8021q              |
| Internet Control Message Protocol (ICMP)                          | icmp               |
| Internet Protocol (IP), version 4.                                | ipv4               |
| Internet Protocol (IP), version 4.                                | ip                 |
| Internet Protocol (IP), version 6.                                | ipv6               |
| Modbus TCP                                                        | modbus_tcp         |
| PROFINET Real Time (RT)                                           | profinet_rt        |
| S7 Communication (S7Comm) Header                                  | s7_header          |
| S7Comm Data                                                       | s7_data            |
| S7Comm Item                                                       | s7_item            |
| Test                                                              | test               |
| Texas Simplified Application Project (TSAP)                       | tsap               |
| Transmission Control Protocol (TCP)                               | tcp                |
| User Datagram Protocol (TCP)                                      | udp                |
+----------------------------------------------------------------------------------------+