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

Method appendUInt64

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

Source from the content-addressed store, hash-verified

236 return big
237
238 def appendUInt64(self, big, exp, size):
239 u64 = 0
240 if exp != None:
241 _, u64 = ExpressionConverter.ToNum(exp)
242 if not u64:
243 print("Invalid UInt32 expression")
244 return False
245
246 # cut msb
247 if size < 64:
248 u64 = u64 & ((1 << size) - 1)
249 big = big << size
250 big = big | u64
251 return big
252
253 def appendIPv4(self, big, exp):
254 ipv4 = bytes(4)

Callers 1

appendMethod · 0.95

Calls 1

printFunction · 0.85

Tested by

no test coverage detected