Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 756) sorted by relevance

12345678910>>...31

/freebsd/lib/libc/nameser/
H A Dns_print.c55 char **buf, size_t *buflen);
58 char **buf, size_t *buflen);
59 static void addlen(size_t len, char **buf, size_t *buflen);
61 char **buf, size_t *buflen);
63 char **buf, size_t *buflen);
87 char *buf, size_t buflen) in ns_sprintrr() argument
94 name_ctx, origin, buf, buflen); in ns_sprintrr()
109 char *buf, size_t buflen) in ns_sprintrrf() argument
123 T(addstr("\t\t\t", 3, &buf, &buflen)); in ns_sprintrrf()
129 T(addstr("@\t\t\t", 4, &buf, &buflen)); in ns_sprintrrf()
[all …]
/freebsd/contrib/wpa/src/ap/
H A Dctrl_iface_ap.c30 static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen, in hostapd_write_ht_mcs_bitmask() argument
36 ret = os_snprintf(buf + len, buflen - len, in hostapd_write_ht_mcs_bitmask()
38 if (os_snprintf_error(buflen - len, ret)) in hostapd_write_ht_mcs_bitmask()
43 len += wpa_snprintf_hex(buf + len, buflen - len, mcs_set, 10); in hostapd_write_ht_mcs_bitmask()
45 ret = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_write_ht_mcs_bitmask()
46 if (os_snprintf_error(buflen - len, ret)) in hostapd_write_ht_mcs_bitmask()
56 char *buf, size_t buflen) in hostapd_get_sta_conn_time() argument
73 ret = os_snprintf(buf, buflen, "connected_time=%lu\n", secs); in hostapd_get_sta_conn_time()
74 if (os_snprintf_error(buflen, ret)) in hostapd_get_sta_conn_time()
82 char *buf, size_t buflen) in hostapd_get_sta_info() argument
[all …]
/freebsd/crypto/openssl/crypto/
H A Do_str.c138 static int hexstr2buf_sep(unsigned char *buf, size_t buf_n, size_t *buflen, in hexstr2buf_sep() argument
173 if (buflen != NULL) in hexstr2buf_sep()
174 *buflen = cnt; in hexstr2buf_sep()
181 int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen, in OPENSSL_hexstr2buf_ex() argument
184 return hexstr2buf_sep(buf, buf_n, buflen, str, sep); in OPENSSL_hexstr2buf_ex()
187 unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen, in ossl_hexstr2buf_sep() argument
204 if (buflen != NULL) in ossl_hexstr2buf_sep()
205 *buflen = 0; in ossl_hexstr2buf_sep()
208 if (buflen != NULL) in ossl_hexstr2buf_sep()
209 *buflen = (long)tmp_buflen; in ossl_hexstr2buf_sep()
[all …]
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c56 size_t ossl_cipher_fillblock(unsigned char *buf, size_t *buflen, in ossl_cipher_fillblock() argument
61 size_t bufremain = blocksize - *buflen; in ossl_cipher_fillblock()
63 assert(*buflen <= blocksize); in ossl_cipher_fillblock()
68 memcpy(buf + *buflen, *in, bufremain); in ossl_cipher_fillblock()
71 *buflen += bufremain; in ossl_cipher_fillblock()
80 int ossl_cipher_trailingdata(unsigned char *buf, size_t *buflen, size_t blocksize, in ossl_cipher_trailingdata() argument
86 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata()
91 memcpy(buf + *buflen, *in, *inlen); in ossl_cipher_trailingdata()
92 *buflen += *inlen; in ossl_cipher_trailingdata()
99 void ossl_cipher_padblock(unsigned char *buf, size_t *buflen, size_t blocksize) in ossl_cipher_padblock() argument
[all …]
/freebsd/contrib/wpa/src/fst/
H A Dfst_ctrl_iface.c171 static int session_get(const char *session_id, char *buf, size_t buflen) in session_get() argument
183 return os_snprintf(buf, buflen, "FAIL\n"); in session_get()
191 return os_snprintf(buf, buflen, in session_get()
210 static int session_set(const char *session_id, char *buf, size_t buflen) in session_set() argument
222 return os_snprintf(buf, buflen, "FAIL\n"); in session_set()
226 return os_snprintf(buf, buflen, "FAIL\n"); in session_set()
241 return os_snprintf(buf, buflen, "FAIL\n"); in session_set()
244 return os_snprintf(buf, buflen, "%s\n", ret ? "FAIL" : "OK"); in session_set()
249 static int session_add(const char *group_id, char *buf, size_t buflen) in session_add() argument
258 return os_snprintf(buf, buflen, "FAIL\n"); in session_add()
[all …]
/freebsd/sys/contrib/openzfs/lib/libzutil/
H A Dzutil_nicenum.c61 zfs_nicenum_format(uint64_t num, char *buf, size_t buflen, in zfs_nicenum_format() argument
84 snprintf(buf, buflen, "%llu", (u_longlong_t)num); in zfs_nicenum_format()
87 snprintf(buf, buflen, "%llu", (u_longlong_t)num); in zfs_nicenum_format()
90 snprintf(buf, buflen, "%s", "-"); in zfs_nicenum_format()
103 (void) snprintf(buf, buflen, "-"); in zfs_nicenum_format()
110 (void) snprintf(buf, buflen, "%llu%s", (u_longlong_t)n, u); in zfs_nicenum_format()
136 if (snprintf(buf, buflen, "%d%s", in zfs_nicenum_format()
141 if (snprintf(buf, buflen, "%.*f%s", i, in zfs_nicenum_format()
153 zfs_nicenum(uint64_t num, char *buf, size_t buflen) in zfs_nicenum() argument
155 zfs_nicenum_format(num, buf, buflen, ZFS_NICENUM_1024); in zfs_nicenum()
[all …]
/freebsd/lib/libugidfw/
H A Dugidfw.c62 bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, size_t buflen) in bsde_rule_to_string() argument
72 left = buflen; in bsde_rule_to_string()
511 size_t buflen, char *errstr){ in bsde_parse_uidrange() argument
526 snprintf(errstr, buflen, "invalid uid: '%s'", spec1); in bsde_parse_uidrange()
543 snprintf(errstr, buflen, "invalid uid: '%s'", spec2); in bsde_parse_uidrange()
557 size_t buflen, char *errstr){ in bsde_parse_gidrange() argument
572 snprintf(errstr, buflen, "invalid gid: '%s'", spec1); in bsde_parse_gidrange()
589 snprintf(errstr, buflen, "invalid gid: '%s'", spec2); in bsde_parse_gidrange()
602 bsde_get_jailid(const char *name, size_t buflen, char *errstr) in bsde_get_jailid() argument
617 if (errstr && buflen) { in bsde_get_jailid()
[all …]
H A Dugidfw.h39 size_t buflen);
40 int bsde_parse_mode(int argc, char *argv[], mode_t *mode, size_t buflen,
43 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);
45 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr);
47 int bsde_get_rule_count(size_t buflen, char *errstr);
48 int bsde_get_rule_slots(size_t buflen, char *errstr);
51 int bsde_delete_rule(int rulenum, size_t buflen, char *errstr);
53 size_t buflen, char *errstr);
55 size_t buflen, char *errstr);
/freebsd/contrib/wpa/wpa_supplicant/
H A Dmain_winsvc.c67 DWORD buflen, val; in read_interface() local
81 buflen = sizeof(ctrl_interface); in read_interface()
83 (LPBYTE) ctrl_interface, &buflen); in read_interface()
88 (int) buflen, (char *) ctrl_interface); in read_interface()
92 buflen = sizeof(adapter); in read_interface()
94 (LPBYTE) adapter, &buflen); in read_interface()
99 (int) buflen, (char *) adapter); in read_interface()
103 buflen = sizeof(config); in read_interface()
105 (LPBYTE) config, &buflen); in read_interface()
110 (int) buflen, (char *) config); in read_interface()
[all …]
/freebsd/sbin/dmesg/
H A Ddmesg.c69 size_t buflen, bufpos; in main() local
107 if (sysctlbyname("kern.msgbuf", NULL, &buflen, NULL, 0) == -1) in main()
110 buflen += buflen/8; in main()
112 if ((bp = malloc(buflen + 2)) == NULL) in main()
114 if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1) in main()
116 if (buflen > 0 && bp[buflen - 1] == '\0') in main()
117 buflen--; in main()
148 buflen = cur.msg_size; in main()
155 if (buflen == 0 || bp[buflen - 1] != '\n') in main()
156 bp[buflen++] = '\n'; in main()
[all …]
/freebsd/sys/contrib/openzfs/cmd/zed/
H A Dzed_event.c278 int buflen; in _zed_event_add_var() local
319 buflen = sizeof (valbuf); in _zed_event_add_var()
320 n = strlcpy(dstp, keybuf, buflen); in _zed_event_add_var()
328 buflen -= n; in _zed_event_add_var()
331 buflen--; in _zed_event_add_var()
333 if (buflen <= 0) { in _zed_event_add_var()
341 n = vsnprintf(dstp, buflen, fmt, vargs); in _zed_event_add_var()
344 if ((n < 0) || (n >= buflen)) { in _zed_event_add_var()
372 int buflen = sizeof (buf); in _zed_event_add_int8_array() local
384 for (i = 0, p = buf; (i < nelem) && (buflen > 0); i++) { in _zed_event_add_int8_array()
[all …]
/freebsd/lib/libc/tests/string/
H A Dstrcspn_test.c51 testcase(char *buf, size_t buflen, char *set, size_t setlen, int want_match) in testcase() argument
57 for (i = 0; i < buflen; i++) in testcase()
74 else if (want_match == MATCH && buflen > 0) { in testcase()
75 buf[buflen - 1] = 1; in testcase()
76 expected = buflen - 1; in testcase()
78 expected = buflen; in testcase()
80 if (want_match == MATCH && buflen > 0 && setlen > 0) { in testcase()
81 buf[buflen - 1] = UCHAR_MAX; in testcase()
82 expected = buflen - 1; in testcase()
84 expected = buflen; in testcase()
[all …]
/freebsd/sys/netgraph/
H A Dng_parse.c105 u_char *const buf, int *buflen, enum comptype ctype);
111 int *buflen, enum comptype ctype);
147 const char *string, int *off, u_char *buf, int *buflen) in ng_parse() argument
149 return INVOKE(type, parse)(type, string, off, buf, buf, buflen); in ng_parse()
168 ng_parse_getDefault(const struct ng_parse_type *type, u_char *buf, int *buflen) in ng_parse_getDefault() argument
174 return (*func)(type, buf, buf, buflen); in ng_parse_getDefault()
184 u_char *const buf, int *buflen) in ng_struct_parse() argument
186 return ng_parse_composite(type, s, off, start, buf, buflen, CT_STRUCT); in ng_struct_parse()
198 const u_char *const start, u_char *buf, int *buflen) in ng_struct_getDefault() argument
203 "{}", &off, start, buf, buflen, CT_STRUCT); in ng_struct_getDefault()
[all …]
/freebsd/usr.bin/random/
H A Drandomize_fd.c101 size_t bufc, buflen; in randomize_fd() local
111 buflen = sizeof(u_char) * MAXBSIZE; in randomize_fd()
112 buf = (u_char *)malloc(buflen); in randomize_fd()
119 len = read(fd, buf, buflen); in randomize_fd()
125 } else if ((size_t)len < buflen) in randomize_fd()
126 buflen = (size_t)len; in randomize_fd()
132 for (i = bufc; i <= buflen && bufleft >= 0; i++, bufleft--) { in randomize_fd()
133 if (i == buflen) { in randomize_fd()
139 len = read(fd, &buf[i], buflen - i); in randomize_fd()
145 } else if (len < (ssize_t)(buflen - i)) in randomize_fd()
[all …]
/freebsd/contrib/wpa/src/utils/
H A Dwpa_debug.c132 ssize_t buflen; in wpa_debug_open_linux_tracing() local
141 buflen = read(mounts, buf, sizeof(buf) - 1); in wpa_debug_open_linux_tracing()
143 if (buflen < 0) { in wpa_debug_open_linux_tracing()
147 buf[buflen] = '\0'; in wpa_debug_open_linux_tracing()
651 int buflen; in wpa_msg() local
656 buflen = vsnprintf(NULL, 0, fmt, ap) + 1; in wpa_msg()
659 buf = os_malloc(buflen); in wpa_msg()
676 len = vsnprintf(buf, buflen, fmt, ap); in wpa_msg()
681 bin_clear_free(buf, buflen); in wpa_msg()
689 int buflen; in wpa_msg_ctrl() local
[all …]
/freebsd/sys/compat/linux/
H A Dlinux_getcwd.c59 size_t buflen; in linux_getcwd() local
62 buflen = uap->bufsize; in linux_getcwd()
63 if (__predict_false(buflen < 2)) in linux_getcwd()
65 if (buflen > LINUX_PATH_MAX) in linux_getcwd()
66 buflen = LINUX_PATH_MAX; in linux_getcwd()
68 buf = malloc(buflen, M_TEMP, M_WAITOK); in linux_getcwd()
69 error = vn_getcwd(buf, &retbuf, &buflen); in linux_getcwd()
73 error = copyout(retbuf, uap->buf, buflen); in linux_getcwd()
75 td->td_retval[0] = buflen; in linux_getcwd()
/freebsd/kerberos5/lib/libgssapi_krb5/
H A Dpname_to_uid.c44 size_t buflen; in _gsskrb5_pname_to_uid() local
58 buflen = buflen_hint; in _gsskrb5_pname_to_uid()
62 if (buflen > sizeof(buf)) in _gsskrb5_pname_to_uid()
63 bufp = malloc(buflen); in _gsskrb5_pname_to_uid()
66 error = getpwnam_r(lname, &pwd, bufp, buflen, &pw); in _gsskrb5_pname_to_uid()
69 if (buflen > sizeof(buf)) in _gsskrb5_pname_to_uid()
71 buflen += 1024; in _gsskrb5_pname_to_uid()
72 if (buflen > buflen_hint) in _gsskrb5_pname_to_uid()
73 buflen_hint = buflen; in _gsskrb5_pname_to_uid()
81 if (bufp != NULL && buflen > sizeof(buf)) in _gsskrb5_pname_to_uid()
/freebsd/cddl/contrib/opensolaris/lib/libcmdutils/common/
H A Dnicenum.c40 nicenum_scale(uint64_t n, size_t units, char *buf, size_t buflen, in nicenum_scale() argument
87 rc = snprintf(buf, buflen, "%llu", n); in nicenum_scale()
93 rc = snprintf(buf, buflen, "%llu%c", n / divisor, u); in nicenum_scale()
107 if ((rc = snprintf(buf, buflen, "%.*f%c", i, in nicenum_scale()
113 if (rc + 1 > buflen || rc < 0) in nicenum_scale()
120 if (buflen > 10) in nicenum_scale()
121 (void) strlcpy(buf, "<overflow>", buflen); in nicenum_scale()
123 (void) strlcpy(buf, "??", buflen); in nicenum_scale()
127 nicenum(uint64_t num, char *buf, size_t buflen) in nicenum() argument
129 nicenum_scale(num, 1, buf, buflen, 0); in nicenum()
/freebsd/crypto/heimdal/lib/roken/
H A Dstrerror_r.c46 rk_strerror_r(int eno, char * strerrbuf, size_t buflen) in rk_strerror_r() argument
50 err = strerror_s(strerrbuf, buflen, eno); in rk_strerror_r()
53 code = sprintf_s(strerrbuf, buflen, "Error % occurred.", eno); in rk_strerror_r()
63 rk_strerror_r(int eno, char *strerrbuf, size_t buflen) in rk_strerror_r() argument
68 str = strerror_r(eno, strerrbuf, buflen); in rk_strerror_r()
70 if (strlcpy(strerrbuf, str, buflen) >= buflen) in rk_strerror_r()
75 ret = strlcpy(strerrbuf, strerror(eno), buflen); in rk_strerror_r()
76 if (ret > buflen) in rk_strerror_r()
/freebsd/usr.sbin/ofwdump/
H A Dofw_util.c122 ofw_firstprop(int fd, phandle_t node, char *buf, int buflen) in ofw_firstprop() argument
125 return (ofw_nextprop(fd, node, NULL, buf, buflen)); in ofw_firstprop()
129 ofw_nextprop(int fd, phandle_t node, const char *prev, char *buf, int buflen) in ofw_nextprop() argument
136 d.of_buflen = buflen; in ofw_nextprop()
158 ofw_getprop(int fd, phandle_t node, const char *name, void *buf, int buflen) in ofw_getprop() argument
165 d.of_buflen = buflen; in ofw_getprop()
173 int buflen) in ofw_setprop() argument
180 d.of_buflen = buflen; in ofw_setprop()
181 d.of_buf = ofw_malloc(buflen); in ofw_setprop()
182 memcpy(d.of_buf, buf, buflen); in ofw_setprop()
[all …]
/freebsd/contrib/libpcap/
H A Dbpf_filter.c88 u_int wirelen, u_int buflen, const struct pcap_bpf_aux_data *aux_data) in pcapint_filter_with_aux_data() argument
92 u_int wirelen, u_int buflen, const struct pcap_bpf_aux_data *aux_data _U_) in pcapint_filter_with_aux_data()
121 if (k > buflen || sizeof(int32_t) > buflen - k) { in pcapint_filter_with_aux_data()
129 if (k > buflen || sizeof(int16_t) > buflen - k) { in pcapint_filter_with_aux_data()
160 if (k >= buflen) { in pcapint_filter_with_aux_data()
179 if (pc->k > buflen || X > buflen - pc->k || in pcapint_filter_with_aux_data()
180 sizeof(int32_t) > buflen - k) { in pcapint_filter_with_aux_data()
188 if (X > buflen || pc->k > buflen - X || in pcapint_filter_with_aux_data()
189 sizeof(int16_t) > buflen - k) { in pcapint_filter_with_aux_data()
197 if (pc->k >= buflen || X >= buflen - pc->k) { in pcapint_filter_with_aux_data()
[all …]
/freebsd/contrib/telnet/libtelnet/
H A Dkrb4encpwd.c346 krb4encpwd_printsub(data, cnt, buf, buflen) in krb4encpwd_printsub() argument
348 int cnt, buflen;
353 buf[buflen-1] = '\0'; /* make sure its NULL terminated */
354 buflen -= 1;
358 strncpy((char *)buf, " REJECT ", buflen);
362 strncpy((char *)buf, " ACCEPT ", buflen);
364 BUMP(buf, buflen);
367 ADDC(buf, buflen, '"');
369 ADDC(buf, buflen, data[i]);
370 ADDC(buf, buflen, '"');
[all …]
H A Drsaencpwd.c397 rsaencpwd_printsub(data, cnt, buf, buflen) in rsaencpwd_printsub() argument
399 int cnt, buflen;
404 buf[buflen-1] = '\0'; /* make sure its NULL terminated */
405 buflen -= 1;
409 strncpy((char *)buf, " REJECT ", buflen);
413 strncpy((char *)buf, " ACCEPT ", buflen);
415 BUMP(buf, buflen);
418 ADDC(buf, buflen, '"');
420 ADDC(buf, buflen, data[i]);
421 ADDC(buf, buflen, '"');
[all …]
/freebsd/sys/kern/
H A Dsys_getrandom.c48 kern_getrandom(struct thread *td, void *user_buf, size_t buflen, in kern_getrandom() argument
57 if (buflen > IOSIZE_MAX) in kern_getrandom()
94 if (buflen == 0) { in kern_getrandom()
100 aiov.iov_len = buflen; in kern_getrandom()
104 auio.uio_resid = buflen; in kern_getrandom()
111 td->td_retval[0] = buflen - auio.uio_resid; in kern_getrandom()
118 size_t buflen; member
126 return (kern_getrandom(td, uap->buf, uap->buflen, uap->flags)); in sys_getrandom()
/freebsd/sys/dev/bhnd/nvram/
H A Dbhnd_nvram_data_btxt.c144 size_t buflen, bufpos; in bhnd_nvram_btxt_getvar_direct() local
154 buflen = 0; in bhnd_nvram_btxt_getvar_direct()
161 BHND_NV_ASSERT(bufpos <= buflen, in bhnd_nvram_btxt_getvar_direct()
162 ("buf position invalid (%zu > %zu)", bufpos, buflen)); in bhnd_nvram_btxt_getvar_direct()
163 BHND_NV_ASSERT(buflen <= sizeof(buf), in bhnd_nvram_btxt_getvar_direct()
164 ("buf length invalid (%zu > %zu", buflen, sizeof(buf))); in bhnd_nvram_btxt_getvar_direct()
167 if (buflen - bufpos == 0) { in bhnd_nvram_btxt_getvar_direct()
170 buflen = bhnd_nv_ummin(sizeof(buf), limit - offset); in bhnd_nvram_btxt_getvar_direct()
173 error = bhnd_nvram_io_read(io, offset, buf, buflen); in bhnd_nvram_btxt_getvar_direct()
177 offset += buflen; in bhnd_nvram_btxt_getvar_direct()
[all …]

12345678910>>...31