The following subsections show a graphical representation of the main protocol packets and how to generate them.
First we need to perform some setup to import the packet classes:
In [1]:
from pysap.SAPRFC import *
from IPython.display import display
In [2]:
for version in [2, 3]:
for req_type in rfc_req_type_values:
p = SAPRFC(version=version, req_type=req_type)
print("Packet type: {} Version: {}".format(rfc_req_type_values[req_type], version))
display(p.canvas_dump())
In [3]:
for command in rfc_monitor_cmd_values:
p = SAPRFC(req_type=9, cmd=command)
print(rfc_monitor_cmd_values[command])
display(p.canvas_dump())
In [4]:
p = SAPRFCEXTEND()
display(p.canvas_dump())
In [5]:
p = SAPRFCDTStruct()
display(p.canvas_dump())
In [6]:
p = SAPCPICSUFFIX()
display(p.canvas_dump())
In [7]:
p.suff_unk9 = "\x00\x01"
display(p.canvas_dump())
In [8]:
for cls in [SAPCPICPARAM, SAPCPICPARAM2]:
p = cls()
p.ip = p.mask = "0.0.0.0"
display(p.canvas_dump())
In [9]:
p = SAPRFCTHStruct()
display(p.canvas_dump())
In [10]:
p = SAPRFXPG()
display(p.canvas_dump())
In [11]:
p = SAPRFCPING()
display(p.canvas_dump())
In [12]:
for cls in [SAPCPIC, SAPCPIC2]:
p = cls()
display(p.canvas_dump())