123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165moduleEthernet=structtypeerror=[`Exceeds_mtu]letpp_errorppf=function|`Exceeds_mtu->Fmt.stringppf"exceeds MTU"typeproto=[`ARP|`IPv4|`IPv6]letpp_protoppf=function|`ARP->Fmt.stringppf"ARP"|`IPv4->Fmt.stringppf"IPv4"|`IPv6->Fmt.stringppf"IPv6"endmoduleIp=structtypeerror=[|`No_routeofstring(** can't send a message to that destination *)|`Would_fragment]letpp_errorppf=function|`No_routes->Fmt.pfppf"no route to destination: %s"s|`Would_fragment->Fmt.stringppf"would fragment"typeproto=[`TCP|`UDP|`ICMP]letpp_protoppf=function|`TCP->Fmt.stringppf"TCP"|`UDP->Fmt.stringppf"UDP"|`ICMP->Fmt.stringppf"ICMP"endmoduleArp=structtypeerror=[|`Timeout(** Failed to establish a mapping between an IP and a link-level address *)]letpp_errorppf=function|`Timeout->Fmt.pfppf"could not determine a link-level address for the IP address given"endmoduleTcp=structtypeerror=[`Timeout|`Refused]typewrite_error=[error|Mirage_flow.write_error]letpp_errorppf=function|`Timeout->Fmt.stringppf"connection attempt timed out"|`Refused->Fmt.stringppf"connection attempt was refused"letpp_write_errorppf=function|#Mirage_flow.write_errorase->Mirage_flow.pp_write_errorppfe|#errorase->pp_errorppfeendmoduletypeETHERNET=sigtypeerror=private[>Ethernet.error]valpp_error:errorFmt.ttypebuffertypemacaddrincludeMirage_device.Svalwrite:t->?src:macaddr->macaddr->Ethernet.proto->?size:int->(buffer->int)->(unit,error)resultiovalmac:t->macaddrvalmtu:t->intvalinput:arpv4:(buffer->unitio)->ipv4:(buffer->unitio)->ipv6:(buffer->unitio)->t->buffer->unitioendmoduletypeIP=sigtypeerror=private[>Ip.error]valpp_error:errorFmt.ttypebuffertypeipaddrvalpp_ipaddr:ipaddrFmt.tincludeMirage_device.Stypecallback=src:ipaddr->dst:ipaddr->buffer->unitiovalinput:t->tcp:callback->udp:callback->default:(proto:int->callback)->buffer->unitiovalwrite:t->?fragment:bool->?ttl:int->?src:ipaddr->ipaddr->Ip.proto->?size:int->(buffer->int)->bufferlist->(unit,error)resultiovalpseudoheader:t->?src:ipaddr->ipaddr->Ip.proto->int->buffervalsrc:t->dst:ipaddr->ipaddrvalget_ip:t->ipaddrlistvalmtu:t->intendmoduletypeARP=sigincludeMirage_device.Stypeipaddrtypebuffertypemacaddrtypereprtypeerror=private[>Arp.error]valpp_error:errorFmt.tvalto_repr:t->repriovalpp:reprFmt.tvalget_ips:t->ipaddrlistvalset_ips:t->ipaddrlist->unitiovalremove_ip:t->ipaddr->unitiovaladd_ip:t->ipaddr->unitiovalquery:t->ipaddr->(macaddr,error)resultiovalinput:t->buffer->unitioendmoduletypeIPV4=IPmoduletypeIPV6=IPmoduletypeICMP=sigincludeMirage_device.Stypeipaddrtypebuffertypeerrorvalpp_error:errorFmt.tvalinput:t->src:ipaddr->dst:ipaddr->buffer->unitiovalwrite:t->dst:ipaddr->?ttl:int->buffer->(unit,error)resultioendmoduletypeICMPV4=ICMPmoduletypeUDP=sigtypeerrorvalpp_error:errorFmt.ttypebuffertypeipaddrtypeipinputincludeMirage_device.Stypecallback=src:ipaddr->dst:ipaddr->src_port:int->buffer->unitiovalinput:listeners:(dst_port:int->callbackoption)->t->ipinputvalwrite:?src_port:int->?ttl:int->dst:ipaddr->dst_port:int->t->buffer->(unit,error)resultioendmoduleKeepalive=structtypet={after:Duration.t;interval:Duration.t;probes:int;}endmoduletypeTCP=sigtypeerror=private[>Tcp.error]typewrite_error=private[>Tcp.write_error]typebuffertypeipaddrtypeipinputtypeflowincludeMirage_device.SincludeMirage_flow.Swithtype'aio:='aioandtypebuffer:=bufferandtypeflow:=flowandtypeerror:=errorandtypewrite_error:=write_errorvaldst:flow->ipaddr*intvalwrite_nodelay:flow->buffer->(unit,write_error)resultiovalwritev_nodelay:flow->bufferlist->(unit,write_error)resultiovalcreate_connection:?keepalive:Keepalive.t->t->ipaddr*int->(flow,error)resultiotypelistener={process:flow->unitio;keepalive:Keepalive.toption;}valinput:t->listeners:(int->listeneroption)->ipinputend