diff --git a/Info.pm b/Info.pm index d33d78f3..c52dd46b 100644 --- a/Info.pm +++ b/Info.pm @@ -2522,6 +2522,20 @@ sub munge_bits { return unpack("b*",$bits); } +=item munge_caps + +Takes an octet string and returns an ascii binary string, 7 digits long, MSB. + +=cut + +sub munge_caps { + my $caps = shift; + return unless defined $caps; + + my $bits = substr(unpack("B*",$caps),-7); + return $bits; +} + =item munge_counter64 If $BIGINT is set to true, then a Math::BigInt object is returned. @@ -2577,6 +2591,20 @@ sub munge_port_list { return $list; } +=item munge_null() + +Removes nulls from a string + +=cut + +# munge_null() - removes nulls (\0) +sub munge_null { + my $text = shift || return; + + $text =~ s/\0//g; + return $text; +} + =back =head2 Internally Used Functions