frameassembly 1.0.1

A Domain-Specific Language (DSL) for writing deterministic network traffic to .pcap files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! AMQP protocol wire builder.

use crate::ast::*;
use crate::builders::WireContext;
use alloc::vec::Vec;

/// Builds an AMQP 0-9-1 protocol header or frame payload.
pub fn build_amqp_payload(
    _ctx: &WireContext,
    _spec: &AmqpSpec,
    payload_bytes: &[u8],
) -> Vec<u8> {
    let mut pkt = b"AMQP\x00\x00\x09\x01".to_vec();
    if !payload_bytes.is_empty() {
        pkt.extend_from_slice(payload_bytes);
    }
    pkt
}