diff options
Diffstat (limited to 'sid.ml')
-rw-r--r-- | sid.ml | 22 |
1 files changed, 3 insertions, 19 deletions
@@ -21,6 +21,9 @@ let create ?(sa=[||]) ia = if Array.length sa > max_subauth_count then None else Some (create_unsafe sa ia) +let get_ident_auth s = s.sid_ident_auth +let get_sub_auths s = s.sid_sub_auths + exception Nope let equal_sub_auths saa sab = @@ -36,25 +39,6 @@ let equal a b = && Array.length a.sid_sub_auths = Array.length b.sid_sub_auths && equal_sub_auths a.sid_sub_auths b.sid_sub_auths -module type Xtract = sig - type t - val nth_byte : t -> int -> int -end - -module MkExtract (INTTYPE : Stdint.Int) = struct - type t = INTTYPE.t - - let ilsr = INTTYPE.shift_left - let iland = INTTYPE.logand - let ixff = INTTYPE.of_string "255" - - let nth_byte n i = - (ilsr n i) |> iland ixff |> INTTYPE.to_int -end - -module U32Extract = MkExtract (U32) -module U64Extract = MkExtract (U64) - module StringFmt = struct let expect_char s c p = |