Get full reference IPFIX field formats from RFC and made converter for it

This commit is contained in:
Pavel Odintsov 2015-03-22 00:18:43 +03:00
parent cd4ac277de
commit d81237df09
2 changed files with 3406 additions and 0 deletions

42
ipfix_csv_processor.pl Normal file
View File

@ -0,0 +1,42 @@
#!/usr/bin/perl
use strict;
use warnings;
# This script can convert data from http://www.iana.org/assignments/ipfix/ipfix.xhtml ipfix standard
# represented in CSV form into form suitable for us
# http://www.iana.org/assignments/ipfix/ipfix-information-elements.csv
# to our C/C++ frndly storage format
open my $fl, "<", "ipfix_fields.csv" or die "Can't open input file";
my $field_id = 0;
while (<$fl>) {
chomp;
my $we_will_process_this_line = /^(\d+),/;
# Skip crap
unless ($we_will_process_this_line) {
next;
}
# Numbers should growth monotonous
if ($1 < $field_id) {
next;
}
$field_id++;
my @keys = ("id", "name", "data_type", "data_type_semantics", "status", "description","units", "range", "reference", "requester", "revision", "date");
my %data = ();
@data{ @keys } = split /,/, $_;
# skip deprecated fields
if ($data{status} eq 'deprecated') {
next;
}
print "$data{id} $data{name} $data{data_type}\n";
}

3364
ipfix_fields.csv Normal file

File diff suppressed because it is too large Load Diff