{"name": "ospf_external_lsa_new", "code": "struct timeval * __fastcall ospf_external_lsa_new ( __int64 @@a1@@ , unsigned __int8 * @@a2@@ , int * @@a3@@ ) { int @@v5@@ ; struct timeval * @@v6@@ ; int @@v7@@ ; _WORD * @@src@@ ; __int64 @@v9@@ ; if ( ! @@a2@@ ) { if ( ( term_debug_ospf_lsa & Number ) != Number ) zlog_warn ( String ) ; return Number L ; } if ( ( term_debug_ospf_lsa & Number ) != Number ) zlog_info ( String ) ; if ( @@a3@@ ) { @@v5@@ = * @@a3@@ ; LABEL_13 : @@v9@@ = stream_new ( Number L ) ; @@src@@ = * ( _WORD * * ) ( @@v9@@ + Number ) ; lsa_header_set ( @@v9@@ , Number , Number , @@v5@@ , * ( _DWORD * ) @@a1@@ ) ; ospf_external_lsa_body_set ( @@v9@@ , @@a2@@ , @@a1@@ ) ; @@v7@@ = stream_get_endp ( @@v9@@ ) ; @@src@@ [ Number ] = htons ( @@v7@@ ) ; @@v6@@ = ospf_lsa_new ( ) ; @@v6@@ [ Number ] . tv_usec = Number L ; LOBYTE ( @@v6@@ -> tv_sec ) |= Number ; @@v6@@ -> tv_usec = ( __suseconds_t ) ospf_lsa_data_new ( @@v7@@ ) ; memcpy ( ( void * ) @@v6@@ -> tv_usec , @@src@@ , @@v7@@ ) ; stream_free ( @@v9@@ ) ; return @@v6@@ ; } @@v5@@ = ospf_lsa_unique_id ( @@a1@@ , * ( _QWORD * ) ( @@a1@@ + Number ) , Number L , @@a2@@ + Number ) ; if ( @@v5@@ != Number ) goto LABEL_13 ; if ( ( term_debug_ospf_lsa & Number ) != Number ) zlog_info ( String ) ; return Number L ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "int"}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r64"}, {"n": "src", "t": {"T": 3, "t": "_WORD"}, "location": "s16"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v6", "t": {"T": 3, "t": "struct timeval"}, "location": "s32"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]}
{"name": "ospf_lsa_new", "code": "struct timeval * ospf_lsa_new ( ) { __suseconds_t @@v0@@ ; struct timeval * @@s@@ ; @@s@@ = ( struct timeval * ) zcalloc ( Number L , Number L ) ; memset ( @@s@@ , Number , Number ) ; LOBYTE ( @@s@@ -> tv_sec ) = Number ; LODWORD ( @@s@@ [ Number ] . tv_sec ) = Number ; HIDWORD ( @@s@@ [ Number ] . tv_sec ) = Number ; gettimeofday ( @@s@@ + Number , Number L ) ; @@v0@@ = @@s@@ [ Number ] . tv_usec ; @@s@@ [ Number ] . tv_sec = @@s@@ [ Number ] . tv_sec ; @@s@@ [ Number ] . tv_usec = @@v0@@ ; LODWORD ( @@s@@ [ Number ] . tv_sec ) = Number ; return @@s@@ ; }", "source": [{"n": "v0", "t": {"T": 1, "n": "__suseconds_t", "s": 8}, "location": "r16"}, {"n": "s", "t": {"T": 3, "t": "struct timeval"}, "location": "s8"}]} {"name": "ospf_lsa_data_new", "code": "void * __fastcall ospf_lsa_data_new ( size_t @@a1@@ ) { void * @@s@@ ; @@s@@ = ( void * ) zmalloc ( Number L , @@a1@@ ) ; memset ( @@s@@ , Number , @@a1@@ ) ; return @@s@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r56"}, {"n": "s", "t": {"T": 3, "t": "void"}, "location": "s8"}]} {"name": "lsa_header_set", "code": "__int64 __fastcall lsa_header_set ( __int64 @@a1@@ , char @@a2@@ , char @@a3@@ , int @@a4@@ , int @@a5@@ ) { __int64 @@v9@@ ; @@v9@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _WORD * ) @@v9@@ = htons ( Number ) ; * ( _BYTE * ) ( @@v9@@ + Number ) = @@a2@@ ; * ( _BYTE * ) ( @@v9@@ + Number ) = @@a3@@ ; * ( _DWORD * ) ( @@v9@@ + Number ) = @@a4@@ ; * ( _DWORD * ) ( @@v9@@ + Number ) = @@a5@@ ; * ( _DWORD * ) ( @@v9@@ + Number ) = htonl ( Number ) ; return ospf_output_forward ( @@a1@@ , Number L ) ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "char", "s": 1}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "int", "s": 4}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "char", "s": 1}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "ospf_external_lsa_body_set", "code": "__int64 __fastcall ospf_external_lsa_body_set ( __int64 @@a1@@ , unsigned __int8 * @@a2@@ , __int64 @@a3@@ ) { int v3 ; int v4 ; uint32_t v5 ; unsigned int v6 ; unsigned int @@v9@@ ; unsigned int @@v10@@ ; uint32_t @@v11@@ ; int @@v12@@ ; int @@v13@@ ; unsigned __int8 * @@v14@@ ; @@v14@@ = @@a2@@ + Number ; masklen2ip ( @@a2@@ [ Number ] , & @@v10@@ ) ; stream_put_ipv4 ( @@a1@@ , @@v10@@ ) ; if ( ( unsigned int ) is_prefix_default ( @@a2@@ + Number ) ) v3 = Number ; else v3 = * @@a2@@ ; @@v13@@ = v3 ; if ( * ( ( _DWORD * ) @@a2@@ + Number ) == Number ) v4 = metric_type ( @@a3@@ , @@v13@@ ) ; else v4 = * ( ( _DWORD * ) @@a2@@ + Number ) ; @@v12@@ = v4 ; if ( * ( ( _DWORD * ) @@a2@@ + Number ) == Number ) v5 = metric_value ( @@a3@@ , @@v13@@ ) ; else v5 = * ( ( _DWORD * ) @@a2@@ + Number ) ; @@v11@@ = v5 ; if ( @@v12@@ == Number ) v6 = Number ; else v6 = Number ; stream_putc ( @@a1@@ , v6 ) ; stream_put_ospf_metric ( @@a1@@ , @@v11@@ ) ; @@v9@@ = ospf_external_lsa_nexthop_get ( @@a3@@ , * ( ( _DWORD * ) @@a2@@ + Number ) ) ; stream_put_ipv4 ( @@a1@@ , @@v9@@ ) ; return stream_putl ( @@a1@@ , Number L ) ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r64"}, {"n": "v13", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "v12", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "v11", "t": {"T": 1, "n": "uint32_t", "s": 4}, "location": "s20"}, {"n": "v10", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s24"}, {"n": "v9", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}, {"n": "v14", "t": {"T": 3, "t": "unsigned __int8"}, "location": "s8"}]} {"name": "ospf_external_lsa_originate", "code": "struct timeval * __fastcall ospf_external_lsa_originate ( __int64 @@a1@@ , __int64 @@a2@@ ) { struct timeval * result ; char * v3 ; char * v4 ; struct timeval * @@v5@@ ; if ( ! ( unsigned int ) ospf_redistribute_check ( @@a1@@ , @@a2@@ , Number L ) ) return Number L ; @@v5@@ = ospf_external_lsa_new ( @@a1@@ , ( unsigned __int8 * ) @@a2@@ , Number L ) ; if ( @@v5@@ ) { ospf_lsa_install ( @@a1@@ , Number L , @@v5@@ ) ; ++ * ( _DWORD * ) ( @@a1@@ + Number ) ; ospf_flood_through_as ( @@a1@@ , Number L , @@v5@@ ) ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { v4 = inet_ntoa ( * ( struct in_addr * ) ( @@v5@@ -> tv_usec + Number ) ) ; zlog_info ( String , * ( unsigned __int8 * ) ( @@v5@@ -> tv_usec + Number ) , v4 , @@v5@@ ) ; ospf_lsa_header_dump ( @@v5@@ -> tv_usec ) ; } result = @@v5@@ ; } else { if ( ( term_debug_ospf_event & Number ) != Number ) { v3 = inet_ntoa ( * ( struct in_addr * ) ( @@a2@@ + Number ) ) ; zlog_info ( String , v3 ) ; } result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v5", "t": {"T": 3, "t": "struct timeval"}, "location": "s8"}]} {"name": "ospf_external_lsa_refresh", "code": "__int64 __fastcall ospf_external_lsa_refresh ( __int64 @@a1@@ , __int64 @@a2@@ , unsigned __int8 * @@a3@@ , int @@a4@@ ) { __int64 result ; char * v5 ; uint32_t v6 ; char * v7 ; unsigned int @@v10@@ ; struct timeval * @@v11@@ ; if ( ! ( unsigned int ) ospf_redistribute_check ( @@a1@@ , @@a3@@ , & @@v10@@ ) ) return ospf_external_lsa_flush ( @@a1@@ , * @@a3@@ , ( __int64 ) ( @@a3@@ + Number ) ) ; result = @@v10@@ ; if ( @@v10@@ || @@a4@@ ) { ospf_ls_retransmit_delete_nbr_as ( @@a1@@ , @@a2@@ ) ; ospf_refresher_unregister_lsa ( @@a1@@ , @@a2@@ ) ; @@v11@@ = ospf_external_lsa_new ( @@a1@@ , @@a3@@ , ( int * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) ) ; if ( @@v11@@ ) { v6 = lsa_seqnum_increment ( @@a2@@ ) ; * ( _DWORD * ) ( @@v11@@ -> tv_usec + Number ) = v6 ; gettimeofday ( @@v11@@ + Number , Number L ) ; ospf_lsa_checksum ( @@v11@@ -> tv_usec ) ; ospf_lsa_install ( @@a1@@ , Number L , @@v11@@ ) ; ospf_flood_through_as ( @@a1@@ , Number L , @@v11@@ ) ; ospf_refresher_register_lsa ( @@a1@@ , @@v11@@ ) ; result = term_debug_ospf_lsa & Number ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { v7 = inet_ntoa ( * ( struct in_addr * ) ( @@v11@@ -> tv_usec + Number ) ) ; zlog_info ( String , * ( unsigned __int8 * ) ( @@v11@@ -> tv_usec + Number ) , v7 ) ; result = ospf_lsa_header_dump ( @@v11@@ -> tv_usec ) ; } } else { result = term_debug_ospf_lsa & Number ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { v5 = inet_ntoa ( * ( struct in_addr * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) ) ; result = zlog_warn ( String , * ( unsigned __int8 * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L ) , v5 ) ; } } } return result ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "int", "s": 4}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v10", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}, {"n": "v11", "t": {"T": 3, "t": "struct timeval"}, "location": "s8"}]} {"name": "ospf_lsa_unique_id", "code": "__int64 __fastcall ospf_lsa_unique_id ( unsigned int * @@a1@@ , __int64 @@a2@@ , unsigned __int8 @@a3@@ , __int64 @@a4@@ ) { unsigned int v4 ; char * v5 ; unsigned int v7 ; char * v8 ; unsigned int @@v11@@ ; int @@v12@@ ; __int64 @@v13@@ ; __int64 @@v14@@ ; @@v11@@ = * ( _DWORD * ) ( @@a4@@ + Number ) ; @@v14@@ = ospf_lsdb_lookup_by_id ( @@a2@@ , @@a3@@ , @@v11@@ , * @@a1@@ ) ; if ( ! @@v14@@ ) return @@v11@@ ; @@v13@@ = * ( _QWORD * ) ( @@v14@@ + Number ) ; if ( ( unsigned __int8 ) ip_masklen ( * ( unsigned int * ) ( @@v13@@ + Number ) ) == * ( _BYTE * ) ( @@a4@@ + Number ) ) { if ( ( term_debug_ospf_lsa & Number ) != Number ) { v4 = * ( unsigned __int8 * ) ( @@a4@@ + Number ) ; v5 = inet_ntoa ( * ( struct in_addr * ) ( @@a4@@ + Number ) ) ; zlog_warn ( String , v5 , v4 ) ; } return Number ; } masklen2ip ( * ( unsigned __int8 * ) ( @@a4@@ + Number ) , & @@v12@@ ) ; @@v11@@ = ~ @@v12@@ | * ( _DWORD * ) ( @@a4@@ + Number ) ; @@v14@@ = ospf_lsdb_lookup_by_id ( * ( ( _QWORD * ) @@a1@@ + Number ) , @@a3@@ , @@v11@@ , * @@a1@@ ) ; if ( ! @@v14@@ ) return @@v11@@ ; if ( ( term_debug_ospf_lsa & Number ) != Number ) { v7 = * ( unsigned __int8 * ) ( @@a4@@ + Number ) ; v8 = inet_ntoa ( * ( struct in_addr * ) ( @@a4@@ + Number ) ) ; zlog_warn ( String , v8 , v7 ) ; } return Number ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "unsigned int"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v14", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v12", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v11", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s40"}]}