DTN controller and policy language for satellite networks
0
fork

Configure Feed

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

borealis: Fix SESS_INIT header size (18 -> 20 bytes)

Include 2-byte node_id_len field in fixed header size.

+3 -3
+3 -3
adapters/tcpcl_adapter.ml
··· 63 63 match Tcpcl.message_type_of_int msg_type with 64 64 | None -> Error (Printf.sprintf "unknown message type: %d" msg_type) 65 65 | Some Tcpcl.Sess_init -> 66 - (* Read SESS_INIT: 2+8+8 = 18 bytes header + variable *) 67 - let fixed = recv_bytes t 18 in 66 + (* Read SESS_INIT: 2 (keepalive) + 8 (seg_mru) + 8 (xfer_mru) + 2 (node_len) = 20 bytes *) 67 + let fixed = recv_bytes t 20 in 68 68 let keepalive = (Char.code fixed.[0] lsl 8) lor Char.code fixed.[1] in 69 - let node_id_len = (Char.code fixed.[16] lsl 8) lor Char.code fixed.[17] in 69 + let node_id_len = (Char.code fixed.[18] lsl 8) lor Char.code fixed.[19] in 70 70 let node_id = recv_bytes t node_id_len in 71 71 let _ext_len = recv_bytes t 4 in 72 72 Ok