X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/b6d782ed788370a34f306f43865a15ab661e6a42..4cfda08117c4288a5408d45db1ef4be82f4facaa:/m17core/src/protocol.rs?ds=inline diff --git a/m17core/src/protocol.rs b/m17core/src/protocol.rs index a325152..f2e154e 100755 --- a/m17core/src/protocol.rs +++ b/m17core/src/protocol.rs @@ -93,6 +93,16 @@ impl PacketType { pub struct LsfFrame(pub [u8; 30]); impl LsfFrame { + pub fn new_voice(source: &Address, destination: &Address) -> Self { + let mut out = Self([0u8; 30]); + out.set_source(source); + out.set_destination(destination); + out.set_mode(Mode::Stream); + out.set_data_type(DataType::Voice); + out.set_encryption_type(EncryptionType::None); + out + } + pub fn new_packet(source: &Address, destination: &Address) -> Self { let mut out = Self([0u8; 30]); out.set_source(source);