| 1 | # | ||
| 2 | # $Id: Layer4.pm,v 1.2.2.2 2006/05/25 12:18:19 gomor Exp $ | ||
| 3 | # | ||
| 4 | package Net::Packet::Layer4; | ||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | require Net::Packet::Layer; | ||
| 9 | our @ISA = qw(Net::Packet::Layer); | ||
| 10 | __PACKAGE__->cgBuildIndices; | ||
| 11 | |||
| 12 | use Net::Packet::Consts qw(:layer); | ||
| 13 | |||
| 14 | sub layer { NP_LAYER_N_4 } | ||
| 15 | |||
| 16 | sub _is { (shift->is eq shift()) ? 1 : 0 } | ||
| 17 | sub isTcp { shift->_is(NP_LAYER_TCP) } | ||
| 18 | sub isUdp { shift->_is(NP_LAYER_UDP) } | ||
| 19 | sub isIcmpv4 { shift->_is(NP_LAYER_ICMPv4) } | ||
| 20 | |||
| 21 | 1; | ||
| 22 | |||
| 23 | __END__ |