%% Write WLAN User-Defined Custom Block to PCAPNG File
% Create a default PCAPNG file writer object.

pcapngObj = pcapngWriter('FileName','writeWLANcustom');

% Write the interface block for WLAN.

interfaceName = 'WLAN';
wlanLinkType = 105;
interfaceId = writeInterfaceDescriptionBlock(pcapngObj,wlanLinkType, ...
    interfaceName);

% Write the custom block to specify user-defined data.

writeCustomBlock(pcapngObj,"This block writes user-defined data");

% Copyright 2020 The MathWorks, Inc.