Repository navigation
Open
Description
Background
This PR introduced a new serialization infrastructure for PcapPlusPlus: #2259.
Layer now supports structured serialization through serializeLayer(ObjectScope&), with a SerializedFields struct per layer that declares its fields as FieldDescriptors. This issue tracks rolling it out to every layer in Packet++.
Definition of done for each layer
SerializedFieldsstruct with aFieldDescriptorper field andall(), includingLayer::SerializedFieldsserializeLayer(ObjectScope&)override that writes every field inall()- Doxygen comments on all fields, including units, byte order and string formats
- Tests that cover the serialized output and check that
all()matches what is written
Layers
Data link
- EthLayer (Add
serializeLayer()for Eth, IPv4, IPv6, TCP and UDP layers #2261) - EthDot3Layer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- LLCLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- VlanLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- MplsLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- SllLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- Sll2Layer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- NullLoopbackLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- ArpLayer (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
- StpLayer (Add STP layer serialization #2308)
- PPPoELayer (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
- CiscoHdlcLayer (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
- NflogLayer (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
- WakeOnLanLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- VxlanLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
Network
- IPv4Layer (Add
serializeLayer()for Eth, IPv4, IPv6, TCP and UDP layers #2261) - IPv6Layer (and IPv6 extensions) (Add
serializeLayer()for Eth, IPv4, IPv6, TCP and UDP layers #2261) - IcmpLayer (feat(Packet++): add ICMP and ICMPv6 layer serialization #2289)
- IcmpV6Layer (feat(Packet++): add ICMP and ICMPv6 layer serialization #2289)
- IgmpLayer (v1/v2/v3) (feat(Packet++): add IGMP layer serialization (#2278) #2296)
- GreLayer (feat(Packet++): add GRE layer serialization (#2278) #2297)
- IPSecLayer (AH, ESP) (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
- VrrpLayer (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
Transport
- TcpLayer (Add
serializeLayer()for Eth, IPv4, IPv6, TCP and UDP layers #2261) - UdpLayer (Add
serializeLayer()for Eth, IPv4, IPv6, TCP and UDP layers #2261) - TpktLayer (Add serialization for: EthDot3, VLAN, VXLAN, LLC, SLL, SLL2, MPLS, Null/loopback, TPKT, WOL #2277)
- CotpLayer (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
Application
- HttpRequestLayer / HttpResponseLayer (Add serialization for HTTP request and response layers #2340)
- DnsLayer (Adds serialization support for
DnsLayerandDnsOverTcpLayer. #2347) - DhcpLayer (feat(Packet++): add DHCP and DHCPv6 layer serialization #2290)
- DhcpV6Layer (feat(Packet++): add DHCP and DHCPv6 layer serialization #2290)
- SipLayer / SdpLayer (Add serialization for SIP and SDP layers #2357)
- SmtpLayer (Add serialization for S7COMM, SOME/IP, WireGuard, SMTP and FTP #2328)
- FtpLayer (Add serialization for S7COMM, SOME/IP, WireGuard, SMTP and FTP #2328)
- TelnetLayer (Add serialization support for TelnetLayer #2364)
- SSLLayer
- SSHLayer
- BgpLayer (Add serialization support for BgpLayer (all message types) #2366)
- RadiusLayer (feat(Packet++): add RADIUS layer serialization #2295)
- NtpLayer (Add NTP layer serialization #2306)
- GtpLayer (v1/v2) (Add GTPv1 and GTPv2 layer serialization #2334)
- L2TPLayer
- SomeIpLayer (Add serialization for S7COMM, SOME/IP, WireGuard, SMTP and FTP #2328)
- SomeIpSdLayer (Add serialization for S7COMM, SOME/IP, WireGuard, SMTP and FTP #2328)
- DoIpLayer (Add serialization support for DoIpLayer #2371)
- S7CommLayer (Add serialization for S7COMM, SOME/IP, WireGuard, SMTP and FTP #2328)
- ModbusLayer (Add serialization for ARP, CHDLC, COTP, MODBUS, NFLOG, PPPoE, VRRP, IPSEC #2288)
- WireGuardLayer (Add serialization for S7COMM, SOME/IP, WireGuard, SMTP and FTP #2328)
- QuicLayer (Add QUIC v1 layer serialization #2335)
Activity
egecetin commentedon Oct 11, 2026
Once all layers are supported, it might be a good idea to include example code (in Examples folder) demonstrating how to use serialization for a short pcap file. Maybe you can add it to checklist this also so it wont be forgotten
seladb commentedon Oct 11, 2026
Yes, once all layers are supported I intend to make the
serializeLayerand abstract method so new layers have to implement it, and I can also add an example app to serialize pcap files. I prefer to do it separately and not part of this issue to keep this issue only for tracking the layers.feat(Packet++): add GRE layer serialization (#2297)
NartanNaik commentedon Nov 6, 2026
Hi, I would like to work on adding serialization support for SSHLayer. This is my first time contributing!
6bb6md6issc commentedon Nov 6, 2026
Hi, I would like to work on SIP / SDP layer!
seladb commentedon Nov 11, 2026
Thank you @NartanNaik for , please feel free to open a PR 🙏
seladb commentedon Nov 11, 2026
@6bb6md6issc I saw your PR, I'm sorry for the delay - I'll review it soon
Hack15951 commentedon Nov 12, 2026
Hi @seladb, I would like to work on serialization support for BgpLayer
seladb commentedon Nov 12, 2026
Sure @Hack15951 , please go for it! 🙏
way-wei96 commentedon Nov 12, 2026
Hi, I'd like to take TelnetLayer serialization — PR is here: #2364
Add serialization support for TelnetLayer (#2364)
Add serialization support for BgpLayer (all message types) (#2366)