Browse docspacket.raw_write
On this page
API method

packet.raw_write

Writes a typed value into the whole IP packet at an absolute offset, with the same wrapping as packet.write.

Syntax

Atlas Script
packet.raw_write(type, offset, value)

Parameters

type
Numeric value type: "u8", "i8", "u16", "i16", "u32", "i32", "f32", or "f64", with an optional "be" suffix for big-endian.
offset
Byte offset into the packet. Payload-relative for packet.* methods, and absolute (whole IP packet) for the raw_* variants.
value
Value written, converted, or evaluated by this method. Its required type and range are described in Remarks.

Return value

See the remarks for the returned value and runtime behavior.

Remarks

Writes a typed value into the whole IP packet at an absolute offset, with the same wrapping as packet.write. If the edited packet is no longer a valid IP packet of the same version, or its length field claims more bytes than the packet has, Atlas sends the original packet instead.

Examples

Usage pattern
// Replace type, offset, value with values described above.
packet.raw_write(type, offset, value);
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.