| 1 | # | ||
| 2 | # $Id$ | ||
| 3 | # | ||
| 4 | # lookup::ip Brik | ||
| 5 | # | ||
| 6 | package Metabrik::Lookup::Ip; | ||
| 7 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | ▶ | use base qw(Metabrik::Lookup::Ethernet); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | sub brik_properties { | ||
| 13 | return { | ||
| 14 | revision => '$Revision$', | ||
| 15 | tags => [ qw(unstable ipv4 ipv6) ], | ||
| 16 | author => 'GomoR <GomoR[at]metabrik.org>', | ||
| 17 | license => 'http://opensource.org/licenses/BSD-3-Clause', | ||
| 18 | commands => { | ||
| 19 | from_dec => [ qw(dec_number) ], | ||
| 20 | from_hex => [ qw(hex_number) ], | ||
| 21 | from_string => [ qw(ip_type) ], | ||
| 22 | }, | ||
| 23 | }; | ||
| 24 | } | ||
| 25 | |||
| 26 | sub _lookup { | ||
| 27 | my $self = shift; | ||
| 28 | |||
| 29 | my $lookup = { | ||
| 30 | '0x00' => 'ipv6_hopbyhop', | ||
| 31 | '0x01' => 'icmpv4', | ||
| 32 | '0x02' => 'igmp', | ||
| 33 | '0x03' => 'ggp', | ||
| 34 | '0x04' => 'ipip', | ||
| 35 | '0x05' => 'st', | ||
| 36 | '0x06' => 'tcp', | ||
| 37 | '0x07' => 'cbt', | ||
| 38 | '0x08' => 'egp', | ||
| 39 | '0x09' => 'igrp', | ||
| 40 | '0x0c' => 'pup', | ||
| 41 | '0x0d' => 'argus', | ||
| 42 | '0x0e' => 'emcon', | ||
| 43 | '0x0f' => 'xnet', | ||
| 44 | '0x10' => 'chaos', | ||
| 45 | '0x11' => 'udp', | ||
| 46 | '0x12' => 'mux', | ||
| 47 | '0x13' => 'dcnmeas', | ||
| 48 | '0x14' => 'hmp', | ||
| 49 | '0x15' => 'prm', | ||
| 50 | '0x16' => 'idp', | ||
| 51 | '0x17' => 'trunk1', | ||
| 52 | '0x18' => 'trunk2', | ||
| 53 | '0x19' => 'leaf1', | ||
| 54 | '0x20' => 'leaf2', | ||
| 55 | '0x21' => 'dccp', | ||
| 56 | '0x22' => '3pc', | ||
| 57 | '0x23' => 'idpr', | ||
| 58 | '0x24' => 'xtp', | ||
| 59 | '0x25' => 'ddp', | ||
| 60 | '0x26' => 'idprcmtp', | ||
| 61 | '0x27' => 'tpplusplus', | ||
| 62 | '0x28' => 'il', | ||
| 63 | '0x29' => 'ipv6', | ||
| 64 | '0x2a' => 'sdrp', | ||
| 65 | '0x2b' => 'ipv6_routing', | ||
| 66 | '0x2c' => 'ipv6_fragment', | ||
| 67 | '0x2d' => 'idrp', | ||
| 68 | '0x2e' => 'rsvp', | ||
| 69 | '0x2f' => 'gre', | ||
| 70 | '0x32' => 'esp', | ||
| 71 | '0x33' => 'ah', | ||
| 72 | '0x3a' => 'icmpv6', | ||
| 73 | '0x3b' => 'ipv6_nonext', | ||
| 74 | '0x3c' => 'ipv6_destination', | ||
| 75 | '0x58' => 'eigrp', | ||
| 76 | '0x59' => 'ospf', | ||
| 77 | '0x61' => 'etherip', | ||
| 78 | '0x67' => 'pim', | ||
| 79 | '0x70' => 'vrrp', | ||
| 80 | '0x76' => 'stp', | ||
| 81 | '0x84' => 'sctp', | ||
| 82 | '0x87' => 'ipv6_mobility', | ||
| 83 | '0x88' => 'udplite', | ||
| 84 | }; | ||
| 85 | |||
| 86 | return $lookup; | ||
| 87 | } | ||
| 88 | |||
| 89 | 1; | ||
| 90 | |||
| 91 | __END__ | ||