#NEWLINE# @ classmethod #NEWLINE# def __parse_pp_addresses( cls , family , addr_data ) : #NEWLINE# #INDENT# if ( family == socket . AF_INET ) : #NEWLINE# #INDENT# ( src_ip , dst_ip , src_port , dst_port ) = struct . unpack ( '<4s4sHH' , addr_data ) #NEWLINE# src_addr = ( socket . inet_ntop ( family , src_ip ) , src_port ) #NEWLINE# dst_addr = ( socket . inet_ntop ( family , dst_ip ) , dst_port ) #NEWLINE# return ( src_addr , dst_port ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( family == socket . AF_INET6 ) : #NEWLINE# #INDENT# ( src_ip , dst_ip , src_port , dst_port ) = struct . unpack ( '<16s16sHH' , addr_data ) #NEWLINE# src_addr = ( socket . inet_ntop ( family , src_ip ) , src_port ) #NEWLINE# dst_addr = ( socket . inet_ntop ( family , dst_ip ) , dst_port ) #NEWLINE# return ( src_addr , dst_addr ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( family == socket . AF_UNIX ) : #NEWLINE# #INDENT# ( src_addr , dst_addr ) = struct . unpack ( '<108s108s' , addr_data ) #NEWLINE# return ( src_addr . rstrip ( b'\x00' ) , dst_addr . rstrip ( b'\x00' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( unknown_pp_source_address , unknown_pp_dest_address )