DTN controller and policy language for satellite networks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

prune: fix cmdliner/logs version constraints

Require cmdliner >= 1.3.0 for Cmd.Env.info API
Require logs >= 0.8.0 for ~env parameter support
Remove duplicate logs constraint

+5 -17
+4 -17
bin/borealis.ml
··· 120 120 in 121 121 let bundle : Bundle.t = { primary; blocks = [ payload_block ] } in 122 122 let ipaddr = 123 - if dest_host = "127.0.0.1" || dest_host = "localhost" then 124 - Eio.Net.Ipaddr.V4.loopback 125 - else 126 - (* Parse IPv4 address string like "192.168.1.1" *) 127 - let parts = String.split_on_char '.' dest_host in 128 - match List.map int_of_string parts with 129 - | [ a; b; c; d ] -> 130 - let raw = 131 - String.init 4 (fun i -> 132 - match i with 133 - | 0 -> Char.chr a 134 - | 1 -> Char.chr b 135 - | 2 -> Char.chr c 136 - | _ -> Char.chr d) 137 - in 138 - Eio.Net.Ipaddr.of_raw raw 139 - | _ -> failwith ("Invalid IP address: " ^ dest_host) 123 + match Ipaddr.of_string dest_host with 124 + | Ok (V4 ip) -> Eio.Net.Ipaddr.of_raw (Ipaddr.V4.to_octets ip) 125 + | Ok (V6 ip) -> Eio.Net.Ipaddr.of_raw (Ipaddr.V6.to_octets ip) 126 + | Error (`Msg e) -> failwith ("Invalid IP address: " ^ e) 140 127 in 141 128 let addr = `Tcp (ipaddr, dest_port) in 142 129 Log.info (fun m -> m "Connecting to %s:%d..." dest_host dest_port);
+1
bin/dune
··· 15 15 eio_main 16 16 cmdliner 17 17 fmt 18 + ipaddr 18 19 logs 19 20 tty 20 21 vlog))