Skip to content

Commit

Permalink
lib.macaddress: add bytes method.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Jun 2, 2016
1 parent 2b9ef2c commit e9f5dda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/macaddress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ function mac_mt:int ()
return self.bits
end

function mac_mt:bytes ()
return self.bytes
end

function mac_mt:subbits (i,j)
local b = bit.rshift(self.bits, i)
local mask = bit.bnot(bit.lshift(0xffffffffffffLL, j-i))
Expand Down

0 comments on commit e9f5dda

Please sign in to comment.