#NEWLINE# def __init__( self , ls_age = 0 , options = 0 , type_ = OSPF_UNKNOWN_LSA , id_ = '0.0.0.0' , adv_router = '0.0.0.0' , ls_seqnum = 0 , checksum = 0 , length = 0 , opaque_type = OSPF_OPAQUE_TYPE_UNKNOWN , opaque_id = 0 ) : #NEWLINE# #INDENT# if ( type_ < OSPF_OPAQUE_LINK_LSA ) : #NEWLINE# #INDENT# self . header = LSAHeader ( ls_age , options , type_ , id_ , adv_router , ls_seqnum , 0 , 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . header = LSAHeader ( ls_age , options , type_ , 0 , adv_router , ls_seqnum , 0 , 0 , opaque_type , opaque_id ) #NEWLINE# #UNINDENT# if ( not ( checksum or length ) ) : #NEWLINE# #INDENT# tail = self . serialize_tail ( ) #NEWLINE# length = ( self . header . _HDR_LEN + len ( tail ) ) #NEWLINE# #UNINDENT# if ( not checksum ) : #NEWLINE# #INDENT# head = self . header . serialize ( ) #NEWLINE# checksum = packet_utils . fletcher_checksum ( head [ 2 : ] , 14 ) #NEWLINE# #UNINDENT# self . header . length = length #NEWLINE# self . header . checksum = checksum