| /freebsd-src/contrib/ldns/ |
| H A D | radix.c | 2 * radix.c -- generic radix tree 51 radix_strlen_t len); 53 radix_strlen_t len, ldns_radix_node_t** result, radix_strlen_t* pos); 54 static int ldns_radix_array_space(ldns_radix_node_t* node, uint8_t byte); 57 radix_strlen_t pos, radix_strlen_t len); 62 radix_strlen_t pos, radix_strlen_t len, ldns_radix_node_t* add); 90 ldns_radix_new_node(void* data, uint8_t* key, radix_strlen_t len) in ldns_radix_new_node() argument 96 node->data = data; in ldns_radix_new_node() 97 node->key = key; in ldns_radix_new_node() 98 node->klen = len; in ldns_radix_new_node() [all …]
|
| /freebsd-src/libexec/bootpd/ |
| H A D | dovend.c | 21 PRIVATE int insert_generic(struct shared_bindata *, byte **, int *); 37 dovend_rfc1497(struct host *hp, byte *buf, int len) in dovend_rfc1497() argument 39 int bytesleft = len; in dovend_rfc1497() 40 byte *vp = buf; in dovend_rfc1497() 43 #define NEED(LEN, MSG) do \ in dovend_rfc1497() argument 44 if (bytesleft < (LEN)) { \ in dovend_rfc1497() 46 hp->hostname->string, MSG); \ in dovend_rfc1497() 47 return (vp - buf); \ in dovend_rfc1497() 60 * Also, why is the hostname so far down the list? -gwr in dovend_rfc1497() 63 if (hp->flags.time_offset) { in dovend_rfc1497() [all …]
|
| /freebsd-src/contrib/bearssl/T0/ |
| H A D | ConstData.cs | 35 return len; 39 byte[] buf; 40 int len; field in ConstData 45 buf = new byte[4]; in ConstData() 46 len = 0; in ConstData() 51 int tlen = len + elen; in Expand() 54 byte[] nbuf = new byte[nlen]; in Expand() 55 Array.Copy(buf, 0, nbuf, 0, len); in Expand() 60 internal void Add8(byte b) in Add8() 63 buf[len ++] = b; in Add8() [all …]
|
| /freebsd-src/crypto/openssl/crypto/modes/ |
| H A D | siv128.c | 2 * Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved. 47 return byteswap8(b->word[i]); in siv128_getword() 48 return b->word[i]; in siv128_getword() 56 b->word[i] = byteswap8(x); in siv128_putword() 58 b->word[i] = x; in siv128_putword() 64 x->word[0] ^= y->word[0]; in siv128_xorblock() 65 x->word[1] ^= y->word[1]; in siv128_xorblock() 72 * Assumes two's-complement arithmetic 80 int64_t low_mask = -((int64_t)(high_carry >> 63)) & 0x87; in siv128_dbl() 90 unsigned char const* in, size_t len) in siv128_do_s2v_p() argument [all …]
|
| /freebsd-src/contrib/arm-optimized-routines/string/aarch64/ |
| H A D | strlen.S | 2 * strlen - calculate the length of a string. 4 * Copyright (c) 2020-2022, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 10 * ARMv8-a, AArch64, Advanced SIMD, unaligned accesses. 17 #define len x0 macro 43 (X - 1) & (~X) & 0x80 (=> (X - [all...] |
| H A D | strcpy.S | 2 * strcpy/stpcpy - copy a string returning pointer to start/end. 4 * Copyright (c) 2020-2023, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 10 * ARMv8-a, AArch64, Advanced SIMD. 22 #define len x4 macro 48 For each 16-byte chun [all...] |
| /freebsd-src/sys/contrib/openzfs/module/zfs/ |
| H A D | lz4_zfs.c | 2 * LZ4 - Fast LZ compression algorithm 4 * Copyright (C) 2011-2013, Yann Collet. 5 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 31 * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html 32 * - LZ4 source repository : http://code.google.com/p/lz4/ 36 * N.B. - This file seems to be based on LZ4 r85, dated Dec 10, 2012 67 d_len - sizeof (bufsiz)); in lz4_compress_zfs() 97 * Returns 0 on success (decompression function returned non-negative) in lz4_decompress_zfs() 98 * and non-zer in lz4_decompress_zfs() 284 #define BYTE global() macro 490 int len, length; LZ4_compressCtx() local 680 int len, length; LZ4_compress64kCtx() local [all...] |
| /freebsd-src/share/man/man4/ |
| H A D | hidraw.4 | 40 .Bd -ragged -offset indent 49 .Bd -literal -offset indent 64 \-compatible calls: 65 .Bl -tag -width indent 83 .Bd -literal 121 On a device which uses numbered reports, the first byte of the returned data 123 The report data begins from the second byte [all...] |
| /freebsd-src/sys/cddl/contrib/opensolaris/common/lz4/ |
| H A D | lz4.c | 2 * LZ4 - Fast LZ compression algorithm 4 * Copyright (C) 2011-2013, Yann Collet. 5 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 31 * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html 32 * - LZ4 source repository : http://code.google.com/p/lz4/ 84 d_len - sizeof (bufsiz)); in lz4_compress() 121 * Returns 0 on success (decompression function returned non-negative) in lz4_decompress() 122 * and non-zero on failure (decompression function returned negative). in lz4_decompress() 149 * negative result, indicating the byte position of the faulty 179 * L1 64KB for AMD). Memory usage formula : N->2^(N+2) Bytes [all …]
|
| /freebsd-src/crypto/openssh/ |
| H A D | ssh_api.h | 24 #include "openbsd-compat/sys-queue.h" 69 * function given must return 0 if the hostkey is ok, -1 if the 78 * ssh_packet_next() works by processing an input byte-stream, 79 * decrypting the received data and hiding the key-exchange from 82 * in this case the caller must fill the input byte-stream by passing 85 * byte-stream back over the network. otherwise the key exchange 86 * would not proceed. the output byte-stream is accessed through 101 * the encrypted packet is appended to the output byte-stream. 104 size_t len); 107 * ssh_input_space() checks if 'len' bytes can be appended to the [all …]
|
| /freebsd-src/contrib/wpa/src/eap_common/ |
| H A D | eap_sake_common.c | 2 * EAP server/peer: EAP-SAKE shared routines 3 * Copyright (c) 2006-2019, Jouni Malinen <j@w1.fi> 19 u8 attr_id, u8 len, const u8 *data) in eap_sake_parse_add_attr() argument 25 wpa_printf(MSG_DEBUG, "EAP-SAKE: Parse: AT_RAND_S"); in eap_sake_parse_add_attr() 26 if (len != EAP_SAKE_RAND_LEN) { in eap_sake_parse_add_attr() 27 wpa_printf(MSG_DEBUG, "EAP-SAKE: AT_RAND_S with " in eap_sake_parse_add_attr() 28 "invalid payload length %d", len); in eap_sake_parse_add_attr() 29 return -1; in eap_sake_parse_add_attr() 31 attr->rand_s = data; in eap_sake_parse_add_attr() 34 wpa_printf(MSG_DEBUG, "EAP-SAK in eap_sake_parse_add_attr() 160 eap_sake_parse_attributes(const u8 * buf,size_t len,struct eap_sake_parse_attr * attr) eap_sake_parse_attributes() argument 219 size_t len[4]; eap_sake_kdf() local 392 eap_sake_add_attr(struct wpabuf * buf,u8 type,const u8 * data,size_t len) eap_sake_add_attr() argument [all...] |
| /freebsd-src/sys/contrib/openzfs/module/zstd/lib/common/ |
| H A D | xxhash.c | 2 * xxHash - Fast Hash algorithm 3 * Copyright (c) 2012-2020, Yann Collet, Facebook, Inc. 6 * - xxHash homepage: http://www.xxhash.com 7 * - xxHash source repository : https://github.com/Cyan4973/xxHash 9 * This source code is licensed under both the BSD-style license (found in the 12 * You may select, at your option, one of the above-listed licenses. 21 * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. 44 …* When this option is enabled, xxHash output for null input pointers will be the same as a null-le… 50 …* By default, xxHash library provides endian-independent Hash values, based on little-endian conve… 51 * Results are therefore identical for little-endian and big-endian CPU. [all …]
|
| /freebsd-src/contrib/lua/src/ |
| H A D | lutf8lib.c | 3 ** Standard library for UTF-8 manipulation 29 #define MSGInvalid "invalid UTF-8 code" 32 ** Integer type for decoded UTF-8 values; MAXUTF needs 31 bits. 47 static lua_Integer u_posrelat (lua_Integer pos, size_t len) { in u_posrelat() argument 49 else if (0u - (size_t)pos > len) return 0; in u_posrelat() 50 else return (lua_Integer)len + pos + 1; in u_posrelat() 55 ** Decode one UTF-8 sequence, returning NULL if byte sequence is 58 ** entry forces an error for non-ascii bytes with no continuation 71 unsigned int cc = (unsigned char)s[++count]; /* read next byte */ in utf8_decode() 72 if (!iscont(cc)) /* not a continuation byte? */ in utf8_decode() [all …]
|
| /freebsd-src/crypto/openssl/crypto/ct/ |
| H A D | ct_oct.c | 2 * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 24 int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len) in o2i_SCT_signature() argument 27 size_t len_remaining = len; in o2i_SCT_signature() 30 if (sct->version != SCT_VERSION_V1) { in o2i_SCT_signature() 32 return -1; in o2i_SCT_signature() 35 * digitally-signed struct header: (1 byte) Hash algorithm (1 byte) in o2i_SCT_signature() 41 if (len <= 4) { in o2i_SCT_signature() 43 return -1; in o2i_SCT_signature() 48 sct->hash_alg = *p++; in o2i_SCT_signature() 49 sct->sig_alg = *p++; in o2i_SCT_signature() [all …]
|
| /freebsd-src/crypto/openssl/engines/asm/ |
| H A D | e_padlock-x86_64.pl | 2 # Copyright 2011-2023 The OpenSSL Project Authors. All Rights Reserved. 19 # Assembler helpers for Padlock engine. See even e_padlock-x86.pl for 30 ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or 31 ( $xlate="${dir}../../crypto/perlasm/x86_64-xlate.pl" and -f $xlate) or 32 die "can't locate x86_64-xlate.pl"; 46 $len="%rcx"; 54 .type padlock_capability,\@abi-omnipotent 90 .size padlock_capability,.-padlock_capability 93 .type padlock_key_bswap,\@abi-omnipotent,0 107 .size padlock_key_bswap,.-padlock_key_bswap [all …]
|
| /freebsd-src/contrib/ntp/ntpd/ |
| H A D | ntp_signd.c | 27 /* socket routines by tridge - from junkcode.samba.org */ 38 return -1; in ux_socket_connect() 46 if (fd == -1) { in ux_socket_connect() 47 return -1; in ux_socket_connect() 50 if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) { in ux_socket_connect() 52 return -1; in ux_socket_connect() 63 write_all(int fd, const void *buf, size_t len) in write_all() argument 66 while (len) { in write_all() 67 int n = write(fd, buf, len); in write_all() 70 len -= n; in write_all() [all …]
|
| /freebsd-src/crypto/openssl/crypto/aes/asm/ |
| H A D | aes-s390x.pl | 2 # Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved. 21 # Software performance improvement over gcc-generated code is ~70% and 22 # in absolute terms is ~73 cycles per byte processed with 128-bit key. 23 # You're likely to exclaim "why so slow?" Keep in mind that z-CPUs are 24 # *strictly* in-order execution and issued instruction [in this case 26 # flow proceeds. S-boxes are compressed to 2KB[+256B]. 39 # for 128-bit keys, if hardware support is detected. 45 # dual-issue z10 pipeline. This gave ~25% improvement on z10 and 46 # almost 50% on z9. The gain is smaller on z10, because being dual- 48 # critical path is not long enough. Yet it spends ~24 cycles per byte [all …]
|
| /freebsd-src/usr.sbin/ngctl/ |
| H A D | write.c | 19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 52 "write hook < -f file | byte ... >", 67 u_int len; in WriteCmd() local 68 int byte; in WriteCmd() local 77 if (strcmp(av[2], "-f") == 0) { in WriteCmd() 84 if ((len = fread(buf, 1, sizeof(buf), fp)) == 0) { in WriteCmd() 94 for (i = 2, len = 0; i < ac && len < sizeof(buf); i++, len++) { in WriteCmd() 95 if (sscanf(av[i], "%i", &byte) != 1 in WriteCmd() 96 || (byte < -128 || byte > 255)) { in WriteCmd() 97 warnx("invalid byte \"%s\"", av[i]); in WriteCmd() [all …]
|
| /freebsd-src/contrib/unbound/dnstap/ |
| H A D | dnstap_fstrm.c | 2 * dnstap/dnstap_fstrm.c - Frame Streams protocol for dnstap 49 void* fstrm_create_control_frame_start(char* contenttype, size_t* len) in fstrm_create_control_frame_start() argument 54 * 4byte 0: control indicator. in fstrm_create_control_frame_start() 55 * 4byte bigendian: length of control frame in fstrm_create_control_frame_start() 56 * 4byte bigendian: type START in fstrm_create_control_frame_start() 57 * 4byte bigendian: option: content-type in fstrm_create_control_frame_start() 58 * 4byte bigendian: length of string in fstrm_create_control_frame_start() 71 *len = n; in fstrm_create_control_frame_start() 75 void* fstrm_create_control_frame_stop(size_t* len) in fstrm_create_control_frame_stop() argument 80 * 4byte 0: control indicator. in fstrm_create_control_frame_stop() [all …]
|
| /freebsd-src/share/man/man9/ |
| H A D | OF_getprop.9 | 51 "void *buf" "size_t len" 54 "pcell_t *buf" "size_t len" 59 "void *buf" "size_t len" 62 "pcell_t *buf" "size_t len" 79 "char *buf" "size_t len" 82 "const void *buf" "size_t len" 86 A name is a human-readable string from 1 to 31 characters long. 90 Properties can encode byte arrays, text strings, unsigned 32-bit 93 Property with a zero-length value usually represents boolean 97 A byte array is encoded as a sequence of bytes and represents [all …]
|
| /freebsd-src/contrib/tcpdump/ |
| H A D | print-zep.c | 26 #include "netdissect-stdinc.h" 33 /* From wireshark packet-zep.c: 46 * |2 bytes |1 byte | 1 byte | 2 bytes | 1 byte |1 byte |7 bytes |1 byte| 49 * |Prmbl|Ver |Type |ChnlID|DevID|C/L Mode|LQI|NTP TS|Seq#|Res |Len| 54 * |2 bytes |1 byte |1 byte| 99 zep_print(netdissect_options * ndo,const u_char * bp,u_int len) zep_print() argument [all...] |
| /freebsd-src/sys/riscv/riscv/ |
| H A D | copyinout.S | 1 /*- 2 * Copyright (c) 2015-2018 Ruslan Bukin <br@bsdpad.com> 8 * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. 54 * copycommon - common copy routine 56 * a0 - Source address 57 * a1 - Destination address 58 * a2 - Size of copy 66 blt a2, t2, 4f /* Byte-copy if len < XLEN_BYTES */ 72 andi t0, a0, (XLEN_BYTES-1) /* Low bits of src */ 73 andi t1, a1, (XLEN_BYTES-1) /* Low bits of dest */ [all …]
|
| /freebsd-src/lib/libsys/ |
| H A D | copy_file_range.2 | 1 .\" SPDX-License-Identifier: BSD-2-Clause 31 .Nd kernel copy of a byte range from one regular file to another 44 .Fa "size_t len" 52 .Fa len 67 refer to the same file, the byte ranges defined by 69 .Fa len 95 the byte offset pointed to by 109 the byte range being copied. 122 .Fa len 125 so there is no penalty for using very large len values, even SSIZE_MAX. [all …]
|
| /freebsd-src/contrib/cortex-strings/src/aarch64/ |
| H A D | strlen.S | 1 /* Copyright (c) 2013-2015, Linaro Limited 29 * ARMv8-a, AArch64, unaligned accesses, min page size 4k. 33 -DTEST_PAGE_CROSS - this will force all calls through the slower 38 #define len x0 macro 62 /* NUL detection works on the principle that (X - 1) & (~X) & 0x80 63 (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and 65 (X - 1) & 0x80 is zero for non-NUL ASCII characters, but gives 81 byte we calculate the length from the 2 8-byte words using 87 using the fast NUL check. If we encounter non-ASCII characters, 97 checking for larger page sizes - the cost of setting up the correct [all …]
|
| /freebsd-src/sys/netinet/ |
| H A D | sctp_crc32.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 4 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 5 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 6 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 59 * For BIG-ENDIAN platforms, the result is in LITTLE-ENDIAN byte in sctp_finalize_crc32c() 60 * order. For LITTLE-ENDIAN platforms, the result is in in in sctp_finalize_crc32c() 61 * BIG-ENDIAN byte order. So for BIG-ENDIAN platforms the bytes must in sctp_finalize_crc32c() 62 * be swapped to return the result always in network byte order (aka in sctp_finalize_crc32c() 63 * BIG-ENDIAN). in sctp_finalize_crc32c() [all …]
|