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

Method appendIPv4

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

Source from the content-addressed store, hash-verified

251 return big
252
253 def appendIPv4(self, big, exp):
254 ipv4 = bytes(4)
255 if exp != None:
256 _, ipv4 = ExpressionConverter.ToIPv4Address(exp)
257 if not ipv4:
258 print("Inavalid IPv4 Address")
259 return False
260
261 for i in range(len(ipv4)):
262 big = big << 8
263 big = big | ipv4[i]
264
265 return big
266
267 def appendIPv6(self, big, exp):
268 ipv6 = bytes(16)

Callers 1

appendMethod · 0.95

Calls 1

printFunction · 0.85

Tested by

no test coverage detected