On this page
packet.set_bytes
Writes an array of byte values (each wrapped to 0-255) into the payload at a payload-relative offset.
Syntax
Atlas Script
packet.set_bytes(offset, bytes)Parameters
offset- Byte offset into the packet. Payload-relative for packet.* methods, and absolute (whole IP packet) for the raw_* variants.
bytes- Array of byte values (0-255) written into the packet payload.
Return value
See the remarks for the returned value and runtime behavior.
Remarks
Writes an array of byte values (each wrapped to 0-255) into the payload at a payload-relative offset. Values that would pass the end of the packet are skipped.
Examples
Usage pattern
// Replace offset, bytes with values described above.
packet.set_bytes(offset, bytes);