| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Net::Netfilter::NetFlow::ConntrackFormat; | 
| 2 |  |  |  |  |  |  | { | 
| 3 |  |  |  |  |  |  | $Net::Netfilter::NetFlow::ConntrackFormat::VERSION = '1.113260'; | 
| 4 |  |  |  |  |  |  | } | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 1 |  |  | 1 |  | 62 | use strict; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 45 |  | 
| 7 | 1 |  |  | 1 |  | 6 | use warnings FATAL => 'all'; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 41 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 1 |  |  | 1 |  | 5 | use base 'Exporter'; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 253 |  | 
| 10 |  |  |  |  |  |  | our @EXPORT = qw( | 
| 11 |  |  |  |  |  |  | %ct_new_key | 
| 12 |  |  |  |  |  |  | %ct_destroy_key | 
| 13 |  |  |  |  |  |  | %ct_mask_fields | 
| 14 |  |  |  |  |  |  | ); | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | # TODO document and make user configurable | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | # 1:icmp - src,src,dst,id | 
| 19 |  |  |  |  |  |  | # 6:tcp  - src,sport,src,sport,dst,dport | 
| 20 |  |  |  |  |  |  | # 17:udp - src,sport,src,sport,dst,dport | 
| 21 |  |  |  |  |  |  | # first src is private, second is public (post SNAT) | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | our %ct_new_key = ( | 
| 24 |  |  |  |  |  |  | 1  => [4,11,5,8], | 
| 25 |  |  |  |  |  |  | 6  => [5,7,11,13,6,8], | 
| 26 |  |  |  |  |  |  | 17 => [4,6,10,12,5,7], | 
| 27 |  |  |  |  |  |  | ); | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | our %ct_destroy_key = ( | 
| 30 |  |  |  |  |  |  | 1  => [3,11,4,7], | 
| 31 |  |  |  |  |  |  | 6  => [3,5,10,12,4,6], | 
| 32 |  |  |  |  |  |  | 17 => [3,5,10,12,4,6], | 
| 33 |  |  |  |  |  |  | ); | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | # dpkts, doctets, srcaddr, dstaddr, srcport, dstport | 
| 36 |  |  |  |  |  |  | our %ct_mask_fields = ( | 
| 37 |  |  |  |  |  |  | 1 => { | 
| 38 |  |  |  |  |  |  | # field 17 does not exist | 
| 39 |  |  |  |  |  |  | private_src => [8,9,3,4,17,17], | 
| 40 |  |  |  |  |  |  | public_src  => [8,9,11,10,17,17], | 
| 41 |  |  |  |  |  |  | dst => [15,16,10,11,17,17], | 
| 42 |  |  |  |  |  |  | }, | 
| 43 |  |  |  |  |  |  | 6 => { | 
| 44 |  |  |  |  |  |  | private_src => [7,8,3,4,5,6], | 
| 45 |  |  |  |  |  |  | public_src  => [7,8,10,9,12,11], | 
| 46 |  |  |  |  |  |  | dst => [13,14,9,10,11,12], | 
| 47 |  |  |  |  |  |  | }, | 
| 48 |  |  |  |  |  |  | 17 => { | 
| 49 |  |  |  |  |  |  | private_src => [7,8,3,4,5,6], | 
| 50 |  |  |  |  |  |  | public_src  => [7,8,10,9,12,11], | 
| 51 |  |  |  |  |  |  | dst => [13,14,9,10,11,12], | 
| 52 |  |  |  |  |  |  | }, | 
| 53 |  |  |  |  |  |  | ); | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | __END__ |