Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/krb5/src/include/k5-ipc_stream.h
34879 views
1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
/* include/k5-ipc_stream.h */
3
/*
4
* Copyright 2006 Massachusetts Institute of Technology.
5
* All Rights Reserved.
6
*
7
* Export of this software from the United States of America may
8
* require a specific license from the United States Government.
9
* It is the responsibility of any person or organization contemplating
10
* export to obtain such a license before exporting.
11
*
12
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13
* distribute this software and its documentation for any purpose and
14
* without fee is hereby granted, provided that the above copyright
15
* notice appear in all copies and that both that copyright notice and
16
* this permission notice appear in supporting documentation, and that
17
* the name of M.I.T. not be used in advertising or publicity pertaining
18
* to distribution of the software without specific, written prior
19
* permission. Furthermore if you modify this software you must label
20
* your software as modified software and not distribute it in such a
21
* fashion that it might be confused with the original M.I.T. software.
22
* M.I.T. makes no representations about the suitability of
23
* this software for any purpose. It is provided "as is" without express
24
* or implied warranty.
25
*/
26
27
#ifndef K5_IPC_STREAM_H
28
#define K5_IPC_STREAM_H
29
30
#include "k5-platform.h"
31
32
struct k5_ipc_stream_s;
33
typedef struct k5_ipc_stream_s *k5_ipc_stream;
34
35
36
int32_t krb5int_ipc_stream_new (k5_ipc_stream *out_stream);
37
38
uint32_t krb5int_ipc_stream_release (k5_ipc_stream io_stream);
39
40
uint64_t krb5int_ipc_stream_size (k5_ipc_stream in_stream);
41
42
const char *krb5int_ipc_stream_data (k5_ipc_stream in_stream);
43
44
uint32_t krb5int_ipc_stream_read (k5_ipc_stream in_stream,
45
void *io_data,
46
uint64_t in_size);
47
uint32_t krb5int_ipc_stream_write (k5_ipc_stream in_stream,
48
const void *in_data,
49
uint64_t in_size);
50
51
uint32_t krb5int_ipc_stream_read_string (k5_ipc_stream io_stream,
52
char **out_string);
53
uint32_t krb5int_ipc_stream_write_string (k5_ipc_stream io_stream,
54
const char *in_string);
55
void krb5int_ipc_stream_free_string (char *in_string);
56
57
uint32_t krb5int_ipc_stream_read_int32 (k5_ipc_stream io_stream,
58
int32_t *out_int32);
59
uint32_t krb5int_ipc_stream_write_int32 (k5_ipc_stream io_stream,
60
int32_t in_int32);
61
62
uint32_t krb5int_ipc_stream_read_uint32 (k5_ipc_stream io_stream,
63
uint32_t *out_uint32);
64
uint32_t krb5int_ipc_stream_write_uint32 (k5_ipc_stream io_stream,
65
uint32_t in_uint32);
66
67
uint32_t krb5int_ipc_stream_read_int64 (k5_ipc_stream io_stream,
68
int64_t *out_int64);
69
uint32_t krb5int_ipc_stream_write_int64 (k5_ipc_stream io_stream,
70
int64_t in_int64);
71
72
uint32_t krb5int_ipc_stream_read_uint64 (k5_ipc_stream io_stream,
73
uint64_t *out_uint64);
74
uint32_t krb5int_ipc_stream_write_uint64 (k5_ipc_stream io_stream,
75
uint64_t in_uint64);
76
77
#endif /* K5_IPC_STREAM_H */
78
79