Commit 28631f5c authored by Alexander Gall's avatar Alexander Gall

Rename interface agent, add shmem-dir option

The interface agent is renamed from interfaces.  Both agents now
accept the command-line option "--shmem-dir" to set the directory
where the Snabb shared memory segments reside.
parent d0f48229
...@@ -10,7 +10,7 @@ WriteMakefile( ...@@ -10,7 +10,7 @@ WriteMakefile(
'NetSNMP::ASN' => '5.0.404', 'NetSNMP::ASN' => '5.0.404',
'Net::SNMP' => '6.0.1', 'Net::SNMP' => '6.0.1',
}, },
EXE_FILES => [ 'bin/interfaces', 'bin/pseudowire' ], EXE_FILES => [ 'bin/interface', 'bin/pseudowire' ],
ABSTRACT => 'AgentX-based SNMP sub-agent for Snabb applications', ABSTRACT => 'AgentX-based SNMP sub-agent for Snabb applications',
AUTHOR => 'Alexander Gall <gall@switch.ch>', AUTHOR => 'Alexander Gall <gall@switch.ch>',
#LICENSE => 'perl', #LICENSE => 'perl',
......
...@@ -4,7 +4,7 @@ use warnings; ...@@ -4,7 +4,7 @@ use warnings;
use Getopt::Long; use Getopt::Long;
use Snabb::SNMP::Agent qw(%persistent_ifIndex %compound_scalar_handlers $sysUpTime); use Snabb::SNMP::Agent qw(%persistent_ifIndex %compound_scalar_handlers $sysUpTime);
my %opt = ( 'check-interval' => 5, my %opt = ( 'check-interval' => 5,
'shmem-dir' => '/tmp/snabb-shmem', ); 'shmem-dir' => '/var/lib/snabb/shmem', );
sub usage() { sub usage() {
print <<"EOF"; print <<"EOF";
...@@ -60,7 +60,7 @@ my %subtrees = ...@@ -60,7 +60,7 @@ my %subtrees =
); );
GetOptions(\%opt, "check-interval=i", GetOptions(\%opt, "check-interval=i",
"ifindex=s") or usage(); "ifindex=s", "shmem-dir=s") or usage();
defined $opt{ifindex} or usage(); defined $opt{ifindex} or usage();
Snabb::SNMP::Agent::start({ name => "interfaces", Snabb::SNMP::Agent::start({ name => "interfaces",
subtrees => \%subtrees, subtrees => \%subtrees,
......
...@@ -5,7 +5,7 @@ use Getopt::Long; ...@@ -5,7 +5,7 @@ use Getopt::Long;
use Snabb::SNMP::Agent qw(%persistent_ifIndex %compound_scalar_handlers); use Snabb::SNMP::Agent qw(%persistent_ifIndex %compound_scalar_handlers);
my %opt = ( 'check-interval' => 5, my %opt = ( 'check-interval' => 5,
'mibs-dirs' => '', 'mibs-dirs' => '',
'shmem-dir' => '/tmp/snabb-shmem'); 'shmem-dir' => '/var/lib/snabb/shmem');
sub usage() { sub usage() {
print <<"EOF"; print <<"EOF";
...@@ -219,7 +219,7 @@ my %subtrees = ...@@ -219,7 +219,7 @@ my %subtrees =
); );
GetOptions(\%opt, "check-interval=i", "mibs-dirs=s", GetOptions(\%opt, "check-interval=i", "mibs-dirs=s",
"ifindex=s") or usage(); "ifindex=s", "shmem-dir=s") or usage();
defined $opt{ifindex} or usage(); defined $opt{ifindex} or usage();
Snabb::SNMP::Agent::start({ name => "pseudowire", Snabb::SNMP::Agent::start({ name => "pseudowire",
subtrees => \%subtrees, subtrees => \%subtrees,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment