Hello Monks !
I need a mechanism that checks a packet length and if the packet length is less than 60 bytes, it will be padded with nulls (trailer).
Do anyone know mechnism \ module that has those abilities ?
If there's no such a module how can I start writing it ?
# creating objects
my $ethernet = NetPacket::Ethernet->decode();
my $ip = NetPacket::IP->decode();
# creating the packet
my $packet = $ethernet->encode() . $ip->encode();
# creating the trailer
if (length($packet) < 60)
Note that the trailer (null padded) is located before the IP header.