Re: [MirageOS-devel] error handling in encode functions

2019-03-24 Thread Jon Crowcroft
in my book, part of the s/w contract with a layer below is that it doesn't deliver an illegal size frame (.e. less than definied min or bigger than max)...to the layer above receiving i realize this may be a challenge for some zero copy stacks > Hello, > > when I read through some network code (

[MirageOS-devel] error handling in encode functions

2019-03-24 Thread Hannes Mehnert
Hello, when I read through some network code (I'm only talking about layers IP and below), I encountered these signatures: val into_cstruct : t -> Cstruct.t -> (unit, error) result Which, from a broad perspective are fine and pretty safe to use. Now, when I read a bit more through our networkin