/dragonfly/crypto/openssh/ |
H A D | sshbuf.c | 36 (!buf->readonly && buf->d != buf->cd) || in sshbuf_check_sanity() 42 buf->off > buf->size)) { in sshbuf_check_sanity() 57 if (buf->off == 0 || buf->readonly || buf->refcount > 1) in sshbuf_maybe_pack() 61 memmove(buf->d, buf->d + buf->off, buf->size - buf->off); in sshbuf_maybe_pack() 62 buf->size -= buf->off; in sshbuf_maybe_pack() 179 buf->off = buf->size; in sshbuf_reset() 188 buf->cd = buf->d = d; in sshbuf_reset() 247 buf->cd = buf->d = dp; in sshbuf_set_max_size() 270 return buf->max_size - (buf->size - buf->off); in sshbuf_avail() 300 if (len > buf->max_size || buf->max_size - len < buf->size - buf->off) in sshbuf_check_reserve() [all …]
|
H A D | sshbuf.h | 71 struct sshbuf *sshbuf_fromb(struct sshbuf *buf); 85 void sshbuf_free(struct sshbuf *buf); 90 void sshbuf_reset(struct sshbuf *buf); 95 size_t sshbuf_max_size(const struct sshbuf *buf); 106 size_t sshbuf_len(const struct sshbuf *buf); 111 size_t sshbuf_avail(const struct sshbuf *buf); 220 #define sshbuf_skip_string(buf) sshbuf_get_string_direct(buf, NULL, NULL) argument 251 char *sshbuf_dtob16(struct sshbuf *buf); 294 char *sshbuf_dup_string(struct sshbuf *buf); 368 size_t sshbuf_alloc(const struct sshbuf *buf); [all …]
|
H A D | sshbuf-getput-basic.c | 37 const u_char *p = sshbuf_ptr(buf); in sshbuf_get() 50 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u64() 63 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u32() 76 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u16() 89 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u8() 122 *p = sshbuf_ptr(buf) + offset; in check_roffset() 244 const u_char *p = sshbuf_ptr(buf); in sshbuf_peek_string_direct() 250 if (sshbuf_len(buf) < 4) { in sshbuf_peek_string_direct() 259 if (sshbuf_len(buf) - 4 < len) { in sshbuf_peek_string_direct() 353 r = sshbuf_putfv(buf, fmt, ap); in sshbuf_putf() [all …]
|
/dragonfly/crypto/libressl/ssl/ |
H A D | tls_buffer.c | 110 if (buf->len > buf->capacity) in tls_buffer_resize() 111 buf->len = buf->capacity; in tls_buffer_resize() 112 if (buf->offset > buf->len) in tls_buffer_resize() 113 buf->offset = buf->len; in tls_buffer_resize() 161 if (buf->offset > buf->len) in tls_buffer_read() 164 if (buf->offset == buf->len) in tls_buffer_read() 168 n = buf->len - buf->offset; in tls_buffer_read() 180 if (buf->offset > buf->len) in tls_buffer_write() 194 memmove(buf->data, &buf->data[buf->offset], in tls_buffer_write() 195 buf->len - buf->offset); in tls_buffer_write() [all …]
|
/dragonfly/contrib/wpa_supplicant/src/p2p/ |
H A D | p2p_build.c | 66 wpabuf_put_le16(buf, 2); in p2p_buf_add_capability() 78 wpabuf_put_le16(buf, 1); in p2p_buf_add_go_intent() 90 wpabuf_put_le16(buf, 5); in p2p_buf_add_listen_channel() 104 wpabuf_put_le16(buf, 5); in p2p_buf_add_operating_channel() 180 wpabuf_put_le16(buf, 1); in p2p_buf_add_status() 260 wpabuf_put_le16(buf, 2); in p2p_buf_add_config_timeout() 308 wpabuf_put_le16(buf, 1); in p2p_buf_add_invitation_flags() 345 wpabuf_put_le16(buf, 4); in p2p_buf_add_ext_listen_timing() 365 wpabuf_put_u8(buf, 1); in p2p_buf_add_p2p_interface() 433 if (!buf || !mac) in p2p_buf_add_advertisement_id() [all …]
|
/dragonfly/contrib/binutils-2.27/libiberty/ |
H A D | simple-object-common.h | 185 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16() 193 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16() 204 | (unsigned int) buf[3]); in simple_object_fetch_big_32() 248 | (ulong_type) buf[7]); in simple_object_fetch_big_64() 263 | (ulong_type) buf[0]); in simple_object_fetch_little_64() 274 buf[1] = val & 0xff; in simple_object_set_big_16() 283 buf[0] = val & 0xff; in simple_object_set_little_16() 294 buf[3] = val & 0xff; in simple_object_set_big_32() 305 buf[0] = val & 0xff; in simple_object_set_little_32() 338 buf[7] = val & 0xff; in simple_object_set_big_64() [all …]
|
/dragonfly/contrib/gdb-7/libiberty/ |
H A D | simple-object-common.h | 185 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16() 193 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16() 204 | (unsigned int) buf[3]); in simple_object_fetch_big_32() 248 | (ulong_type) buf[7]); in simple_object_fetch_big_64() 263 | (ulong_type) buf[0]); in simple_object_fetch_little_64() 274 buf[1] = val & 0xff; in simple_object_set_big_16() 283 buf[0] = val & 0xff; in simple_object_set_little_16() 294 buf[3] = val & 0xff; in simple_object_set_big_32() 305 buf[0] = val & 0xff; in simple_object_set_little_32() 338 buf[7] = val & 0xff; in simple_object_set_big_64() [all …]
|
/dragonfly/contrib/binutils-2.34/libiberty/ |
H A D | simple-object-common.h | 191 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16() 199 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16() 210 | (unsigned int) buf[3]); in simple_object_fetch_big_32() 254 | (ulong_type) buf[7]); in simple_object_fetch_big_64() 269 | (ulong_type) buf[0]); in simple_object_fetch_little_64() 280 buf[1] = val & 0xff; in simple_object_set_big_16() 289 buf[0] = val & 0xff; in simple_object_set_little_16() 300 buf[3] = val & 0xff; in simple_object_set_big_32() 311 buf[0] = val & 0xff; in simple_object_set_little_32() 344 buf[7] = val & 0xff; in simple_object_set_big_64() [all …]
|
/dragonfly/contrib/gcc-4.7/libiberty/ |
H A D | simple-object-common.h | 184 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16() 192 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16() 203 | (unsigned int) buf[3]); in simple_object_fetch_big_32() 247 | (ulong_type) buf[7]); in simple_object_fetch_big_64() 262 | (ulong_type) buf[0]); in simple_object_fetch_little_64() 273 buf[1] = val & 0xff; in simple_object_set_big_16() 282 buf[0] = val & 0xff; in simple_object_set_little_16() 293 buf[3] = val & 0xff; in simple_object_set_big_32() 304 buf[0] = val & 0xff; in simple_object_set_little_32() 337 buf[7] = val & 0xff; in simple_object_set_big_64() [all …]
|
/dragonfly/contrib/gcc-8.0/libiberty/ |
H A D | simple-object-common.h | 191 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16() 199 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16() 210 | (unsigned int) buf[3]); in simple_object_fetch_big_32() 254 | (ulong_type) buf[7]); in simple_object_fetch_big_64() 269 | (ulong_type) buf[0]); in simple_object_fetch_little_64() 280 buf[1] = val & 0xff; in simple_object_set_big_16() 289 buf[0] = val & 0xff; in simple_object_set_little_16() 300 buf[3] = val & 0xff; in simple_object_set_big_32() 311 buf[0] = val & 0xff; in simple_object_set_little_32() 344 buf[7] = val & 0xff; in simple_object_set_big_64() [all …]
|
/dragonfly/contrib/wpa_supplicant/src/utils/ |
H A D | wpabuf.c | 40 buf, (unsigned long) buf->size, (unsigned long) buf->used, in wpabuf_overflow() 69 if (buf->used + add_len > buf->size) { in wpabuf_resize() 72 nbuf = os_realloc(buf->buf, buf->used + add_len); in wpabuf_resize() 76 buf->buf = nbuf; in wpabuf_resize() 98 buf->buf = (u8 *) (buf + 1); in wpabuf_resize() 101 buf->size = buf->used + add_len; in wpabuf_resize() 130 buf->buf = (u8 *) (buf + 1); in wpabuf_alloc() 153 buf->buf = data; in wpabuf_alloc_ext_data() 196 os_free(buf->buf); in wpabuf_free() 202 os_free(buf->buf); in wpabuf_free() [all …]
|
H A D | wpabuf.h | 34 void wpabuf_free(struct wpabuf *buf); 50 return buf->size; in wpabuf_size() 60 return buf->used; in wpabuf_len() 70 return buf->size - buf->used; in wpabuf_tailroom() 80 return buf->buf; in wpabuf_head() 95 return buf->buf; in wpabuf_mhead() 100 return (u8 *) wpabuf_mhead(buf); in wpabuf_mhead_u8() 105 u8 *pos = (u8 *) wpabuf_put(buf, 1); in wpabuf_put_u8() 154 buf->buf = (u8 *) data; in wpabuf_set() 155 buf->flags = WPABUF_FLAG_EXT_DATA; in wpabuf_set() [all …]
|
/dragonfly/lib/libc/stdtime/ |
H A D | strptime.c | 105 buf++; in _strptime() 156 buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); in _strptime() 175 buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); in _strptime() 182 buf = _strptime(buf, "%H:%M", tm, GMTp, locale); in _strptime() 194 buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); in _strptime() 242 isdigit_l((unsigned char)*buf, locale); buf++){ in _strptime() 375 buf++; in _strptime() 542 strncpy(zonestr, buf, cp - buf); in _strptime() 555 buf += cp - buf; in _strptime() 574 buf++; in _strptime() [all …]
|
/dragonfly/contrib/bmake/ |
H A D | buf.c | 84 buf->cap += buf->cap > 16 ? buf->cap : 16; in Buf_Expand() 85 buf->data = bmake_realloc(buf->data, buf->cap); in Buf_Expand() 97 buf->cap += buf->cap > minIncr ? buf->cap : minIncr; in Buf_AddBytes() 98 buf->data = bmake_realloc(buf->data, buf->cap); in Buf_AddBytes() 146 buf->len = 0; in Buf_InitSize() 167 buf->cap = 0; in Buf_Done() 168 buf->len = 0; in Buf_Done() 183 buf->cap = 0; in Buf_DoneData() 184 buf->len = 0; in Buf_DoneData() 206 if (buf->cap - buf->len >= BUF_COMPACT_LIMIT) { in Buf_DoneDataCompact() [all …]
|
/dragonfly/contrib/flex/src/ |
H A D | buf.c | 81 buf = buf_strappend (buf, t); in buf_prints() 83 return buf; in buf_prints() 99 return buf; in buf_linedir() 114 buf = buf_strappend (buf, t); in buf_linedir() 140 return buf; in buf_strnappend() 158 return buf; in buf_strdefine() 217 if (buf) { in buf_destroy() 235 return buf; in buf_append() 238 if (n_elem + buf->nelts > buf->nmax) { in buf_append() 262 memcpy ((char *) buf->elts + (size_t) buf->nelts * buf->elt_size, ptr, in buf_append() [all …]
|
/dragonfly/usr.sbin/sdpd/ |
H A D | profile.c | 106 if (buf + 5 > eob) in common_profile_create_service_record_handle() 132 SDP_PUT8(len, buf); in common_profile_create_service_class_id_list() 168 SDP_PUT8(6, buf); in common_profile_create_bluetooth_profile_descriptor_list() 196 SDP_PUT8(9, buf); in common_profile_create_language_base_attribute_id_list() 281 SDP_PUT8(12, buf); in rfcomm_profile_create_protocol_descriptor_list() 284 SDP_PUT8(3, buf); in rfcomm_profile_create_protocol_descriptor_list() 289 SDP_PUT8(5, buf); in rfcomm_profile_create_protocol_descriptor_list() 318 SDP_PUT8(17, buf); in obex_profile_create_protocol_descriptor_list() 321 SDP_PUT8(3, buf); in obex_profile_create_protocol_descriptor_list() 326 SDP_PUT8(5, buf); in obex_profile_create_protocol_descriptor_list() [all …]
|
/dragonfly/contrib/wpa_supplicant/src/common/ |
H A D | gas.c | 20 struct wpabuf *buf; in gas_build_req() local 23 if (buf == NULL) in gas_build_req() 30 return buf; in gas_build_req() 54 if (buf == NULL) in gas_build_resp() 65 return buf; in gas_build_resp() 124 return buf; in gas_anqp_build_initial_req() 142 return buf; in gas_anqp_build_initial_resp() 164 return buf; in gas_anqp_build_initial_resp_buf() 183 return buf; in gas_anqp_build_comeback_resp() 206 return buf; in gas_anqp_build_comeback_resp_buf() [all …]
|
/dragonfly/contrib/wpa_supplicant/src/ap/ |
H A D | gas_serv.c | 29 wpabuf_put_u8(buf, 0x7f); in gas_serv_write_dpp_adv_proto() 31 wpabuf_put_u8(buf, 5); in gas_serv_write_dpp_adv_proto() 34 wpabuf_put_u8(buf, 0x01); in gas_serv_write_dpp_adv_proto() 996 if (buf == NULL) in gas_serv_build_gas_resp_payload() 1072 return buf; in gas_serv_build_gas_resp_payload() 1461 buf); in gas_serv_req_local_processing() 1462 if (!buf) in gas_serv_req_local_processing() 1468 wpabuf_free(buf); in gas_serv_req_local_processing() 1506 wpabuf_free(buf); in gas_serv_req_local_processing() 1651 if (buf == NULL) in gas_serv_rx_gas_initial_req() [all …]
|
/dragonfly/contrib/tcpdump/ |
H A D | smbutil.c | 207 p = buf + l; in name_ptr() 479 buf++; in smb_fdata1() 505 buf++; in smb_fdata1() 636 buf += 1; in smb_fdata1() 645 buf += 2; in smb_fdata1() 654 buf += 4; in smb_fdata1() 674 if (GET_U_1(buf) != 4 && GET_U_1(buf) != 2) { in smb_fdata1() 729 buf++; in smb_fdata1() 782 buf += 4; in smb_fdata1() 790 buf += 4; in smb_fdata1() [all …]
|
H A D | print-icmp.c | 337 (void)snprintf(buf, sizeof(buf), in icmp_print() 343 (void)snprintf(buf, sizeof(buf), in icmp_print() 349 (void)snprintf(buf, sizeof(buf), in icmp_print() 526 cp = buf + strlen(buf); in icmp_print() 531 cp = buf + strlen(buf); in icmp_print() 546 cp = buf + strlen(buf); in icmp_print() 550 cp = buf + strlen(buf); in icmp_print() 564 cp = buf + strlen(buf); in icmp_print() 607 (void)snprintf(buf, sizeof(buf), in icmp_print() 621 (void)snprintf(buf+strlen(buf),sizeof(buf)-strlen(buf),", recv %s", in icmp_print() [all …]
|
/dragonfly/crypto/libressl/apps/nc/ |
H A D | socks.c | 216 buf[1] = 1; in socks_connect() 239 buf[2] = 0; in socks_connect() 250 buf[2] = 0; in socks_connect() 260 buf[2] = 0; in socks_connect() 329 r = snprintf(buf, sizeof(buf), in socks_connect() 333 r = snprintf(buf, sizeof(buf), in socks_connect() 351 r = snprintf(buf, sizeof(buf), "%s:%s", in socks_connect() 355 b64_ntop(buf, strlen(buf), resp, in socks_connect() 366 explicit_bzero(buf, sizeof buf); in socks_connect() 374 proxy_read_line(proxyfd, buf, sizeof(buf)); in socks_connect() [all …]
|
/dragonfly/contrib/xz/src/common/ |
H A D | tuklib_integer.h | 295 uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1]; in read16be() 308 uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8); in read16le() 351 # define write16be(buf, num) write16ne(buf, conv16be(num)) argument 352 # define write32be(buf, num) write32ne(buf, conv32be(num)) argument 356 # define write16le(buf, num) write16ne(buf, conv16le(num)) argument 357 # define write32le(buf, num) write32ne(buf, conv32le(num)) argument 366 buf[1] = (uint8_t)num; in write16be() 376 buf[0] = (uint8_t)num; in write16le() 390 buf[3] = (uint8_t)num; in write32be() 400 buf[0] = (uint8_t)num; in write32le() [all …]
|
/dragonfly/sys/sys/ |
H A D | buf.h | 67 struct buf; 152 struct buf { struct 403 extern struct buf *buf; /* The buffer headers. */ 432 struct buf **); 435 int bwrite (struct buf *); 436 void bdwrite (struct buf *); 437 void buwrite (struct buf *); 439 void bdirty (struct buf *); 440 void bheavy (struct buf *); 442 void brelse (struct buf *); [all …]
|
/dragonfly/contrib/cvs-1.12/src/ |
H A D | buffer.c | 184 (*buf->memory_error) (buf); in buf_output() 425 (*buf->memory_error) (buf); in buf_send_counted() 460 (*buf->memory_error) (buf); in buf_send_special_count() 706 buf = buf->next; in buf_chain_length() 751 (*buf->memory_error) (buf); in buf_input_data() 769 status = (*buf->input) (buf->closure, in buf_input_data() 770 buf->last->bufp + buf->last->size, in buf_input_data() 895 (*buf->memory_error) (buf); in buf_read_short_line() 976 (*buf->memory_error) (buf); in buf_read_data() 1259 if (buf->shutdown) return (*buf->shutdown) (buf); in buf_shutdown() [all …]
|
/dragonfly/lib/libc/nameser/ |
H A D | ns_print.c | 158 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf() 326 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf() 417 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf() 658 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf() 681 addlen(strlen(buf), &buf, &buflen); in ns_sprintrrf() 815 *buf = save_buf; in charstr() 844 (*buf)[newlen] == '\0')) && (*buf)[newlen - 1] != '.') { in addname() 855 **buf = '\0'; in addname() 859 *buf = save_buf; in addname() 867 *buf += len; in addlen() [all …]
|