MCPcopy Create free account
hub / github.com/FDio/vpp / appendMAC

Method appendMAC

extras/packetforge/ProtocolHeader.py:281–293  ·  view source on GitHub ↗
(self, big, exp)

Source from the content-addressed store, hash-verified

279 return big
280
281 def appendMAC(self, big, exp):
282 mac = bytes(6)
283 if exp != None:
284 _, mac = ExpressionConverter.ToMacAddress(exp)
285 if not mac:
286 print("Inavalid MAC Address")
287 return False
288
289 for i in range(6):
290 big = big << 8
291 big = big | mac[i]
292
293 return big
294
295 def appendByteArray(self, big, exp, size):
296 array = bytes(size >> 3)

Callers 1

appendMethod · 0.95

Calls 1

printFunction · 0.85

Tested by

no test coverage detected