diff options
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; |