• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/lib9p/pytest/

Lines Matching defs:unpack

55 unpackers in each protocol (see {pack,unpack}_wirestat below).
119 >>> struct.unpack('<IBHIHB', pkt)
251 >>> struct.unpack('<IBH', pkt)
258 To see that this is a valid version packet, let's unpack its bytes.
263 >>> tup = struct.unpack('<IBHIH8B', vpkt)
269 Of course, since you can *pack*, you can also *unpack*. It's
273 Unpack is actually a two step process: first we unpack a header
275 then we unpack the data within the packet. You can invoke the
314 unpack; see below.)
323 >>> plain.unpack(pkt) # doctest: +IGNORE_EXCEPTION_DETAIL
327 >>> dotl.unpack(pkt)
330 However, the unpack() method DOES check that the fcall type is
335 >>> plain.unpack(pkt, noerror=True) # doctest: +IGNORE_EXCEPTION_DETAIL
344 >>> dotl.unpack(b'', noerror=True) # doctest: +IGNORE_EXCEPTION_DETAIL
351 >>> dotl.unpack(pkt[0:1], noerror=True)
353 >>> dotl.unpack(pkt[0:2], noerror=True)
358 >>> dotl.unpack(pkt + b'x') # doctest: +IGNORE_EXCEPTION_DETAIL
362 >>> dotl.unpack(pkt + b'x', noerror=True)
370 To unpack the result of a Tstat or a read() on a directory, use
384 Now we can unpack it:
393 a SequenceError if we try to unpack with dotu or dotl:
401 than the length of the packet, after a failed unpack, and some
410 Similarly, use unpack_dirent to unpack the result of a dot-L
721 _9p_data.header_unpack_seq.unpack(vdict, None, bstring, noerror)
724 def unpack(self, bstring, noerror=False):
727 # NB: vdict['dsize'] is used internally during unpack, to
729 # the time unpack is done, we no longer need it.
753 seq.unpack(vdict, self.conditions, data, noerror)
777 # too short, in which case we'll unpack a partial statobj.
1835 seq = sequencer.Sequencer('Header-unpack')
1839 print('Header-unpack:', file=sys.stderr)