def process_eid_records(record_count, nonce, packet): for i in range(record_count): eid_record = lisp.lisp_eid_record() packet = eid_record.decode(packet) if (packet == None): break print "EID-prefix: {}, ttl: {}, rloc-set:".format( \ eid_record.print_prefix(), eid_record.print_ttl()) if (eid_record.rloc_count == 0): action = lisp.lisp_map_reply_action_string[eid_record.action] action = lisp.bold(action, False) print " Empty, map-reply action: {}".format(action) #endif eid_record.print_record("", False) for j in range(eid_record.rloc_count): rloc_record = lisp.lisp_rloc_record() packet = rloc_record.decode(packet, nonce) if (packet == None): break p = rloc_record.priority mp = rloc_record.mpriority print " RLOC: {}, up/uw/mp/mw: {}/{}/{}/{}, flags: {}{}{}". \ format(rloc_record.rloc.print_address_no_iid(), p, rloc_record. weight, mp, rloc_record.mweight, rloc_record.print_flags(), "" if rloc_record.rloc_name == None else \ ", " + rloc_record.print_rloc_name(), ", RTR" if p == 254 and mp == 255 else "") if (rloc_record.geo): print " geo: {}".format(rloc_record.geo.print_geo()) #endif if (rloc_record.elp): elp = rloc_record.elp.print_elp(False) print " elp: {}".format(elp) #endif if (rloc_record.rle): rle = rloc_record.rle.print_rle(False) print " rle: {}".format(rle) #endif if (rloc_record.json): json = rloc_record.json.print_json(False) print " json: {}".format(json) #endif rloc_record.print_record(" ") #endfor print "" #endfor return
# # Process Map-Referral. # rtt = round(time.time() - map_request_ts, 3) print("Received map-referral from {} with rtt {} secs:".format( source, rtt)) packet = map_referral.decode(packet) if (packet == None): print("Could not decode Map-Referral packet") continue #endif no_reply = False map_referral.print_map_referral() for i in range(map_referral.record_count): eid_record = lisp.lisp_eid_record() packet = eid_record.decode(packet) if (packet == None): break action = lisp.lisp_map_referral_action_string[eid_record.action] action = lisp.bold(action, False) print("EID-prefix: {}, ttl: {}, referral-type: {}". \ format(eid_record.print_prefix(), eid_record.print_ttl(), action)) eid_record.print_record("", True) ref_select = 0 if (eid_record.rloc_count != 0): print(" Referrals:", end=" ") if (lisp.lisp_debug_logging): print("\n")
def ii1I(record_count, nonce, packet): if 76 - 76: O0 / o0oOOo0O0Ooo.I1IiiI * Ii1I - OOooOOo for Oooo in range(record_count): O00o = lisp.lisp_eid_record() packet = O00o.decode(packet) if (packet == None): break print "EID-prefix: {}, ttl: {}, rloc-set:".format( O00o.print_prefix(), O00o.print_ttl()) if 61 - 61: iII111i.iIii1I11I1II1 * I1IiiI.ooOoO0o % Oo0Ooo if 72 - 72: OOooOOo if (O00o.rloc_count == 0): o0Oo00OOOOO = lisp.lisp_map_reply_action_string[O00o.action] o0Oo00OOOOO = lisp.bold(o0Oo00OOOOO, False) print " Empty, map-reply action: {}".format(o0Oo00OOOOO) if 85 - 85: ooOoO0o.iII111i - OoO0O00 % ooOoO0o % II111iiii if 81 - 81: OoO0O00 + II111iiii % iII111i * O0 O00o.print_record("", False) for oOOo0oo in range(O00o.rloc_count): o0oo0o0O00OO = lisp.lisp_rloc_record() packet = o0oo0o0O00OO.decode(packet, nonce) if (packet == None): break o0oO = o0oo0o0O00OO.priority I1i1iii = o0oo0o0O00OO.mpriority print " RLOC: {}, up/uw/mp/mw: {}/{}/{}/{}, flags: {}{}{}".format( o0oo0o0O00OO.rloc.print_address_no_iid(), o0oO, o0oo0o0O00OO. # o0oOOo0O0Ooo . Ii1I weight, I1i1iii, o0oo0o0O00OO.mweight, o0oo0o0O00OO.print_flags(), "" if o0oo0o0O00OO.rloc_name == None else ", " + o0oo0o0O00OO.print_rloc_name(), # OoOoOO00 / I11i ", RTR" if o0oO == 254 and I1i1iii == 255 else "") if 98 - 98: iIii1I11I1II1 / i1IIi / i11iIiiIii / o0oOOo0O0Ooo if (o0oo0o0O00OO.geo): print " geo: {}".format(o0oo0o0O00OO.geo.print_geo()) if 28 - 28: OOooOOo - IiII.IiII + OoOoOO00 - OoooooooOO + O0 if (o0oo0o0O00OO.elp): oOoOooOo0o0 = o0oo0o0O00OO.elp.print_elp(False) print " elp: {}".format(oOoOooOo0o0) if 61 - 61: o0oOOo0O0Ooo / OoO0O00 + ooOoO0o * oO0o / oO0o if (o0oo0o0O00OO.rle): OoOo = o0oo0o0O00OO.rle.print_rle(False) print " rle: {}".format(OoOo) if 18 - 18: i11iIiiIii if (o0oo0o0O00OO.json): Ii11I = o0oo0o0O00OO.json.print_json(False) print " json: {}".format(Ii11I) if 69 - 69: oO0o % I1Ii111 - o0oOOo0O0Ooo + I1Ii111 - O0 % OoooooooOO o0oo0o0O00OO.print_record(" ") if 31 - 31: II111iiii - OOooOOo.I1Ii111 % OoOoOO00 - O0 print "" if 4 - 4: II111iiii / ooOoO0o.iII111i return if 58 - 58: OOooOOo * i11iIiiIii / OoOoOO00 % I1Ii111 - I1ii11iIi11i / oO0o if 50 - 50: I1IiiI if 34 - 34: I1IiiI * II111iiii % iII111i * OoOoOO00 - I1IiiI if 33 - 33: o0oOOo0O0Ooo + OOooOOo * OoO0O00 - Oo0Ooo / oO0o % Ii1I if 21 - 21: OoO0O00 * iIii1I11I1II1 % oO0o * i1IIi
if 81 - 81: OoOoOO00 - OoOoOO00.iII111i if 73 - 73: I11i % i11iIiiIii - I1IiiI if 7 - 7: O0 * i11iIiiIii * Ii1I + ooOoO0o % OoO0O00 - ooOoO0o II1IIIIiII1i = round(time.time() - O0OO0O, 3) print("Received map-referral from {} with rtt {} secs:".format( OoOOoOooooOOo, II1IIIIiII1i)) iI11Ii = III1Iiii1I11.decode(iI11Ii) if (iI11Ii == None): print("Could not decode Map-Referral packet") continue if 1 - 1: II111iiii II1 = False III1Iiii1I11.print_map_referral() if 68 - 68: iII111i - I1IiiI / I1Ii111 / I11i for I11iiii in range(III1Iiii1I11.record_count): O0i1iI = lisp.lisp_eid_record() iI11Ii = O0i1iI.decode(iI11Ii) if (iI11Ii == None): break if 29 - 29: I1IiiI % OOooOOo - I1IiiI / OOooOOo.i1IIi i11III1111iIi = lisp.lisp_map_referral_action_string[O0i1iI.action] i11III1111iIi = lisp.bold(i11III1111iIi, False) if 38 - 38: iII111i + I11i / I1Ii111 % ooOoO0o - I1ii11iIi11i print("EID-prefix: {}, ttl: {}, referral-type: {}".format( O0i1iI.print_prefix(), O0i1iI.print_ttl(), i11III1111iIi)) if 14 - 14: oO0o / I1Ii111 if 85 - 85: I11i O0i1iI.print_record("", True) if 20 - 20: oO0o % IiII III1i1i11i = 0 if (O0i1iI.rloc_count != 0): print(" Referrals:", end=" ")
if 23 - 23: i11iIiiIii if 30 - 30: o0oOOo0O0Ooo - i1IIi % II111iiii + I11i * iIii1I11I1II1 if 81 - 81: IiII % i1IIi.iIii1I11I1II1 Ii1Iii1iIi = round(time.time() - oOO00O, 3) print "Received map-referral from {} with rtt {} secs:".format( II, Ii1Iii1iIi) III1Iiii1I11 = o00O0OoO.decode(III1Iiii1I11) if (III1Iiii1I11 == None): print "Could not decode Map-Referral packet" continue if 82 - 82: I1ii11iIi11i / I1IiiI % iIii1I11I1II1 / i1IIi - I1IiiI iiIi1IIi1I = False o00O0OoO.print_map_referral() if 7 - 7: I1Ii111 * OoO0O00 - ooOoO0o + OOooOOo * I1IiiI % OoO0O00 for iI1i111I1Ii in range(o00O0OoO.record_count): i11i1ii1I = lisp.lisp_eid_record() III1Iiii1I11 = i11i1ii1I.decode(III1Iiii1I11) if (III1Iiii1I11 == None): break if 88 - 88: I11i % I1ii11iIi11i I1i11 = lisp.lisp_map_referral_action_string[i11i1ii1I.action] I1i11 = lisp.bold(I1i11, False) if 12 - 12: i1IIi + i1IIi - I1ii11iIi11i * Oo0Ooo % Oo0Ooo - II111iiii print "EID-prefix: {}, ttl: {}, referral-type: {}".format( i11i1ii1I.print_prefix(), i11i1ii1I.print_ttl(), I1i11) if 52 - 52: ooOoO0o.iII111i + I1Ii111 if 38 - 38: i1IIi - II111iiii.I1Ii111 i11i1ii1I.print_record("", True) if 58 - 58: I1IiiI.iII111i + OoOoOO00 O00OO = 0 if (i11i1ii1I.rloc_count != 0): print " Referrals:",