![]() |
![]() |
Packet patching configuration. More...
#include <pa.h>
Data Fields | |
uint16_t | ctrlBitfield |
uint16_t | nPatchBytes |
uint16_t | totalPatchSize |
uint16_t | offset |
uint8_t * | patchData |
Packet patching configuration.
paPatchInfo_t is used to create data patch command. The patch command is used to patch existing data or insert data in the packet in both to-network and from-network directions.
In the to-network direction, it can be used to patch the authentication tag provided by SASS into the AH header within the packet. In this case, the patch data is not present at the command when it is formatted and it is appended by the SASS. The Pa_formatRoutePatch is used to create a command block along with a packet routing command to forward the packet after the patch is complete
In the from-network direction, it can be used to insert up to 32 bytes to the offset location as part of the command set to be executed after a LUT1 or LUT2 match. This command can be used to patch the entire MAC header for MAC router functionality. It may be further enhanced and combined with other commands to support IP forwarding operation in the future. A short version of the patch command can be used to insert up to 2 bytes into the current parsing location of the packet after a LUT2 match.
uint16_t paPatchInfo_t::ctrlBitfield |
Patch operation control information as defined at PA Patch Command Control Info Bit Definitions
uint16_t paPatchInfo_t::nPatchBytes |
The number of bytes to be patched
uint16_t paPatchInfo_t::offset |
Offset from the start of the packet for the patch to begin in the to-network direction Offset from the start of the current header for the patch to begin in the from-network direction
uint8_t* paPatchInfo_t::patchData |
Pointer to the patch data
uint16_t paPatchInfo_t::totalPatchSize |
The number of patch bytes in the patch command, must be >= to nPatchBytes and a multiple of 4 bytes