/freebsd/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/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/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/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/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 - 1) & ~(X | 0x7f)) is non-zero if a 44 byte is zero, and can be done in parallel across the entire word. */ 50 -DTEST_PAGE_CROSS - this will force all calls through the slower 65 If there is a NUL byte we calculate the length from the 2 8-byte words 78 and tmp1, srcin, MIN_PAGE_SIZE - 1 [all …]
|
/freebsd/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 zfs_lz4_compress_buf() 97 * Returns 0 on success (decompression function returned non-negative) in zfs_lz4_decompress_buf() 98 * and non-zero on failure (decompression function returned negative). in zfs_lz4_decompress_buf() 124 * decoding and return a negative result, indicating the byte [all …]
|
/freebsd/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. 125 first byte. 142 On a device which uses numbered reports, the first byte of data to be sent is 144 The report data begins from the second byte. [all …]
|
/freebsd/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/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/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/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-SAKE: Parse: AT_RAND_P"); in eap_sake_parse_add_attr() [all …]
|
/freebsd/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/contrib/libpcap/ |
H A D | pcap-util.c | 21 * pcap-util.c - common code for various files 26 #include <pcap-types.h> 33 #include "pcap-int.h" 35 #include "pcap-usb-linux-common.h" 37 #include "pcap-util.h" 41 * Most versions of the DLT_PFLOG pseudo-header have UID and PID fields 42 * that are saved in host byte order. 45 * the byte order of the host that wrote the file to this host's byte 51 u_int caplen = hdr->caplen; in swap_pflog_header() 52 u_int length = hdr->len; in swap_pflog_header() [all …]
|
/freebsd/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/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/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/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/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/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/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/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| 4 bytes | 55 *------------------------------------------------------------ 79 * print the time in human-readable format. in zep_print_ts() 82 time_t seconds = i - JAN_1970; in zep_print_ts() 86 nd_format_time(time_buf, sizeof (time_buf), "%Y-%m-%d %H:%M:%S", in zep_print_ts() 97 const u_char *bp, u_int len) in zep_print() argument [all …]
|
/freebsd/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/crypto/libecc/src/sig/ |
H A D | ec_key.c | 2 * Copyright (C) 2017 - This file is part of libecc project 7 * Jean-Pierre FLORI <jean-pierre.flori@ssi.gouv.fr> 22 * -1 on error 28 MUST_HAVE(((A != NULL) && (A->magic == PRIV_KEY_MAGIC) && (A->params != NULL)), ret, err); in priv_key_check_initialized() 36 * match the one passed using 'alg_type'. Returns 0 on success, -1 on error. 43 MUST_HAVE(((A != NULL) && (A->magic == PRIV_KEY_MAGIC) && in priv_key_check_initialized_and_type() 44 (A->params != NULL) && (A->key_type == alg_type)), ret, err); in priv_key_check_initialized_and_type() 54 * performed. The function returns 0 on success, -1 on error. 65 ret = nn_init_from_buf(&(priv_key->x), priv_key_buf, priv_key_buf_len); EG(ret, err); in ec_priv_key_import_from_buf() 68 priv_key->key_type = ec_key_alg; in ec_priv_key_import_from_buf() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_set/ |
H A D | user_property_002_neg.ksh | 1 #!/bin/ksh -p 10 # or https://opensource.org/licenses/CDDL-1.0. 37 # ZFS can handle any invalid user-defined pool property. 42 # 3. Verify all the invalid user-defined pool properties can not be set 51 typeset -a names=() 52 typeset -a values=() 55 # the 256-byte limit (2) minus 1 byte for the null byte (3) plus 1 byte to 59 # Print a 2-byte prefix of the name. 62 while (c++ < (256 - 2 - 1 + 1)) 66 values+=("too-long-property-name") [all …]
|
/freebsd/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 …]
|