Home
last modified time | relevance | path

Searched refs:fmt (Results 1 – 2 of 2) sorted by relevance

/kernel/tests/net/test/
Dcstruct.py75 def CalcSize(fmt): argument
76 if "A" in fmt:
77 fmt = fmt.replace("A", "s")
78 return struct.calcsize(fmt)
80 def CalcNumElements(fmt): argument
81 prevlen = len(fmt)
82 fmt = fmt.replace("S", "")
83 numstructs = prevlen - len(fmt)
84 size = CalcSize(fmt)
85 elements = struct.unpack(fmt, "\x00" * size)
[all …]
Dnet_test.py325 fmt = "16sIBBHHH4s"
326 assert struct.calcsize(fmt) == 32
334 return struct.pack(fmt, addr, label, action, share, flags, 0, 0, pad)