hpimdm/packet/PacketHPIMHelloOptions.py
def parse_bytes(data: bytes, hello_type: int = None, length: int = None):
        """
        Parse received Hello Option from binary and convert it into Hello object
        """
        (hello_type, length) = struct.unpack(PacketHPIMHelloOptions.PIM_HDR_OPTS,
                                             data[:PacketHPIMHelloOptions.PIM_HDR_OPTS_LEN])
        #print("hello_type:", type)
        #print("LENGTH:", length)
        data = data[PacketHPIMHelloOptions.PIM_HDR_OPTS_LEN:]
        #return PIM_MSG_TYPES[type](data)
        return NEW_PROTOCOL_MSG_TYPES.get(hello_type, PacketHPIMHelloUnknown).parse_bytes(data, hello_type, length)

        Parse received Hello Option from binary and convert it into Hello object
        
Parse received Hello Option from binary and convert it into Hello object
Parse received Hello Option from binary and convert it into Hello object
def parse_bytes(data: bytes, hello_type: int = None, length: int = None):
        (hello_type, length) = struct.unpack(PacketHPIMHelloOptions.PIM_HDR_OPTS,
                                             data[:PacketHPIMHelloOptions.PIM_HDR_OPTS_LEN])
        data = data[PacketHPIMHelloOptions.PIM_HDR_OPTS_LEN:]
        return NEW_PROTOCOL_MSG_TYPES.get(hello_type, PacketHPIMHelloUnknown).parse_bytes(data, hello_type, length)
def parse_bytes ( data : bytes , hello_type : int = None , length : int = None ) : ( hello_type , length ) = struct . unpack ( PacketHPIMHelloOptions . PIM_HDR_OPTS , data [ : PacketHPIMHelloOptions . PIM_HDR_OPTS_LEN ] ) data = data [ PacketHPIMHelloOptions . PIM_HDR_OPTS_LEN : ] return NEW_PROTOCOL_MSG_TYPES . get ( hello_type , PacketHPIMHelloUnknown ) . parse_bytes ( data , hello_type , length )
Parse received Hello Option from binary and convert it into Hello object
Parse received Hello Option from binary and convert it into Hello object
"""
        Parse received Hello Option from binary and convert it into Hello object
        """ #print("hello_type:", type) #print("LENGTH:", length) #return PIM_MSG_TYPES[type](data)
data
bytes
hello_type
int
length
int