diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2018-11-14 00:15:33 +0100 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2018-11-29 00:06:53 +0100 |
commit | 039f4068c0e991b79769426486147d7851d5d6fd (patch) | |
tree | acafb4b294817e3c71050ceec6a525d0df2555aa /sid.mli | |
parent | 7b3d8e1d13bab22c82b38012cfcb8cbfe67ed7e5 (diff) | |
download | ocaml-sid-039f4068c0e991b79769426486147d7851d5d6fd.tar.gz |
sid: sid_test: add conformance mode imitating MS API
Add a conformance handler “Con_MS” to achieve a behavior that
mimicks that of MS’s implementation bug-for-bug.
Aspects of reading and formatting governd by the conformance:
- Validation of ident auths,
- validation of subauths,
- validation of leading zeros in decimal numbers,
- zero-padding of hex numbers.
Diffstat (limited to 'sid.mli')
-rw-r--r-- | sid.mli | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -46,6 +46,17 @@ module StringFmt : (** [encode s] convert SID [s] to its string representation. *) end +(** Conversions to and from the {e string format syntax} with permissive + input validation. *) +module MSStringFmt : + sig + val decode : string -> (t, string) result + (** [decode b] parse string buffer [b] into a SID. *) + + val encode : t -> string + (** [encode s] convert SID [s] to its string representation. *) + end + (** Conversion to and from the {e packet representation} (MS-DTYP 2.4.2.2). *) module PacketRep : sig |