Home | History | Annotate | Download | only in py

Lines Matching refs:argname

37 def pack_struct_ifreq(if_name, argname, *args):
43 provided |argname| which defines the type of |arg|. See netdevice(7) for a
47 @param argname: The name of the member used for the union in struct ifreq.
48 @param args: The values used to pack the requested |argname|.
49 @raises ValueError: if |argname| isn't a supported union's member name.
51 if argname not in STRUCT_IFREQ_FMT:
53 return struct.pack(IFNAMSIZ_FMT + STRUCT_IFREQ_FMT[argname], if_name, *args)
56 def unpack_struct_ifreq(data, argname):
61 a python tuple, which depends on the |argname| passed to
64 @param argname: The name of the member used for the union in struct ifreq.
65 @raises ValueError: if |argname| isn't a supported union's member name.
67 if argname not in STRUCT_IFREQ_FMT:
69 return struct.unpack(IFNAMSIZ_FMT + STRUCT_IFREQ_FMT[argname], data)