package dns

  1. Overview
  2. Docs
type digest_alg
type gateway_tc
type pubkey_alg
type ipseckey_alg
type gateway
type hash_alg
type fp_type
type dnssec_alg
val int_to_dnssec_alg : int -> dnssec_alg option
type q_type =
  1. | Q_A
  2. | Q_NS
  3. | Q_MD
  4. | Q_MF
  5. | Q_CNAME
  6. | Q_SOA
  7. | Q_MB
  8. | Q_MG
  9. | Q_MR
  10. | Q_NULL
  11. | Q_WKS
  12. | Q_PTR
  13. | Q_HINFO
  14. | Q_MINFO
  15. | Q_MX
  16. | Q_TXT
  17. | Q_RP
  18. | Q_AFSDB
  19. | Q_X25
  20. | Q_ISDN
  21. | Q_RT
  22. | Q_NSAP
  23. | Q_NSAPPTR
  24. | Q_SIG
  25. | Q_KEY
  26. | Q_PX
  27. | Q_GPOS
  28. | Q_AAAA
  29. | Q_LOC
  30. | Q_NXT
  31. | Q_EID
  32. | Q_NIMLOC
  33. | Q_SRV
  34. | Q_ATMA
  35. | Q_NAPTR
  36. | Q_KM
  37. | Q_CERT
  38. | Q_A6
  39. | Q_DNAME
  40. | Q_SINK
  41. | Q_OPT
  42. | Q_APL
  43. | Q_DS
  44. | Q_SSHFP
  45. | Q_IPSECKEY
  46. | Q_RRSIG
  47. | Q_NSEC
  48. | Q_DNSKEY
  49. | Q_NSEC3
  50. | Q_NSEC3PARAM
  51. | Q_SPF
  52. | Q_UINFO
  53. | Q_UID
  54. | Q_GID
  55. | Q_UNSPEC
  56. | Q_AXFR
  57. | Q_MAILB
  58. | Q_MAILA
  59. | Q_ANY_TYP
  60. | Q_TA
  61. | Q_DLV
val int_to_q_type : int -> q_type option
val q_type_to_int : q_type -> int
type rr_type =
  1. | RR_A
  2. | RR_NS
  3. | RR_MD
  4. | RR_MF
  5. | RR_CNAME
  6. | RR_SOA
  7. | RR_MB
  8. | RR_MG
  9. | RR_MR
  10. | RR_NULL
  11. | RR_WKS
  12. | RR_PTR
  13. | RR_HINFO
  14. | RR_MINFO
  15. | RR_MX
  16. | RR_TXT
  17. | RR_RP
  18. | RR_AFSDB
  19. | RR_X25
  20. | RR_ISDN
  21. | RR_RT
  22. | RR_NSAP
  23. | RR_NSAPPTR
  24. | RR_SIG
  25. | RR_KEY
  26. | RR_PX
  27. | RR_GPOS
  28. | RR_AAAA
  29. | RR_LOC
  30. | RR_NXT
  31. | RR_EID
  32. | RR_NIMLOC
  33. | RR_SRV
  34. | RR_ATMA
  35. | RR_NAPTR
  36. | RR_KM
  37. | RR_CERT
  38. | RR_A6
  39. | RR_DNAME
  40. | RR_SINK
  41. | RR_OPT
  42. | RR_APL
  43. | RR_DS
  44. | RR_SSHFP
  45. | RR_IPSECKEY
  46. | RR_RRSIG
  47. | RR_NSEC
  48. | RR_DNSKEY
  49. | RR_NSEC3
  50. | RR_NSEC3PARAM
  51. | RR_SPF
  52. | RR_UINFO
  53. | RR_UID
  54. | RR_GID
  55. | RR_UNSPEC
