mosh has asked for the wisdom of the Perl Monks concerning the following question:
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 ?
Note that the trailer (null padded) is located before the IP header.... # 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) { ??? }
Ideas, anyone?
Mosh.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating trailer on packets
by polettix (Vicar) on May 16, 2005 at 09:08 UTC | |
by mosh (Scribe) on May 17, 2005 at 07:11 UTC | |
|
Re: Creating trailer on packets
by BrowserUk (Patriarch) on May 16, 2005 at 09:35 UTC | |
by tlm (Prior) on May 16, 2005 at 10:23 UTC | |
by BrowserUk (Patriarch) on May 16, 2005 at 10:29 UTC | |
|
Re: Creating trailer on packets
by ghenry (Vicar) on May 16, 2005 at 09:28 UTC | |
|
Re: Creating trailer on packets
by eXile (Priest) on May 16, 2005 at 18:59 UTC | |
|
Re: Creating trailer on packets
by kwaping (Priest) on May 16, 2005 at 18:22 UTC | |
|
Re: Creating trailer on packets
by Jim_Gillespie (Initiate) on May 17, 2005 at 14:59 UTC |