quicp2p/quicly/cid.nim

23 lines
935 B
Nim

type
quicly_cid_t* {.importc, header: "quicly/cid.h", bycopy.} = object
cid*: array[20, uint8]
len*: uint8
quicly_cid_plaintext_t* {.importc, header: "quicly/cid.h", bycopy.} = object
master_id*: uint32
path_id* {.bitsize: 8.}: uint32
thread_id* {.bitsize: 24.}: uint32
node_id*: uint64
quicly_cid_encryptor_t* {.importc, header: "quicly/cid.h", bycopy.} = object
encrypt_cid*: proc (self: ptr quicly_cid_encryptor_t;
encrypted: ptr quicly_cid_t; stateless_reset_token: pointer;
plaintext: ptr quicly_cid_plaintext_t) {.cdecl.}
decrypt_cid*: proc (self: ptr quicly_cid_encryptor_t;
plaintext: ptr quicly_cid_plaintext_t; encrypted: pointer;
len: csize_t): csize_t {.cdecl.}
generate_stateless_reset_token*: proc (self: ptr quicly_cid_encryptor_t;
token: pointer; cid: pointer): cint {.cdecl.}