| | 1 | {{{ |
| | 2 | #!NetPDL |
| | 3 | <protocol name="mnt" longname="MNT" showsumtemplate="mnt"> |
| | 4 | <format> |
| | 5 | <fields> |
| | 6 | <if expr="checklookuptable($rpctable, $ipsrc, $ipdst, $portsrc, $portdst) and $rpctable.type==0"> <!-- is a call --> |
| | 7 | <if-true> |
| | 8 | <switch expr="$rpctable.proc"> |
| | 9 | <case value="0x01"> <includeblk name="MNTargs"/> </case> |
| | 10 | <case value="0x03"> <includeblk name="UMNTargs"/> </case> |
| | 11 | <default> |
| | 12 | <field type="variable" name="data" longname="Input" expr="$packetlength - $currentoffset" showtemplate="Field4BytesHex"/> |
| | 13 | </default> |
| | 14 | </switch> |
| | 15 | |
| | 16 | </if-true> |
| | 17 | </if> |
| | 18 | <if expr="checklookuptable($rpctable, $ipsrc, $ipdst, $portsrc, $portdst) and $rpctable.type==1"> <!-- is a reply --> |
| | 19 | <if-true> |
| | 20 | <switch expr="$rpctable.proc"> |
| | 21 | <case value="0x01"> <includeblk name="MNTres"/> </case> |
| | 22 | <!--<case value="0x03"> <includeblk name="UMNTres"/> </case> --> <!-- return void --> |
| | 23 | <default> |
| | 24 | <field type="variable" name="data" longname="Output" expr="$packetlength - $currentoffset" showtemplate="Field4BytesHex"/> |
| | 25 | </default> |
| | 26 | </switch> |
| | 27 | |
| | 28 | </if-true> |
| | 29 | </if> |
| | 30 | <!--<field type="variable" name="data" longname="Data" expr="$packetlength - $currentoffset" showtemplate="FieldAscii"/>--> |
| | 31 | </fields> |
| | 32 | |
| | 33 | <block name="MNTargs" longname="MNT Arguments"> |
| | 34 | <includeblk name="dir_path"/> |
| | 35 | </block> |
| | 36 | |
| | 37 | <block name="UMNTargs" longname="UMNT Arguments"> |
| | 38 | <includeblk name="dir_path"/> |
| | 39 | </block> |
| | 40 | |
| | 41 | <block name="MNTres" longname="MNT Results"> |
| | 42 | <includeblk name="fhstatus"/> |
| | 43 | </block> |
| | 44 | |
| | 45 | <block name="fhstatus" longname="File Handle Status"> |
| | 46 | <field type="fixed" name="status" longname="Status" size="4" showtemplate="FieldHex"/> |
| | 47 | <if expr="not buf2int(status)"> |
| | 48 | <if-true> |
| | 49 | <field type="fixed" name="length_fhandle" longname="Length File Handle" size="4" showtemplate="FieldDec"/> |
| | 50 | <field type="variable" name="fhandle" longname="File Handle" expr="buf2int(length_fhandle)" showtemplate="FieldHex"/> |
| | 51 | <if expr="(buf2int(length_fhandle) mod 4) != 0"> |
| | 52 | <if-true> |
| | 53 | <field type="variable" name="filling" longname="Filling" expr="((buf2int(length_fhandle) div 4)+1)*4 - buf2int(length_fhandle)" showtemplate="FieldHex"/> |
| | 54 | </if-true> |
| | 55 | </if> |
| | 56 | <field type="fixed" name="number_auth_flavors" longname="# Auth Flavors" size="4" showtemplate="FieldDec"/> |
| | 57 | <block name="auth_flavors" longname="Auth_Flavors"> |
| | 58 | <loop type="times2repeat" expr="buf2int(number_auth_flavors)"> |
| | 59 | <field type="fixed" name="auth_flavor" longname="Auth Flavor" size="4" showtemplate="FieldHex"/> |
| | 60 | </loop> |
| | 61 | </block> |
| | 62 | |
| | 63 | </if-true> |
| | 64 | </if> |
| | 65 | |
| | 66 | </block> |
| | 67 | <block name="dir_path" longname="DirPath"> |
| | 68 | <field type="fixed" name="length_path" longname="Length Path" size="4" showtemplate="FieldDec"/> |
| | 69 | <field type="variable" name="path" longname="Path" expr="buf2int(length_path)" showtemplate="FieldAscii"/> |
| | 70 | <!--<if expr="debug(buf2int(length_path) div 4)"><if-true></if-true></if>--> |
| | 71 | <if expr="(buf2int(length_path) mod 4) != 0"> |
| | 72 | <if-true> |
| | 73 | <field type="variable" name="filling" longname="Filling" expr="((buf2int(length_path) div 4)+1)*4 - buf2int(length_path)" showtemplate="FieldHex"/> |
| | 74 | </if-true> |
| | 75 | </if> |
| | 76 | </block> |
| | 77 | </format> |
| | 78 | |
| | 79 | <visualization> |
| | 80 | <showsumtemplate name="mnt"> |
| | 81 | <section name="next"/> |
| | 82 | <text value=" MNT"/> |
| | 83 | </showsumtemplate> |
| | 84 | </visualization> |
| | 85 | </protocol> |
| | 86 | |
| | 87 | }}} |