type type_bit_map
type type_bit_maps
type rdata =
  1. | A of Cstruct.ipv4
  2. | AAAA of string
  3. | AFSDB of Cstruct.uint16 * Name.domain_name
  4. | CNAME of Name.domain_name
  5. | DNSKEY of Cstruct.uint16 * dnssec_alg * string
  6. | DS of Cstruct.uint16 * dnssec_alg * digest_alg * string
  7. | HINFO of string * string
  8. | IPSECKEY of Cstruct.byte * gateway_tc * ipseckey_alg * gateway * string
  9. | ISDN of string * string option
  10. | MB of Name.domain_name
  11. | MD of Name.domain_name
  12. | MF of Name.domain_name
  13. | MG of Name.domain_name
  14. | MINFO of Name.domain_name * Name.domain_name
  15. | MR of Name.domain_name
  16. | MX of Cstruct.uint16 * Name.domain_name
  17. | NS of Name.domain_name
  18. | NSEC of Name.domain_name * type_bit_maps
  19. | NSEC3 of hash_alg * Cstruct.byte * Cstruct.uint16 * Cstruct.byte * string * Cstruct.byte * string * type_bit_maps
  20. | NSEC3PARAM of hash_alg * Cstruct.byte * Cstruct.uint16 * Cstruct.byte * string
  21. | PTR of Name.domain_name
  22. | RP of Name.domain_name * Name.domain_name
  23. | RRSIG of rr_type * dnssec_alg * Cstruct.byte * int32 * int32 * int32 * Cstruct.uint16 * Name.domain_name * string
  24. | RT of Cstruct.uint16 * Name.domain_name
  25. | SOA of Name.domain_name * Name.domain_name * int32 * int32 * int32 * int32 * int32
  26. | SRV of Cstruct.uint16 * Cstruct.uint16 * Cstruct.uint16 * Name.domain_name
  27. | SSHFP of pubkey_alg * fp_type * string
  28. | TXT of string list
  29. | UNKNOWN of int * string
  30. | WKS of int32 * Cstruct.byte * string
  31. | X25 of string
val rdata_to_string : rdata -> string
val parse_rdata : (int, Name.label) Hashtbl.t -> int -> rr_type -> Cstruct.buf -> rdata
type rr_class =
  1. | RR_IN
  2. | RR_CS
  3. | RR_CH
  4. | RR_HS
val rr_class_to_string : rr_class -> string
type rr = {
  1. name : Name.domain_name;
  2. cls : rr_class;
  3. ttl : int32;
  4. rdata : rdata;
}
val rr_to_string : rr -> string
val parse_rr : (int, Name.label) Hashtbl.t -> int -> Cstruct.buf -> rr * (int * Cstruct.buf)
val q_type_to_string : q_type -> string
val string_to_q_type : string -> q_type option
type q_class =
  1. | Q_IN
  2. | Q_CS
  3. | Q_CH
  4. | Q_HS
  5. | Q_NONE
  6. | Q_ANY_CLS
val q_class_to_string : q_class -> string
val string_to_q_class : string -> q_class option
type question = {
  1. q_name : Name.domain_name;
  2. q_type : q_type;
  3. q_class : q_class;
}
val question_to_string : question -> string
val parse_question : (int, Name.label) Hashtbl.t -> int -> Cstruct.buf -> question * (int * Cstruct.buf)
type qr =
  1. | Query
  2. | Response
type opcode =
  1. | Standard
  2. | Inverse
  3. | Status
  4. | Reserved
  5. | Notify
  6. | Update
val opcode_to_string : opcode -> string
type rcode =
  1. | NoError
  2. | FormErr
  3. | ServFail
  4. | NXDomain
  5. | NotImp
  6. | Refused
  7. | YXDomain
  8. | YXRRSet
  9. | NXRRSet
  10. | NotAuth
  11. | NotZone
  12. | BadVers
  13. | BadKey
  14. | BadTime
  15. | BadMode
  16. | BadName
  17. | BadAlg
val rcode_to_string : rcode -> string
type detail = {
  1. qr : qr;
  2. opcode : opcode;
  3. aa : bool;
  4. tc : bool;
  5. rd : bool;
  6. ra : bool;
  7. rcode : rcode;
}
type t = {
  1. id : int;
  2. detail : detail;
  3. questions : question list;
  4. answers : rr list;
  5. authorities : rr list;
  6. additionals : rr list;
}
val to_string : t -> string
val parse : (int, Name.label) Hashtbl.t -> Cstruct.buf -> t
val marshal : Cstruct.buf -> t -> Cstruct.buf
OCaml

Innovation. Community. Security.