diff options
author | John Thacker <johnthacker@gmail.com> | 2024-01-30 09:41:12 -0500 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2024-01-30 16:05:15 +0000 |
commit | 28e9035eec0d77b40475a7ee92b465112c4474b8 (patch) | |
tree | b72b7be77841e5dad5ff87183a9602183732d392 /plugins/epan/mate/examples/pasv_ftp.mate | |
parent | 81d094d47fca5f0121554a74043df692298e3d29 (diff) |
MATE: Update examples
Fix the distributed examples to use the "new" style configuration,
as shown in the WSUG and Wiki. Fix the FTP example in the WSUG,
as it's missing the Match keyword
Related to #12118.
Fix #16940
Diffstat (limited to 'plugins/epan/mate/examples/pasv_ftp.mate')
-rw-r--r-- | plugins/epan/mate/examples/pasv_ftp.mate | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/plugins/epan/mate/examples/pasv_ftp.mate b/plugins/epan/mate/examples/pasv_ftp.mate index 24ef7ab470..9a8852803b 100644 --- a/plugins/epan/mate/examples/pasv_ftp.mate +++ b/plugins/epan/mate/examples/pasv_ftp.mate @@ -1,18 +1,33 @@ -# pasv_ftp.mate +Pdu ftp_pdu Proto ftp Transport tcp/ip { + Extract ftp_addr From ip.addr; + Extract ftp_port From tcp.port; + Extract ftp_resp From ftp.response.code; + Extract ftp_req From ftp.request.command; + Extract server_addr From ftp.passive.ip; + Extract server_port From ftp.passive.port; -Action=PduDef; Name=ftp_pdu; Proto=ftp; Transport=tcp/ip; Stop=TRUE; ftp_addr=ip.addr; ftp_port=tcp.port; ftp_resp=ftp.response.code; ftp_req=ftp.request.command; server_addr=ftp.passive.ip; server_port=ftp.passive.port; + LastPdu true; +}; -Action=PduDef; Name=ftp_data_pdu; Proto=ftp-data; Transport=tcp/ip; server_addr=ip.src; server_port=tcp.srcport; +Pdu ftp_data_pdu Proto ftp-data Transport tcp/ip{ + Extract server_addr From ip.src; + Extract server_port From tcp.srcport; -Action=GopDef; Name=ftp_data; On=ftp_data_pdu; server_addr; server_port; -Action=GopStart; For=ftp_data; server_addr; +}; -Action=GopDef; Name=ftp_ctl; On=ftp_pdu; ftp_addr; ftp_addr; ftp_port; ftp_port; -Action=GopStart; For=ftp_ctl; ftp_resp=220; -Action=GopStop; For=ftp_ctl; ftp_resp=221; -Action=GopExtra; For=ftp_ctl; server_addr; server_port; +Gop ftp_data On ftp_data_pdu Match (server_addr, server_port) { + Start (server_addr); +}; -Action=GogDef; Name=ftp_ses; -Action=GogKey; For=ftp_ses; On=ftp_ctl; ftp_addr; ftp_addr; ftp_port; ftp_port; -Action=GogKey; For=ftp_ses; On=ftp_data; server_addr; server_port; +Gop ftp_ctl On ftp_pdu Match (ftp_addr, ftp_addr, ftp_port, ftp_port) { + Start (ftp_resp=220); + Stop (ftp_resp=221); + Extra (server_addr, server_port); +}; +Gog ftp_ses { + Member ftp_ctl (ftp_addr, ftp_addr, ftp_port, ftp_port); + Member ftp_data (server_addr, server_port); +}; + +Done; |