Debian Codegraph @

upstream/debian-unstable/man3/OPENSSL_load_u16_le.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "OPENSSL_LOAD_U16_LE 3SSL"
58 .TH OPENSSL_LOAD_U16_LE 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 OPENSSL_load_u16_le, OPENSSL_load_u16_be, OPENSSL_load_u32_le,
65 OPENSSL_load_u32_be, OPENSSL_load_u64_le, OPENSSL_load_u64_be,
66 OPENSSL_store_u16_le, OPENSSL_store_u16_be,
67 OPENSSL_store_u32_le, OPENSSL_store_u32_be,
68 OPENSSL_store_u64_le, OPENSSL_store_u64_be \-
69 Read and write unsigned 16, 32 and 64\-bit integers in a specific byte order
70 .SH SYNOPSIS
71 .IX Header "SYNOPSIS"
72 .Vb 1
73 \& #include <openssl/byteorder.h>
74 \&
75 \& static ossl_inline unsigned char *OPENSSL_store_u16_le(
76 \& unsigned char *out, uint16_t val);
77 \& static ossl_inline unsigned char *OPENSSL_store_u16_be(
78 \& unsigned char *out, uint16_t val);
79 \& static ossl_inline unsigned char *OPENSSL_store_u32_le(
80 \& unsigned char *out, uint32_t val);
81 \& static ossl_inline unsigned char *OPENSSL_store_u32_be(
82 \& unsigned char *out, uint32_t val);
83 \& static ossl_inline unsigned char *OPENSSL_store_u64_le(
84 \& unsigned char *out, uint64_t val);
85 \& static ossl_inline unsigned char *OPENSSL_store_u64_be(
86 \& unsigned char *out, uint64_t val);
87 \& static ossl_inline const unsigned char *OPENSSL_load_u16_le(
88 \& uint16_t *val, const unsigned char *in);
89 \& static ossl_inline const unsigned char *OPENSSL_load_u16_be(
90 \& uint16_t *val, const unsigned char *in);
91 \& static ossl_inline const unsigned char *OPENSSL_load_u32_le(
92 \& uint32_t *val, const unsigned char *in);
93 \& static ossl_inline const unsigned char *OPENSSL_load_u32_be(
94 \& uint32_t *val, const unsigned char *in);
95 \& static ossl_inline const unsigned char *OPENSSL_load_u64_le(
96 \& uint64_t *val, const unsigned char *in);
97 \& static ossl_inline const unsigned char *OPENSSL_load_u64_be(
98 \& uint64_t *val, const unsigned char *in);
99 .Ve
100 .SH DESCRIPTION
101 .IX Header "DESCRIPTION"
102 These functions read and write 16, 32 and 64 bit unsigned integers in a
103 specified byte order.
104 The \f(CW\*(C`_be\*(C'\fR functions use big-endian byte order, while the \f(CW\*(C`_le\*(C'\fR functions use
105 little-endian byte order.
106 They're implemented directly in the header file, and declared static. When the
107 compiler supports inline functions, they're also declared inline.
108 An optimising compiler will often convert these to just one or two machine
109 instructions: a load or store with a possible byte swap.
110 .PP
111 The \f(CW\*(C`load\*(C'\fR functions write the decoded integer value at the address pointed to
112 by \fIval\fR, which must be a valid (possibly suitably aligned) address of an
113 object of the appropriate type.
114 The \f(CW\*(C`store\*(C'\fR functions write the encoding of \fIval\fR at the address pointed to
115 by \fIout\fR.
116 .PP
117 For convenience, these functions return the updated input or output pointer,
118 making it easy to continue reading or writing more data at the next memory
119 location.
120 .PP
121 No bounds checks are performed, the caller is responsible for making sure that
122 the input or output buffers are sufficiently large for the requested read or
123 write.
124 .SH "RETURN VALUES"
125 .IX Header "RETURN VALUES"
126 All these functions return the next memory address following the last byte
127 written or read.
128 .SH HISTORY
129 .IX Header "HISTORY"
130 These functions were added in OpenSSL 3.5.
131 .SH COPYRIGHT
132 .IX Header "COPYRIGHT"
133 Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
134 .PP
135 Licensed under the Apache License 2.0 (the "License"). You may not use
136 this file except in compliance with the License. You can obtain a copy
137 in the file LICENSE in the source distribution or at
138 <https://www.openssl.org/source/license.html>.