#NEWLINE# @ classmethod #NEWLINE# def decode( cls , data ) : #NEWLINE# #INDENT# while data : #NEWLINE# #INDENT# ( length , ntype , flags , seq , pid ) = unpack ( cls . Header . PACK , data [ : cls . Header . LEN ] ) #NEWLINE# if ( len ( data ) < length ) : #NEWLINE# #INDENT# raise NetLinkError ( 'Buffer underrun' ) #NEWLINE# #UNINDENT# ( yield cls . format ( ntype , flags , seq , pid , data [ cls . Header . LEN : length ] ) ) #NEWLINE# data = data [ length : ]