package tcpip
OCaml TCP/IP networking stack, used in MirageOS
Install
Dune Dependency
Authors
Maintainers
Sources
tcpip-7.1.2.tbz
sha256=96b6aeafa35f143f7275d1becb6d639472adf3680b8180416de765b6581c466d
sha512=3f873c986de5c58df72db2953c6b2a6319963dbbbd0781b55c2878fd1eaa081ebb7cecbee595db7cb3680a6f438904f98cb69ca17e70c7a6d2d1f61277e929bd
doc/src/tcpip.tcp/tcp_wire.ml.html
Source file tcp_wire.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
[%%cstruct type tcp = { src_port: uint16_t; dst_port: uint16_t; sequence: uint32_t; ack_number: uint32_t; dataoff: uint8_t; flags: uint8_t; window: uint16_t; checksum: uint16_t; urg_ptr: uint16_t; } [@@big_endian] ] [%%cstruct type tcpv4_pseudo_header = { src: uint32_t; dst: uint32_t; res: uint8_t; proto: uint8_t; len: uint16_t; } [@@big_endian] ] (* XXX note that we overwrite the lower half of dataoff * with 0, so be careful when implemented CWE flag which * sits there *) let get_data_offset buf = ((get_tcp_dataoff buf) lsr 4) * 4 let set_data_offset buf v = set_tcp_dataoff buf (v lsl 4) let get_fin buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 0)) > 0 let get_syn buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 1)) > 0 let get_rst buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 2)) > 0 let get_psh buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 3)) > 0 let get_ack buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 4)) > 0 let get_urg buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 5)) > 0 let get_ece buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 6)) > 0 let get_cwr buf = ((Cstruct.get_uint8 buf 13) land (1 lsl 7)) > 0 let set_fin buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 0)) let set_syn buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 1)) let set_rst buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 2)) let set_psh buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 3)) let set_ack buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 4)) let set_urg buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 5)) let set_ece buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 6)) let set_cwr buf = Cstruct.set_uint8 buf 13 ((Cstruct.get_uint8 buf 13) lor (1 lsl 7))
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>