We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While working through the Frenetic tutorial (http://frenetic-lang.github.io/tutorials/OxMonitor/) I wrote the following:
let is_http_packet (pk : Packet.packet) : bool = Packet.tpSrc pk = 80 && Packet.nwProto pk = 6
When a packet pk would arrive without a valid port, the controller would exit silently without saying why it was exiting.
pk
The text was updated successfully, but these errors were encountered:
Does it work if you add Packet.dlTyp = 0x800?
Sorry, something went wrong.
The packet accessors do fail if certain dependencies are not satisfied. This was an explicit design decision vs. returning optional values.
It works if I change the order to the following:
let is_http_packet (pk : Packet.packet) : bool = Packet.dlTyp pk = 0x800 && Packet.nwProto pk = 6 && Packet.tpSrc pk = 80
It is fine that it fails, that makes sense. It is that it fails silently. There is no message as to why it failed.
Yes, that's a bug.
There is an exception thrown by tpSrc: https://github.com/frenetic-lang/ocaml-packet/blob/master/lib/Packet.ml#L1112
tpSrc
And it should be caught and printed by the top-level Monitor in the Ox controller: https://github.com/frenetic-lang/ox/blob/master/lib/OxStart.ml#L90
But evidently that's not happening...
No branches or pull requests
While working through the Frenetic tutorial (http://frenetic-lang.github.io/tutorials/OxMonitor/) I wrote the following:
When a packet
pk
would arrive without a valid port, the controller would exit silently without saying why it was exiting.The text was updated successfully, but these errors were encountered: