%% Write Global Header for 5G NR Packet to PCAP File
% Create a default PCAP file writer object.

pcapObj = pcapWriter;

% 5G NR packets do not have a valid link type. As per Tcpdump, if a valid link type is not present, specify the link type of SLL packet.

linkType = 113;

% Use the PCAP file writer object and the link type of the SLL packet to write a global header for the 5G NR packet to the PCAP file.

writeGlobalHeader(pcapObj,linkType);

% Copyright 2020 The MathWorks, Inc.