// Copyright (c) 2015 Robert Clipsham // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. extern crate pnet_macros; extern crate pnet_macros_support; use pnet_macros::packet; use pnet_macros_support::types::*; #[packet] pub struct Mqtt { source: u16be, destination: u16be, #[length_fn="mqtt_options_length"] options: Vec, t: u8, #[payload] payload: Vec, } fn mqtt_options_length(_: &MqttPacket) -> usize { 0 } fn main() {}