Get raw text for this example (you can click any command below to see its doc)
/*   Watches trace file with smtp packets. Searches for packets with MAIL FROM command.   Adds found email address to the list of variables.   After watch, displays the filled list of variables.     Run as:   anettest -d eth0 -f this_file.fws  */
TRACE
PARAMETERS: <name of trace file>
Opens the given trace file for subsequent work with it.
"../traces/smtp_client.pcap"
VAR
PARAMETERS: <name of variable> <name of field> <initial value> ("autoset"| ["static"] )
Command creates the new variable <name of variable> or reinitializes the old one if some variable of the same name is already exist. The newly created variable will have the same value's type as <name of field>. This command also sets the <initial value> for variable. Variable's value is stored separately from packet's buffer. The "autoset" type of variable indicates that the variable will be initialized by received packet (while using WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command or its analogs), i.e. from received packet will be obtained value of <name of field> and copied to variable. "static" type indicates that variable must not be changed while receiving packet. The "static" keyword may be omitted only if parameters to command are enclosed in round brackets.
The <name of variable> may appear among parameters to other commands. In this case it will be replaced by its value. Such a replacement will be also performed in strings enclosed in apostrophes. In this case the <name of variable> must be enclosed in $ (ex: 'value of variable = $name$').
(i,num,1) VAR
PARAMETERS: <name of variable> <name of field> <initial value> ("autoset"| ["static"] )
Command creates the new variable <name of variable> or reinitializes the old one if some variable of the same name is already exist. The newly created variable will have the same value's type as <name of field>. This command also sets the <initial value> for variable. Variable's value is stored separately from packet's buffer. The "autoset" type of variable indicates that the variable will be initialized by received packet (while using WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command or its analogs), i.e. from received packet will be obtained value of <name of field> and copied to variable. "static" type indicates that variable must not be changed while receiving packet. The "static" keyword may be omitted only if parameters to command are enclosed in round brackets.
The <name of variable> may appear among parameters to other commands. In this case it will be replaced by its value. Such a replacement will be also performed in strings enclosed in apostrophes. In this case the <name of variable> must be enclosed in $ (ex: 'value of variable = $name$').
(nf,num,0) VAR
PARAMETERS: <name of variable> <name of field> <initial value> ("autoset"| ["static"] )
Command creates the new variable <name of variable> or reinitializes the old one if some variable of the same name is already exist. The newly created variable will have the same value's type as <name of field>. This command also sets the <initial value> for variable. Variable's value is stored separately from packet's buffer. The "autoset" type of variable indicates that the variable will be initialized by received packet (while using WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command or its analogs), i.e. from received packet will be obtained value of <name of field> and copied to variable. "static" type indicates that variable must not be changed while receiving packet. The "static" keyword may be omitted only if parameters to command are enclosed in round brackets.
The <name of variable> may appear among parameters to other commands. In this case it will be replaced by its value. Such a replacement will be also performed in strings enclosed in apostrophes. In this case the <name of variable> must be enclosed in $ (ex: 'value of variable = $name$').
(v1,num,1) VAR
PARAMETERS: <name of variable> <name of field> <initial value> ("autoset"| ["static"] )
Command creates the new variable <name of variable> or reinitializes the old one if some variable of the same name is already exist. The newly created variable will have the same value's type as <name of field>. This command also sets the <initial value> for variable. Variable's value is stored separately from packet's buffer. The "autoset" type of variable indicates that the variable will be initialized by received packet (while using WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command or its analogs), i.e. from received packet will be obtained value of <name of field> and copied to variable. "static" type indicates that variable must not be changed while receiving packet. The "static" keyword may be omitted only if parameters to command are enclosed in round brackets.
The <name of variable> may appear among parameters to other commands. In this case it will be replaced by its value. Such a replacement will be also performed in strings enclosed in apostrophes. In this case the <name of variable> must be enclosed in $ (ex: 'value of variable = $name$').
(v2,num,1)
// watches trace
CYC
PARAMETERS: <number of iterations>
Command instructs that next WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) or next block of script will be processed by several times = <number of iterations>. The "inf" value is available which means infinite iterant processing.
24 {
// number of packets examined (must be less than total number of packets in trace file)
GETPAC
PARAMETERS: <number of packet>
Copies the specified packet from trace file to the buffer of current packet.
i
// loads packet from file
POS
PARAMETERS: <new position> | <field's name>
Sets the <new position> of byte pointer. In the case of <field's name> new position will be equal to field's position.
= td GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO command but performs back search.
command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
command but performs BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
search.
command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
(
'MAIL F'
)
// searches
"mail from"
IF
PARAMETERS: <value1> <type of compare> <value2> "{" <first block of script> "}" [ "else" "{" <second block of script> "}" ]
Processes the first block of script if condition is met, otherwise processes the second block if it is specified. <Types of compare>: = (==), !=, >, <, >=, <=. Hexadecimals number are treated as strings (with 0x prefix). If you have problems try to watch how these values are represented by string using PRINT
PARAMETERS: <message>
Displays the given message. Use symbol in message to indicate that line feed must be performed.
command for example.
GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO command but performs back search.
command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
command but performs BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
search.
command. 1 - successful search, 0 - not successful search.
= 1 { .sss
''
GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO command but performs back search.
command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
command but performs BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
search.
command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
(
'<'
) PASS
PARAMETERS: <number of bytes>
Increases the byte pointer for the given <number of bytes>.
1 SETPOS
PARAMETERS: <field's name> <decimal value of a new position>
Sets a new position for the given field.
(sss, CURPOS
PARAMETERS: no command
This special value allows to get the current value of byte pointer.
) v1 = CURPOS
PARAMETERS: no command
This special value allows to get the current value of byte pointer.
GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO command but performs back search.
command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
or GOTOB
PARAMETERS: <value of any type> [<stop position>]
Is similar to GOTO
PARAMETERS: <value of any type> [<stop position>]
Performs the search of the given value in current packet. The search will be started from the current position of byte pointer. Value may has any type. The result of search is available through GOTORES
PARAMETERS: no command
This is a special value which allows to get the result of last search performed by GOTO or GOTOB command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
command but performs BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
search.
command. 1 - successful search, 0 - not successful search.
keyword. In the case of successful search the byte pointer will be moved to the found entry. Stop position may be equal to -1. It means search to the end of packet. Stop position may be omitted but in this case parameters must be enclosed in brackets.
(
'>'
) v2 = CURPOS
PARAMETERS: no command
This special value allows to get the current value of byte pointer.
v2 -= v1 SETSIZE
PARAMETERS: <name of field> <decimal value of a new size of field>
Allows to specify the size for fields which don't have concrete size initially (strings). It can be also used to change the size for fields with concrete size (hexadecimal numbers). Value "any" may be used to specify the undefined size. A variable may be given so the size may be calculated before. See "samples/http_parser".
(sss, v2) IF
PARAMETERS: <value1> <type of compare> <value2> "{" <first block of script> "}" [ "else" "{" <second block of script> "}" ]
Processes the first block of script if condition is met, otherwise processes the second block if it is specified. <Types of compare>: = (==), !=, >, <, >=, <=. Hexadecimals number are treated as strings (with 0x prefix). If you have problems try to watch how these values are represented by string using PRINT
PARAMETERS: <message>
Displays the given message. Use symbol in message to indicate that line feed must be performed.
command for example.
v2 != 0 {
//PRINT
PARAMETERS: <message>
Displays the given message. Use symbol in message to indicate that line feed must be performed.
'packet$i$\t\t$sss$\n'
VAR
PARAMETERS: <name of variable> <name of field> <initial value> ("autoset"| ["static"] )
Command creates the new variable <name of variable> or reinitializes the old one if some variable of the same name is already exist. The newly created variable will have the same value's type as <name of field>. This command also sets the <initial value> for variable. Variable's value is stored separately from packet's buffer. The "autoset" type of variable indicates that the variable will be initialized by received packet (while using WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command or its analogs), i.e. from received packet will be obtained value of <name of field> and copied to variable. "static" type indicates that variable must not be changed while receiving packet. The "static" keyword may be omitted only if parameters to command are enclosed in round brackets.
The <name of variable> may appear among parameters to other commands. In this case it will be replaced by its value. Such a replacement will be also performed in strings enclosed in apostrophes. In this case the <name of variable> must be enclosed in $ (ex: 'value of variable = $name$').
(
'email$nf$'
,td,
'$sss$'
)
// creates new variable in list
nf += 1 } } i += 1 }
// displays the list
i = nf i = 0 VAR
PARAMETERS: <name of variable> <name of field> <initial value> ("autoset"| ["static"] )
Command creates the new variable <name of variable> or reinitializes the old one if some variable of the same name is already exist. The newly created variable will have the same value's type as <name of field>. This command also sets the <initial value> for variable. Variable's value is stored separately from packet's buffer. The "autoset" type of variable indicates that the variable will be initialized by received packet (while using WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command or its analogs), i.e. from received packet will be obtained value of <name of field> and copied to variable. "static" type indicates that variable must not be changed while receiving packet. The "static" keyword may be omitted only if parameters to command are enclosed in round brackets.
The <name of variable> may appear among parameters to other commands. In this case it will be replaced by its value. Such a replacement will be also performed in strings enclosed in apostrophes. In this case the <name of variable> must be enclosed in $ (ex: 'value of variable = $name$').
(v10, td,
''
) CYC
PARAMETERS: <number of iterations>
Command instructs that next WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in DEFAULTS
PARAMETERS: {accept | drop | any | REVERS
PARAMETERS: not command
Request specification. May only be given in parameters for DEFAULT command. Instructs to reverse the request for every packet.
}
Defines default requests for packets. These requests will be applied when there are not enough explicitly defined requests for some packet (specified as parameters to command SEND, WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
and its analogs). Initially default requests are ACCEPT ANY ANY... i.e. a single request for the first interface specified via option -d.
(command DEFAULT). For TCP DEVICE
PARAMETERS: <type of device> {<name of interface>}
Reopens interfaces. The type of device: eth, ip, tcp. The name of device is the same as for -d option, depends on the type of device. New line terminates the list of names.
the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT
PARAMETERS: {accept | drop | any }
Analog of WAIT command. Adds the above packet to the set of packets which will be waited by command WAIT or its analogs. This command does not start actual waiting (doesn't suspend script execution). Nevertheless, just after adding the packet may be registered as received. If some packet is registered as received before the call to WAIT (WAITALL
PARAMETERS: no parameters
The analog of WAIT command. Doesn't add the previously defined packet to the list of waited ones. Starts waiting simply. Packets may be already added by ADD
PARAMETERS:
Alias of TOWAIT command.
command (or using of UNFIX command).
) then the command will ignore it and wait for a next packet (see also SENDWAITOTHER
PARAMETERS: no parameters
Works similar to "SEND WAITALL" sentence. Purpose: make atomic operation. Without this command there would be a chance that a waited packet did not cause command WAITALL stop waiting if it was accepted after SEND but before WAITALL started waiting. However it would be registered as received in any case. This command should be always used when you need to send a request and RELIABLY receive a response on it never missing.
).
command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) or next block of script will be processed by several times = <number of iterations>. The "inf" value is available which means infinite iterant processing.
inf { IF
PARAMETERS: <value1> <type of compare> <value2> "{" <first block of script> "}" [ "else" "{" <second block of script> "}" ]
Processes the first block of script if condition is met, otherwise processes the second block if it is specified. <Types of compare>: = (==), !=, >, <, >=, <=. Hexadecimals number are treated as strings (with 0x prefix). If you have problems try to watch how these values are represented by string using PRINT
PARAMETERS: <message>
Displays the given message. Use symbol in message to indicate that line feed must be performed.
command for example.
i >= nf { BREAK
PARAMETERS: no parameters
Breaks the cycle caused by using CYC
PARAMETERS: <number of iterations>
Command instructs that next WAIT
PARAMETERS: {accept | drop | any }
Waits for packet whose mask is defined above. The command will finish work when such packet is received on waitable interface. The waitable interface is interface for which strict request (accept or drop) have been specified in parameters to command or in defaults (command DEFAULT). For TCP device the command will only wait data on the main interface. In the general case command may wait no one but several packets (added by ADD
PARAMETERS:
Alias of TOWAIT command.
command). If any of them is received then command terminates. Command waits packets until timeout expires (command TIMEOUT
PARAMETERS: <interval in milliseconds>
Defines the timeout for WAIT command (and its analogs), also for imitation of application's work. Null value means infinite timeout (such timeout will not be applied for imitation of application's work). In the case of negative value its absolute value will be obtained as timeout, but WAIT command (its analogs) will work differently: it will always wait for the whole timeout (not terminating on first received packet). So several packets may be registered as received. This command also defines the timeout for TCP server while waiting for connections.
). See "samples/waiting_packets.fws".
command (its analogs) or next block of script will be processed by several times = <number of iterations>. The "inf" value is available which means infinite iterant processing.
command.
} else { v10 =
'email$i$'
PRINT
PARAMETERS: <message>
Displays the given message. Use symbol in message to indicate that line feed must be performed.
'$v10$\n'
} i += 1 }