Skip to main content

pamoja_mesh_frame_broadcast

Function pamoja_mesh_frame_broadcast 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mesh_frame_broadcast( src: u32, id: u16, payload: *const u8, payload_len: usize, out_frame: *mut *mut PamojaMeshFrame, ) -> PamojaStatus
Expand description

Builds a mesh frame addressed to every node.

§Arguments

  • src - the address of this node.
  • id - the sequence number identifying this packet from this source.
  • payload - the bytes to carry.
  • payload_len - the payload length in bytes.
  • out_frame - receives the new frame.

§Returns

PamojaStatus::Ok on success, with *out_frame set to a handle the caller must release with pamoja_mesh_frame_free, or PamojaStatus::InvalidArgument if the payload is too long.

§Safety

payload must point to at least payload_len readable bytes when that length is non-zero, and out_frame must point to a writable *mut PamojaMeshFrame.