Get raw text for this example (you can click any command below to see its doc)
/* Header file for program AnetTest. The header file for ARP protocol +--------+ |Hardware| 2 bytes |MAC | |Address | |Type | +--------+ |Protocol| 2 bytes |Address | |Type | +--------+ |Hardware| 1 byte |MAC | |Address | |Size | +--------+ |Protocol| 1 byte |Address | |Size | +--------+ |Op | 2 bytes +--------+ |Sender | 6 bytes (depends on the above size field) |MAC | |Address | +--------+ |Sender | 4 bytes (depends on the above size field) |IP | |Address | +--------+ |Target | 6 bytes (depends on the above size field) |MAC | |Address | +--------+ |Target | 4 bytes (depends on the above size field) |IP | |Address | +--------+ The fields are further explained below: +---------+-------------------------------------------------------+ |Ethernet |For a ARP request, source MAC address is the MAC | |Header |address of the host sending the ARP request, | | |destination MAC address is the Ethernet broadcast | | |address (FF:FF:FF:FF:FF:FF), frame type field is 0x806.| | |For ARP reply, source MAC address is the MAC address of| | |the host replying to the ARP request, destination MAC | | |address is the MAC address of the host that sent the | | |ARP request, and the frame type field is 0x806. | +---------+-------------------------------------------------------+ |Hardware |Type of the hardware MAC address which is being mapped.| |Address |For Ethernet the value of this field is 1. | |Type | | +---------+-------------------------------------------------------+ |Protocol |Type of the protocol address to which the MAC address | |Address |is mapped. For IP address the value of this field is | |Type |0x800. | +---------+-------------------------------------------------------+ |Hardware |Size of the hardware MAC address. For Ethernet, the | |Address |value of this field is 6. | |Size | | +---------+-------------------------------------------------------+ |Protocol |Size of the protocol address. For IP, the value of | |Address |this field is 4. | |Size | | +---------+-------------------------------------------------------+ |Operation|Type of operation being performed. The value of this | | |field can be 1 (ARP request), 2 (ARP reply) | +---------+-------------------------------------------------------+ |Source |The hardware MAC address of the host sending the ARP | |MAC |request or reply. This is same as the source MAC | |address |address present in the Ethernet header. | +---------+-------------------------------------------------------+ |Source |The IP address of the host sending the ARP request or | |IP |reply. | |address | | +---------+-------------------------------------------------------+ |Target |The hardware MAC address of the host receiving the ARP | |MAC |request or reply. This is same as the destination MAC | |address |address present in the Ethernet header. | +---------+-------------------------------------------------------+ |Target |The IP address of the host receiving the ARP request | |IP |or reply. | |address | | +---------+-------------------------------------------------------+ */// hardware MAC Address Type.arp.hardtype 0x0001// protocol address type.arp.proto 0x0800// hardware MAC address size.arp.hardsize 6// protocol address size.arp.protosize 4// operation code.arp.opcode 0x0002 BACK2PARAMETERS: <number of bytes>Reduces the pointer for the given <number of bytes>.// operation code.arp.type 0x0002 BACK2PARAMETERS: <number of bytes>Reduces the pointer for the given <number of bytes>.// operation code.æêò 0x0002// sender MAC address.arp.srcmac 01:01:01:01:01:01// sender IP address.arp.srcip 158.208.113.158 BACK4PARAMETERS: <number of bytes>Reduces the pointer for the given <number of bytes>.// sender IP address (first byte).arp.srcip1 158.// sender IP address (second byte).arp.srcip2 208.// sender IP address (third byte).arp.srcip3 113.// sender IP address (fourth byte).arp.srcip4 158.// target MAC address.arp.dstmac 00:00:00:00:00:00// target IP address.arp.dstip 10.0.0.1 DEFINEareq 0x0001 DEFINEPARAMETERS: <name> <value>Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF.PARAMETERS: <new name> <original name>Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').arep 0x0002 DEFINEPARAMETERS: <name> <value>Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF.PARAMETERS: <new name> <original name>Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').rarpreq 0x0003 DEFINEPARAMETERS: <name> <value>Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF.PARAMETERS: <new name> <original name>Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').rarprep 0x0004 DEFINEPARAMETERS: <name> <value>Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF.PARAMETERS: <new name> <original name>Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').ÿâòôðõ 0x0001 DEFINEPARAMETERS: <name> <value>Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF.PARAMETERS: <new name> <original name>Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').ðæþåæ 0x0002 POSPARAMETERS: <name> <value>Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF.PARAMETERS: <new name> <original name>Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').arp.dstip PASSPARAMETERS: <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.4PARAMETERS: <number of bytes>Increases the byte pointer for the given <number of bytes>.