diff options
author | Stig Thormodsrud <stig@io.vyatta.com> | 2009-03-02 15:33:40 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@io.vyatta.com> | 2009-03-02 15:33:40 -0800 |
commit | 863b6c71f0cc802809db61843dff99af0efd0999 (patch) | |
tree | be7fed78b6f122229e7bbb911b13748c59664149 /lib/Vyatta/Interface.pm | |
parent | f99deef50eda86d063338c92ceed768b5578fb0b (diff) | |
download | vyatta-cfg-863b6c71f0cc802809db61843dff99af0efd0999.tar.gz vyatta-cfg-863b6c71f0cc802809db61843dff99af0efd0999.zip |
Remove duplicate constants.
Diffstat (limited to 'lib/Vyatta/Interface.pm')
-rw-r--r-- | lib/Vyatta/Interface.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm index 73b8c6b..f83f58f 100644 --- a/lib/Vyatta/Interface.pm +++ b/lib/Vyatta/Interface.pm @@ -216,6 +216,26 @@ sub flags { return hex($val); } +sub is_broadcast { + my $self = shift; + return $self->flags() & IFF_BROADCAST; +} + +sub is_multicast { + my $self = shift; + return $self->flags() & IFF_MULTICAST; +} + +sub is_pointtopoint { + my $self = shift; + return $self->flags() & IFF_POINTOPOINT; +} + +sub is_loopback { + my $self = shift; + return $self->flags() & IFF_LOOPBACK; +} + # device exists and is online sub up { my $self = shift; |