Searched refs:byte_str (Results 1 – 6 of 6) sorted by relevance
630 def __init__(self, byte_str=None): argument651 if byte_str is None:653 if len(byte_str) < OPTIONS_START_OFFSET + 1:657 self._fields[field] = field.unpack(byte_str[field.offset :662 while offset < len(byte_str) and ord(byte_str[offset]) != OPTION_END:663 data_type = ord(byte_str[offset])667 data_length = ord(byte_str[offset])669 data = byte_str[offset: offset + data_length]
39 def bin2hex(byte_str, justification=20): argument44 chars = ["x" + (hex(ord(c))[2:].zfill(2)) for c in byte_str]54 discovery_packet = dhcp_packet.DhcpPacket(byte_str=binary_discovery_packet)132 packet = dhcp_packet.DhcpPacket(byte_str=data)
241 packet = dhcp_packet.DhcpPacket(byte_str=data)
152 def ParseMessage(descriptor, byte_str): argument168 new_msg.ParseFromString(byte_str)
156 def ParseMessage(descriptor, byte_str): argument168 new_msg.ParseFromString(byte_str)
485 def _ConvertToUnicode(byte_str): argument487 return local_unicode(byte_str, 'utf-8')