Searched refs:fmt (Results 1 – 2 of 2) sorted by relevance
/kernel/tests/net/test/ |
D | cstruct.py | 76 def CalcSize(fmt): argument 77 if "A" in fmt: 78 fmt = fmt.replace("A", "s") 80 fmt = (re.split('\d+$', fmt)[0]) 81 return struct.calcsize(fmt) 83 def CalcNumElements(fmt): argument 84 prevlen = len(fmt) 85 fmt = fmt.replace("S", "") 86 numstructs = prevlen - len(fmt) 87 size = CalcSize(fmt) [all …]
|
D | net_test.py | 326 fmt = "16sIBBHHH4s" 327 assert struct.calcsize(fmt) == 32 335 return struct.pack(fmt, addr, label, action, share, flags, 0, 0, pad)
|