def lisp_mr_startup(): global lisp_send_sockets global lisp_ipc_listen_socket global lisp_send_internal_socket global lisp_ephem_listen_socket lisp.lisp_i_am("mr") lisp.lisp_set_exception() lisp.lisp_print_banner("Map-Resolver starting up") # # Get local address for source RLOC for encapsulation. # if (lisp.lisp_get_local_addresses() == False): return (False) # # Open send socket. # lisp_send_internal_socket = lisp.lisp_open_send_socket("lisp-mrms", "") lisp_ipc_listen_socket = lisp.lisp_open_listen_socket("", "lisp-mr") address = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" lisp_ephem_listen_socket = lisp.lisp_open_listen_socket( address, str(lisp_ephem_port)) lisp_send_sockets[0] = lisp_ephem_listen_socket lisp_send_sockets[1] = lisp_ephem_listen_socket lisp_send_sockets[2] = lisp_ipc_listen_socket # # Start site-cache timeout timer. # lisp_referral_timer = threading.Timer( lisp.LISP_REFERRAL_TIMEOUT_CHECK_INTERVAL, lisp_timeout_referral_cache, []) lisp_referral_timer.start() return (True)
def o00oo0(): global i1I1ii1II1iII global oooO0oo0oOOOO if 38 - 38: ooOoO0o % II111iiii % I11i / OoO0O00 + OoOoOO00 / i1IIi lisp.lisp_i_am("ddt") lisp.lisp_set_exception() lisp.lisp_print_banner("DDT-Node starting up") if 54 - 54: iIii1I11I1II1 % I1ii11iIi11i - OOooOOo / oO0o - OoO0O00.I11i if 11 - 11: I1ii11iIi11i.OoO0O00 * IiII * OoooooooOO + ooOoO0o if 33 - 33: O0 * o0oOOo0O0Ooo - I1Ii111 % I1Ii111 if 18 - 18: I1Ii111 / Oo0Ooo * I1Ii111 + I1Ii111 * i11iIiiIii * I1ii11iIi11i if (lisp.lisp_get_local_addresses() == False): return (False) if 11 - 11: ooOoO0o / OoOoOO00 - IiII * OoooooooOO + OoooooooOO.OoOoOO00 if 26 - 26: Ii1I % I1ii11iIi11i if 76 - 76: IiII * iII111i if 52 - 52: OOooOOo oooO0oo0oOOOO = lisp.lisp_open_listen_socket("", "lisp-ddt") i1I1ii1II1iII[0] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV4) i1I1ii1II1iII[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) i1I1ii1II1iII[2] = oooO0oo0oOOOO return if 19 - 19: I1IiiI if 25 - 25: Ii1I / ooOoO0o if 31 - 31: OOooOOo.O0 % I1IiiI.o0oOOo0O0Ooo + IiII if 71 - 71: I1Ii111.II111iiii if 62 - 62: OoooooooOO.I11i if 61 - 61: OoOoOO00 - OOooOOo - i1IIi if 25 - 25: O0 * I11i + I1ii11iIi11i.o0oOOo0O0Ooo.o0oOOo0O0Ooo
def lisp_ddt_startup(): global lisp_send_sockets global lisp_ipc_listen_socket lisp.lisp_i_am("ddt") lisp.lisp_set_exception() lisp.lisp_print_banner("DDT-Node starting up") # # Get local address for source RLOC for encapsulation. # if (lisp.lisp_get_local_addresses() == False): return (False) # # Open send socket and IPC socket. # lisp_ipc_listen_socket = lisp.lisp_open_listen_socket("", "lisp-ddt") lisp_send_sockets[0] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV4) lisp_send_sockets[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) lisp_send_sockets[2] = lisp_ipc_listen_socket return
def i1I11IiI1iiII(): global II1iII1i global oO0oIIII global i111I global Oo0oO0oo0oO00 if 91 - 91: ooOoO0o % ooOoO0o lisp.lisp_i_am("mr") lisp.lisp_set_exception() lisp.lisp_print_banner("Map-Resolver starting up") if 7 - 7: iII111i / I1ii11iIi11i / i11iIiiIii if 21 - 21: oO0o / I1ii11iIi11i + Ii1I + OoooooooOO if 91 - 91: i11iIiiIii / i1IIi + iII111i + ooOoO0o * i11iIiiIii if 66 - 66: iIii1I11I1II1 % i1IIi - O0 + I11i * I1Ii111.IiII if (lisp.lisp_get_local_addresses() == False): return (False) if 52 - 52: ooOoO0o + O0.iII111i.I1ii11iIi11i.OoO0O00 if 97 - 97: I1IiiI / iII111i if 71 - 71: II111iiii / i1IIi.I1ii11iIi11i % OoooooooOO.OoOoOO00 if 41 - 41: i1IIi * II111iiii / OoooooooOO.OOooOOo i111I = lisp.lisp_open_send_socket("lisp-mrms", "") oO0oIIII = lisp.lisp_open_listen_socket("", "lisp-mr") O0iII1 = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" Oo0oO0oo0oO00 = lisp.lisp_open_listen_socket(O0iII1, str(OOo)) II1iII1i[0] = Oo0oO0oo0oO00 II1iII1i[1] = Oo0oO0oo0oO00 II1iII1i[2] = oO0oIIII if 27 - 27: OoO0O00.I11i + OoOoOO00 / iIii1I11I1II1 % iII111i.ooOoO0o if 14 - 14: oO0o + I1ii11iIi11i - iII111i / O0.I1Ii111 if 45 - 45: I1Ii111 if 83 - 83: OoOoOO00.OoooooooOO iiI1iIiI = threading.Timer(lisp.LISP_REFERRAL_TIMEOUT_CHECK_INTERVAL, iIi1Ii1i1iI, []) iiI1iIiI.start() return (True) if 58 - 58: i11iIiiIii + OoooooooOO % OoooooooOO / IiII / i11iIiiIii if 62 - 62: OoO0O00 / I1ii11iIi11i if 7 - 7: OoooooooOO.IiII if 53 - 53: Ii1I % Ii1I * o0oOOo0O0Ooo + OoOoOO00 if 92 - 92: OoooooooOO + i1IIi / Ii1I * O0 if 100 - 100: ooOoO0o % iIii1I11I1II1 * II111iiii - iII111i if 92 - 92: ooOoO0o
def Oo0OO0000oooo(): global i1I1ii1II1iII global oooO0oo0oOOOO global o0oO0 global O0oO if 7 - 7: oO0o - OoO0O00 - O0 % oO0o - II111iiii lisp.lisp_i_am("mr") lisp.lisp_set_exception() lisp.lisp_print_banner("Map-Resolver starting up") if 31 - 31: iII111i / Oo0Ooo - iII111i - OOooOOo if 7 - 7: iII111i % O0.OoOoOO00 + I1IiiI - I11i if 75 - 75: I11i if 71 - 71: ooOoO0o if (lisp.lisp_get_local_addresses() == False): return (False) if 53 - 53: OoooooooOO % Ii1I.IiII / i11iIiiIii % iII111i if 28 - 28: I11i if 58 - 58: OoOoOO00 if 37 - 37: Oo0Ooo - iIii1I11I1II1 / I1ii11iIi11i o0oO0 = lisp.lisp_open_send_socket("lisp-mrms", "") oooO0oo0oOOOO = lisp.lisp_open_listen_socket("", "lisp-mr") oo0oOOo0 = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" O0oO = lisp.lisp_open_listen_socket(oo0oOOo0, str(Oo0oO0ooo)) i1I1ii1II1iII[0] = O0oO i1I1ii1II1iII[1] = O0oO i1I1ii1II1iII[2] = oooO0oo0oOOOO if 86 - 86: I11i * I1IiiI + I11i + II111iiii if 8 - 8: I1Ii111 - iII111i / ooOoO0o if 96 - 96: OoOoOO00 if 29 - 29: I1ii11iIi11i / i1IIi.I1IiiI - OoOoOO00 - OoOoOO00 - Ii1I o00 = threading.Timer(lisp.LISP_REFERRAL_TIMEOUT_CHECK_INTERVAL, I11i1II, []) o00.start() return (True) if 20 - 20: i1IIi % OoO0O00.I1IiiI / IiII * i11iIiiIii * OOooOOo if 85 - 85: o0oOOo0O0Ooo.OoOoOO00 / ooOoO0o.O0 % I1Ii111 if 90 - 90: Oo0Ooo % O0 * iIii1I11I1II1.iII111i if 8 - 8: ooOoO0o + II111iiii / iII111i / I11i if 74 - 74: O0 / i1IIi if 78 - 78: OoooooooOO.OoO0O00 + ooOoO0o - i1IIi if 31 - 31: OoooooooOO.OOooOOo
def lisp_ms_startup(): global lisp_ipc_listen_socket global lisp_send_sockets global lisp_site_timer, lisp_pubsub_timer lisp.lisp_i_am("ms") lisp.lisp_set_exception() lisp.lisp_print_banner("Map-Server starting up") # # Get local address for source RLOC for encapsulation. # if (lisp.lisp_get_local_addresses() == False): return (False) # # Open send socket. # lisp_ipc_listen_socket = lisp.lisp_open_listen_socket("", "lisp-ms") lisp_send_sockets[0] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV4) lisp_send_sockets[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) lisp_send_sockets[2] = lisp_ipc_listen_socket # # Start site-cache timeout timer. # lisp_site_timer = threading.Timer(lisp.LISP_SITE_TIMEOUT_CHECK_INTERVAL, lisp_timeout_sites, []) lisp_site_timer.start() # # Start pubsub-cache timeout timer. # timer = lisp.LISP_PUBSUB_TIMEOUT_CHECK_INTERVAL if (lisp_inject_mode_count != 0): timer = 5 lisp_pubsub_timer = threading.Timer(timer, lisp_timeout_pubsub, []) lisp_pubsub_timer.start() return (True)
#endif ddt_node_addr = lisp.lisp_gethostbyname(ddt_node) if (ddt_node_addr == ""): print("Cannot resolve DDT-node name '{}'".format(ddt_node)) exit(1) #endif ddt_node = ddt_node_addr # # Was more internal debugging requested by user? # lisp.lisp_debug_logging = True if "debug" in sys.argv else False follow_all = ("follow" in sys.argv) lisp.lisp_i_am("rig") # # Open IPC socket because if the lisp-core is running on this machine that # rig is running, it will get Map-Referral messages that it will IPC to # this named socket. # lisp_sockets[0] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV4) lisp_sockets[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) lisp_ipc_socket = lisp.lisp_open_listen_socket("", "/tmp/lisp-rig") lisp_sockets[2] = lisp_ipc_socket # # If lisp-core is not running on this machine, also open up a listen socket # for port 4342. #
def lisp_itr_startup(): global lisp_send_sockets global lisp_ipc_listen_socket global lisp_ipc_punt_socket global lisp_ephem_listen_socket global lisp_ephem_nat_socket global lisp_raw_socket, lisp_raw_v6_socket lisp.lisp_i_am("itr") lisp.lisp_set_exception() lisp.lisp_print_banner("ITR starting up") # # Get local address for source RLOC for encapsulation. # lisp.lisp_get_local_interfaces() lisp.lisp_get_local_macs() if (lisp.lisp_get_local_addresses() == False): return(False) # # Open send socket. # lisp_send_sockets[0] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV4) lisp_send_sockets[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) lisp_ipc_listen_socket = lisp.lisp_open_listen_socket("", "lisp-itr") lisp_ipc_punt_socket = lisp.lisp_open_listen_socket("", "lispers.net-itr") lisp_send_sockets[2] = lisp_ipc_listen_socket address = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" lisp_ephem_listen_socket = lisp.lisp_open_listen_socket(address, str(lisp_ephem_port)) # # Used on for listening for Info-Replies for NAT-traversal support. # lisp_ephem_nat_socket = lisp.lisp_open_listen_socket("0.0.0.0", str(lisp_ephem_nat_port)) # # Open up raw socket so we can send with IP headers after decapsulation. # lisp_raw_socket = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) lisp_raw_socket.setsockopt(socket.SOL_IP, socket.IP_HDRINCL, 1) if (lisp.lisp_is_raspbian() == False): lisp_raw_v6_socket = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.IPPROTO_UDP) #endif # # This is used by the ITR to send RTR status change information to the # ETR. Since RLOC-probing runs inside the lisp library, when state changes # occur, an IPC will have to be sent from the timer thread. This is the # only use-case for lisp.lisp_ipc_socket. # lisp.lisp_ipc_socket = lisp_ipc_listen_socket # # Start map-cache timeout timer. # threading.Thread(target=lisp_itr_get_capture_info).start() # # Load map-cache from checkpoint file before we start writing to it. # lisp.lisp_load_checkpoint() # # Should we load-split pings? # lisp.lisp_load_split_pings = (os.getenv("LISP_LOAD_SPLIT_PINGS") != None) # # Start map-cache timeout timer. # lisp_periodic_timer = threading.Timer(60, lisp_itr_process_timer, [lisp_send_sockets, lisp_ephem_port]) lisp_periodic_timer.start() # # Start dynamic-EID timeout timer. # threading.Timer(lisp.LISP_DEFAULT_DYN_EID_TIMEOUT, lisp_itr_timeout_dynamic_eids, [lisp_ipc_listen_socket]).start() return(True)
def lisp_rtr_startup(): global lisp_ipc_listen_socket, lisp_send_sockets, lisp_ephem_listen_socket global lisp_raw_socket, lisp_raw_v6_socket, lisp_threads global lisp_ipc_punt_socket lisp.lisp_i_am("rtr") lisp.lisp_set_exception() lisp.lisp_print_banner("RTR starting up") # # Get local address for source RLOC for encapsulation. # if (lisp.lisp_get_local_addresses() == False): return(False) # # Open network send socket and internal listen socket. For an RTR, that # may be behind a NAT, all Map-Requests are sent with the ephemeral port # so the Map-Request port and the ECM port will be the same. # address = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" lisp_ephem_listen_socket = lisp.lisp_open_listen_socket(address, str(lisp_ephem_port)) lisp_ipc_listen_socket = lisp.lisp_open_listen_socket("", "lisp-rtr") lisp_ipc_punt_socket = lisp.lisp_open_listen_socket("", "lispers.net-itr") lisp_send_sockets[0] = lisp_ephem_listen_socket # lisp_send_sockets[0] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV4) lisp_send_sockets[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) lisp_send_sockets[2] = lisp_ipc_listen_socket # # Open up raw socket so we can send with IP headers after decapsulation. # There is a special case where the RTR's lisp_send_sockets array is of # size 4 since we need to pass the raw socket through the lisp.py module # to send a data encapsulated RLOC-probe to an ETR that sits behind a NAT. # The test is in lisp_send_map_request() for this. This is the case in # ETRs as well. All other components use an array size of 3 modulo. # lisp_raw_socket = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) lisp_raw_socket.setsockopt(socket.SOL_IP, socket.IP_HDRINCL, 1) lisp_send_sockets.append(lisp_raw_socket) if (lisp.lisp_is_raspbian() == False): lisp_raw_v6_socket = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.IPPROTO_UDP) #endif pcap_threads = os.getenv("LISP_PCAP_THREADS") pcap_threads = 1 if (pcap_threads == None) else int(pcap_threads) worker_threads = os.getenv("LISP_WORKER_THREADS") worker_threads = 0 if (worker_threads == None) else int(worker_threads) # # Setup packet capture. # for i in range(pcap_threads): t = lisp.lisp_thread("pcap-{}".format(i)) t.thread_number = i t.number_of_pcap_threads = pcap_threads t.number_of_worker_threads = worker_threads lisp_threads.append(t) threading.Thread(target=lisp_rtr_pcap_thread, args=[t]).start() #endif # # Start worker threads. If you want to change the number of them, only # this constant needs changing. # for i in range(worker_threads): t = lisp.lisp_thread("worker-{}".format(i)) lisp_threads.append(t) threading.Thread(target=lisp_rtr_worker_thread, args=[t]).start() #endfor # # Load map-cache from checkpoint file before we start writing to it. # lisp.lisp_load_checkpoint() # # Should we load-split pings? # lisp.lisp_load_split_pings = (os.getenv("LISP_LOAD_SPLIT_PINGS") != None) # # Start map-cache timeout timer. # lisp_periodic_timer = threading.Timer(60, lisp_rtr_process_timer, []) lisp_periodic_timer.start() return(True)
def iiI1i1Iii111(): global oO0oIIII, II1iII1i, i111I global iiI1iIiI, OOo, OOo000 global Oo0oO0oo0oO00 if 43 - 43: o0oOOo0O0Ooo lisp.lisp_i_am("rtr") lisp.lisp_set_exception() lisp.lisp_print_banner("RTR starting up") if 71 - 71: oO0o % I11i * OoOoOO00.O0 / Ii1I.I1ii11iIi11i if 58 - 58: Oo0Ooo / oO0o if 44 - 44: OOooOOo if 54 - 54: Ii1I - I11i - I1Ii111.iIii1I11I1II1 if (lisp.lisp_get_local_addresses() == False): return (False) if 79 - 79: Ii1I.OoO0O00 if 40 - 40: o0oOOo0O0Ooo + Oo0Ooo.o0oOOo0O0Ooo % ooOoO0o if 15 - 15: Ii1I * Oo0Ooo % I1ii11iIi11i * iIii1I11I1II1 - i11iIiiIii if 60 - 60: I1IiiI * I1Ii111 % OoO0O00 + oO0o if 52 - 52: i1IIi if 84 - 84: Ii1I / IiII OOOooo0OooOoO = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" i111I = lisp.lisp_open_listen_socket(OOOooo0OooOoO, str(II1Ii1iI1i)) oO0oIIII = lisp.lisp_open_listen_socket("", "lisp-rtr") Oo0oO0oo0oO00 = lisp.lisp_open_listen_socket("", "lispers.net-itr") if 91 - 91: oO0o + I1IiiI II1iII1i[0] = i111I if 59 - 59: I1IiiI + i11iIiiIii + i1IIi / I11i II1iII1i[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) II1iII1i[2] = oO0oIIII if 44 - 44: I11i.OoOoOO00 * I1IiiI + OoooooooOO - iII111i - IiII if 15 - 15: IiII / O0.o0oOOo0O0Ooo.i11iIiiIii if 59 - 59: I1Ii111 - o0oOOo0O0Ooo - ooOoO0o if 48 - 48: i1IIi + I11i % OoOoOO00 / Oo0Ooo - o0oOOo0O0Ooo if 67 - 67: oO0o % o0oOOo0O0Ooo.OoooooooOO + OOooOOo * I11i * OoOoOO00 if 36 - 36: O0 + Oo0Ooo if 5 - 5: Oo0Ooo * OoOoOO00 if 46 - 46: ooOoO0o if 33 - 33: iII111i - II111iiii * OoooooooOO - Oo0Ooo - OOooOOo iiI1iIiI = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) iiI1iIiI.setsockopt(socket.SOL_IP, socket.IP_HDRINCL, 1) II1iII1i.append(iiI1iIiI) if 84 - 84: I1Ii111 + Oo0Ooo - OoOoOO00 * OoOoOO00 if (lisp.lisp_is_raspbian() == False): OOo = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.IPPROTO_UDP) if 61 - 61: OoooooooOO.oO0o.OoooooooOO / Oo0Ooo if 72 - 72: i1IIi OOoo0oo = os.getenv("LISP_PCAP_THREADS") OOoo0oo = 1 if (OOoo0oo == None) else int(OOoo0oo) ooOooo0OO = os.getenv("LISP_WORKER_THREADS") ooOooo0OO = 0 if (ooOooo0OO == None) else int(ooOooo0OO) if 2 - 2: II111iiii - OoO0O00.IiII * iII111i / oO0o if 80 - 80: OOooOOo / I11i / OoOoOO00 + i1IIi - Oo0Ooo if 11 - 11: o0oOOo0O0Ooo * OoO0O00 if 15 - 15: OoOoOO00 for oOoOoO000OO in range(OOoo0oo): ii11II11 = lisp.lisp_thread("pcap-{}".format(oOoOoO000OO)) ii11II11.thread_number = oOoOoO000OO ii11II11.number_of_pcap_threads = OOoo0oo ii11II11.number_of_worker_threads = ooOooo0OO OOo000.append(ii11II11) threading.Thread(target=I1iIII1, args=[ii11II11]).start() if 70 - 70: iIii1I11I1II1 if 48 - 48: II111iiii * IiII if 41 - 41: Ii1I % I1ii11iIi11i if 12 - 12: OOooOOo if 69 - 69: OoooooooOO + OOooOOo if 26 - 26: Oo0Ooo + OOooOOo / OoO0O00 % OoOoOO00 % I1ii11iIi11i + II111iiii for oOoOoO000OO in range(ooOooo0OO): ii11II11 = lisp.lisp_thread("worker-{}".format(oOoOoO000OO)) OOo000.append(ii11II11) threading.Thread(target=Iiiiii111i1ii, args=[ii11II11]).start() if 31 - 31: I11i % OOooOOo * I11i if 45 - 45: i1IIi.I1IiiI + OOooOOo - OoooooooOO % ooOoO0o if 1 - 1: iIii1I11I1II1 if 93 - 93: i1IIi.i11iIiiIii.Oo0Ooo if 99 - 99: I11i - I1Ii111 - oO0o % OoO0O00 lisp.lisp_load_checkpoint() if 21 - 21: II111iiii % I1ii11iIi11i.i1IIi - OoooooooOO if 4 - 4: OoooooooOO.ooOoO0o if 78 - 78: I1ii11iIi11i + I11i - O0 if 10 - 10: I1Ii111 % I1IiiI lisp.lisp_load_split_pings = (os.getenv("LISP_LOAD_SPLIT_PINGS") != None) if 97 - 97: OoooooooOO - I1Ii111 if 58 - 58: iIii1I11I1II1 + O0 if 30 - 30: ooOoO0o % iII111i * OOooOOo - I1ii11iIi11i * Ii1I % ooOoO0o if 46 - 46: i11iIiiIii - O0.oO0o Ii1IIii11 = threading.Timer(60, OO0oo, []) Ii1IIii11.start() return (True) if 100 - 100: I1IiiI / o0oOOo0O0Ooo * iII111i.O0 / OOooOOo if 83 - 83: I1Ii111 if 48 - 48: II111iiii * OOooOOo * I1Ii111 if 50 - 50: IiII % i1IIi if 21 - 21: OoooooooOO - iIii1I11I1II1 if 93 - 93: oO0o - o0oOOo0O0Ooo % OoOoOO00.OoOoOO00 - ooOoO0o if 90 - 90: ooOoO0o + II111iiii * I1ii11iIi11i / Ii1I.o0oOOo0O0Ooo + o0oOOo0O0Ooo
print "Cannot resolve Map-Resolver name '{}'".format(i11iIIIIIi1) exit(1) if 31 - 31: iII111i % iII111i % I11i i11iIIIIIi1 = ooO00OO0 if 69 - 69: OoO0O00 - Oo0Ooo + i1IIi / I1Ii111 if 49 - 49: O0.iII111i if 11 - 11: IiII * I1IiiI.iIii1I11I1II1 % OoooooooOO + iII111i if 78 - 78: OoO0O00.OOooOOo + OoO0O00 / I11i / OoO0O00 lisp.lisp_debug_logging = True if "debug" in sys.argv else False if 54 - 54: OoOoOO00 % iII111i if 37 - 37: OoOoOO00 * Oo0Ooo / ooOoO0o - iII111i % II111iiii.oO0o if 88 - 88: iII111i.II111iiii * II111iiii % I1Ii111 if 15 - 15: i1IIi * I1IiiI + i11iIiiIii if (o00oOO0o == ""): o00oOO0o = "1" if 6 - 6: ooOoO0o / i11iIiiIii + iII111i * oO0o lisp.lisp_i_am("lig") if 80 - 80: II111iiii if 83 - 83: I11i.i11iIiiIii + II111iiii.o0oOOo0O0Ooo * I11i if 53 - 53: II111iiii if 31 - 31: OoO0O00 I1iiiiI1iII = str(i111I) if 80 - 80: I1Ii111.i11iIiiIii - o0oOOo0O0Ooo if 25 - 25: OoO0O00 if 62 - 62: OOooOOo + O0 if 98 - 98: o0oOOo0O0Ooo if 51 - 51: Oo0Ooo - oO0o + II111iiii * Ii1I.I11i + oO0o if 78 - 78: i11iIiiIii / iII111i - Ii1I / OOooOOo + oO0o if 82 - 82: Ii1I oO0Oo = lisp.lisp_open_listen_socket("", "/tmp/lisp-lig") if 46 - 46: OoooooooOO.i11iIiiIii OOo0oO00ooO00 = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0"
def oOOoo0(): global oO0oIIII, II1iII1i, i111I global iiI1iIiI, OOo, OOo000 global Oo0oO0oo0oO00 if 20 - 20: IiII % IiII lisp.lisp_i_am("rtr") lisp.lisp_set_exception() lisp.lisp_print_banner("RTR starting up") if 94 - 94: o0oOOo0O0Ooo + O0 / I11i.I1IiiI + OOooOOo.iIii1I11I1II1 if 62 - 62: OoOoOO00 / I1IiiI - I1ii11iIi11i - I1IiiI + i11iIiiIii + i1IIi if 23 - 23: iII111i + I11i.OoOoOO00 * I1IiiI + I1ii11iIi11i if 18 - 18: IiII * o0oOOo0O0Ooo.IiII / O0 if (lisp.lisp_get_local_addresses() == False): return (False) if 8 - 8: o0oOOo0O0Ooo if 4 - 4: I1ii11iIi11i + I1ii11iIi11i * ooOoO0o - OoOoOO00 if 78 - 78: Ii1I / II111iiii % OoOoOO00 if 52 - 52: OOooOOo - iII111i * oO0o if 17 - 17: OoooooooOO + OOooOOo * I11i * OoOoOO00 if 36 - 36: O0 + Oo0Ooo iIIIi1i1I11i = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" i111I = lisp.lisp_open_listen_socket(iIIIi1i1I11i, str(II1Ii1iI1i)) oO0oIIII = lisp.lisp_open_listen_socket("", "lisp-rtr") Oo0oO0oo0oO00 = lisp.lisp_open_listen_socket("", "lispers.net-itr") if 55 - 55: Oo0Ooo - OOooOOo II1iII1i[0] = i111I if 84 - 84: I1Ii111 + Oo0Ooo - OoOoOO00 * OoOoOO00 II1iII1i[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) II1iII1i[2] = oO0oIIII if 61 - 61: OoooooooOO.oO0o.OoooooooOO / Oo0Ooo if 72 - 72: i1IIi if 82 - 82: OoOoOO00 + OoooooooOO / i11iIiiIii * I1ii11iIi11i.OoooooooOO if 63 - 63: I1ii11iIi11i if 6 - 6: ooOoO0o / I1ii11iIi11i if 57 - 57: I11i if 67 - 67: OoO0O00.ooOoO0o if 87 - 87: oO0o % Ii1I if 83 - 83: II111iiii - I11i iiI1iIiI = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) iiI1iIiI.setsockopt(socket.SOL_IP, socket.IP_HDRINCL, 1) II1iII1i.append(iiI1iIiI) if 35 - 35: i1IIi - iIii1I11I1II1 + i1IIi if (lisp.lisp_is_raspbian() == False): OOo = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.IPPROTO_UDP) if 86 - 86: iIii1I11I1II1 + OoOoOO00.i11iIiiIii - Ii1I if 51 - 51: OoOoOO00 I11IIIiIi11 = os.getenv("LISP_PCAP_THREADS") I11IIIiIi11 = 1 if (I11IIIiIi11 == None) else int(I11IIIiIi11) I11iiIi1i1 = os.getenv("LISP_WORKER_THREADS") I11iiIi1i1 = 0 if (I11iiIi1i1 == None) else int(I11iiIi1i1) if 41 - 41: Ii1I % I1ii11iIi11i if 12 - 12: OOooOOo if 69 - 69: OoooooooOO + OOooOOo if 26 - 26: Oo0Ooo + OOooOOo / OoO0O00 % OoOoOO00 % I1ii11iIi11i + II111iiii for i11I1I1iiI in range(I11IIIiIi11): I1i1iii1Ii = lisp.lisp_thread("pcap-{}".format(i11I1I1iiI)) I1i1iii1Ii.thread_number = i11I1I1iiI I1i1iii1Ii.number_of_pcap_threads = I11IIIiIi11 I1i1iii1Ii.number_of_worker_threads = I11iiIi1i1 OOo000.append(I1i1iii1Ii) threading.Thread(target=oo0OOo0O, args=[I1i1iii1Ii]).start() if 23 - 23: i11iIiiIii if 39 - 39: o0oOOo0O0Ooo - I1ii11iIi11i % iII111i * OoO0O00 - OOooOOo / iII111i if 29 - 29: I1ii11iIi11i if 52 - 52: i11iIiiIii / i1IIi if 1 - 1: ooOoO0o if 78 - 78: I1ii11iIi11i + I11i - O0 for i11I1I1iiI in range(I11iiIi1i1): I1i1iii1Ii = lisp.lisp_thread("worker-{}".format(i11I1I1iiI)) OOo000.append(I1i1iii1Ii) threading.Thread(target=i1iiIiI1Ii1i, args=[I1i1iii1Ii]).start() if 10 - 10: I1Ii111 % I1IiiI if 97 - 97: OoooooooOO - I1Ii111 if 58 - 58: iIii1I11I1II1 + O0 if 30 - 30: ooOoO0o % iII111i * OOooOOo - I1ii11iIi11i * Ii1I % ooOoO0o if 46 - 46: i11iIiiIii - O0.oO0o lisp.lisp_load_checkpoint() if 100 - 100: I1IiiI / o0oOOo0O0Ooo * iII111i.O0 / OOooOOo if 83 - 83: I1Ii111 if 48 - 48: II111iiii * OOooOOo * I1Ii111 if 50 - 50: IiII % i1IIi lisp.lisp_load_split_pings = (os.getenv("LISP_LOAD_SPLIT_PINGS") != None) if 21 - 21: OoooooooOO - iIii1I11I1II1 if 93 - 93: oO0o - o0oOOo0O0Ooo % OoOoOO00.OoOoOO00 - ooOoO0o if 90 - 90: ooOoO0o + II111iiii * I1ii11iIi11i / Ii1I.o0oOOo0O0Ooo + o0oOOo0O0Ooo if 40 - 40: ooOoO0o / OoOoOO00 % i11iIiiIii % I1ii11iIi11i / I1IiiI Ii1IIii11 = threading.Timer(60, O00o00O, []) Ii1IIii11.start() return (True) if 62 - 62: i1IIi - OoOoOO00 if 62 - 62: i1IIi + Oo0Ooo % IiII if 28 - 28: I1ii11iIi11i.i1IIi if 10 - 10: OoO0O00 / Oo0Ooo if 15 - 15: iII111i.OoOoOO00 / iII111i * I11i - I1IiiI % I1ii11iIi11i if 57 - 57: O0 % OoOoOO00 % oO0o if 45 - 45: I1ii11iIi11i + II111iiii * i11iIiiIii
def II1II1(): global Oo0oO0oo0oO00, II1iII1i, II1Ii1iI1i global OOo, Ii1IIii11, I11 global i111I, oO0oIIII if 48 - 48: i1IIi + I11i % OoOoOO00 / Oo0Ooo - o0oOOo0O0Ooo lisp.lisp_i_am("rtr") lisp.lisp_set_exception() lisp.lisp_print_banner("RTR starting up") if 67 - 67: oO0o % o0oOOo0O0Ooo.OoooooooOO + OOooOOo * I11i * OoOoOO00 if 36 - 36: O0 + Oo0Ooo if 5 - 5: Oo0Ooo * OoOoOO00 if 46 - 46: ooOoO0o if (lisp.lisp_get_local_addresses() == False): return (False) if 33 - 33: iII111i - II111iiii * OoooooooOO - Oo0Ooo - OOooOOo if 84 - 84: I1Ii111 + Oo0Ooo - OoOoOO00 * OoOoOO00 if 61 - 61: OoooooooOO.oO0o.OoooooooOO / Oo0Ooo if 72 - 72: i1IIi if 82 - 82: OoOoOO00 + OoooooooOO / i11iIiiIii * I1ii11iIi11i.OoooooooOO if 63 - 63: I1ii11iIi11i i1II = "0.0.0.0" if lisp.lisp_is_raspbian() else "0::0" II1Ii1iI1i = lisp.lisp_open_listen_socket(i1II, str(iiI1iIiI)) Oo0oO0oo0oO00 = lisp.lisp_open_listen_socket("", "lisp-rtr") i111I = lisp.lisp_open_listen_socket("", "lispers.net-itr") if 2 - 2: II111iiii - OoO0O00.IiII * iII111i / oO0o II1iII1i[0] = II1Ii1iI1i if 80 - 80: OOooOOo / I11i / OoOoOO00 + i1IIi - Oo0Ooo II1iII1i[1] = lisp.lisp_open_send_socket("", lisp.LISP_AFI_IPV6) II1iII1i[2] = Oo0oO0oo0oO00 if 11 - 11: o0oOOo0O0Ooo * OoO0O00 if 15 - 15: OoOoOO00 if 62 - 62: Ii1I if 51 - 51: OoOoOO00 if 14 - 14: IiII % oO0o % Oo0Ooo - i11iIiiIii if 53 - 53: Ii1I % Oo0Ooo if 59 - 59: OOooOOo % iIii1I11I1II1.i1IIi + II111iiii * IiII if 41 - 41: Ii1I % I1ii11iIi11i if 12 - 12: OOooOOo OOo = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) OOo.setsockopt(socket.SOL_IP, socket.IP_HDRINCL, 1) II1iII1i.append(OOo) if 69 - 69: OoooooooOO + OOooOOo if 26 - 26: Oo0Ooo + OOooOOo / OoO0O00 % OoOoOO00 % I1ii11iIi11i + II111iiii if 31 - 31: I11i % OOooOOo * I11i if 45 - 45: i1IIi.I1IiiI + OOooOOo - OoooooooOO % ooOoO0o if 1 - 1: iIii1I11I1II1 oO0oIIII = lisp.lisp_open_listen_socket("0.0.0.0", str(lisp.LISP_TRACE_PORT)) if 93 - 93: i1IIi.i11iIiiIii.Oo0Ooo if (lisp.lisp_is_raspbian() == False): Ii1IIii11 = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.IPPROTO_UDP) if 99 - 99: I11i - I1Ii111 - oO0o % OoO0O00 if 21 - 21: II111iiii % I1ii11iIi11i.i1IIi - OoooooooOO ii = os.getenv("LISP_PCAP_THREADS") ii = 1 if (ii == None) else int(ii) OOOO0o = os.getenv("LISP_WORKER_THREADS") OOOO0o = 0 if (OOOO0o == None) else int(OOOO0o) if 10 - 10: I1Ii111 % I1IiiI if 97 - 97: OoooooooOO - I1Ii111 if 58 - 58: iIii1I11I1II1 + O0 if 30 - 30: ooOoO0o % iII111i * OOooOOo - I1ii11iIi11i * Ii1I % ooOoO0o for iiiiI11ii in range(ii): O0i1i1II1i11 = lisp.lisp_thread("pcap-{}".format(iiiiI11ii)) O0i1i1II1i11.thread_number = iiiiI11ii O0i1i1II1i11.number_of_pcap_threads = ii O0i1i1II1i11.number_of_worker_threads = OOOO0o I11.append(O0i1i1II1i11) threading.Thread(target=Ii111, args=[O0i1i1II1i11]).start() if 91 - 91: I11i / i1IIi * i1IIi if 25 - 25: iIii1I11I1II1.OOooOOo * oO0o - Ii1I if 55 - 55: OoOoOO00 if 63 - 63: IiII * OoOoOO00 * ooOoO0o if 92 - 92: I1ii11iIi11i / O0 if 80 - 80: o0oOOo0O0Ooo - OOooOOo + OoooooooOO for iiiiI11ii in range(OOOO0o): O0i1i1II1i11 = lisp.lisp_thread("worker-{}".format(iiiiI11ii)) I11.append(O0i1i1II1i11) threading.Thread(target=O00oOo00o0o, args=[O0i1i1II1i11]).start() if 98 - 98: OOooOOo + i1IIi.I1IiiI - II111iiii - o0oOOo0O0Ooo if 24 - 24: Oo0Ooo - i1IIi + I11i if 38 - 38: OoooooooOO / I1ii11iIi11i.O0 / i1IIi / Oo0Ooo + iIii1I11I1II1 if 96 - 96: iII111i if 18 - 18: iII111i * I11i - Ii1I lisp.lisp_load_checkpoint() if 31 - 31: Oo0Ooo - O0 % OoOoOO00 % oO0o if 45 - 45: I1ii11iIi11i + II111iiii * i11iIiiIii if 13 - 13: OoooooooOO * oO0o - Ii1I / OOooOOo + I11i + IiII if 39 - 39: iIii1I11I1II1 - OoooooooOO lisp.lisp_load_split_pings = (os.getenv("LISP_LOAD_SPLIT_PINGS") != None) if 81 - 81: I1ii11iIi11i - O0 * OoooooooOO if 23 - 23: II111iiii / oO0o if 28 - 28: Oo0Ooo * ooOoO0o - OoO0O00 if 19 - 19: I11i Oooo0000 = threading.Timer(60, IiI1I11iIii, []) Oooo0000.start() return (True) if 67 - 67: O0 % iIii1I11I1II1 / IiII.i11iIiiIii - Ii1I + O0 if 27 - 27: OOooOOo if 89 - 89: II111iiii / oO0o if 14 - 14: OOooOOo.I1IiiI * ooOoO0o + II111iiii - ooOoO0o + OOooOOo if 18 - 18: oO0o - o0oOOo0O0Ooo - I1IiiI - I1IiiI if 54 - 54: Oo0Ooo + I1IiiI / iII111i.I1IiiI * OoOoOO00 if 1 - 1: OoOoOO00 * OoO0O00.i1IIi / Oo0Ooo.I1ii11iIi11i + Oo0Ooo