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

Method info_to_payload

test/framework.py:348–358  ·  view source on GitHub ↗

Convert _PacketInfo object to packet payload :param info: _PacketInfo object :returns: string containing serialized data from packet info

(info)

Source from the content-addressed store, hash-verified

346
347 @staticmethod
348 def info_to_payload(info):
349 """
350 Convert _PacketInfo object to packet payload
351
352 :param info: _PacketInfo object
353
354 :returns: string containing serialized data from packet info
355 """
356
357 # retrieve payload, currently 18 bytes (4 x ints + 1 short)
358 return pack("iiiih", info.index, info.src, info.dst, info.ip, info.proto)
359
360 @staticmethod
361 def payload_to_info(payload, payload_field="load"):

Callers 15

create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamMethod · 0.80
create_streamFunction · 0.80
create_streamMethod · 0.80
create_stream_ip4Method · 0.80
create_stream_ip6Method · 0.80

Calls

no outgoing calls

Tested by 15

create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamMethod · 0.64
create_streamFunction · 0.64
create_streamMethod · 0.64
create_stream_ip4Method · 0.64
create_stream_ip6Method · 0.64