Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 3263) sorted by relevance

12345678910>>...131

/dflybsd-src/crypto/openssh/
H A Dsshbuf.c35 buf->size, buf->alloc, buf->off, buf->max_size); \
55 sshbuf_check_sanity(const struct sshbuf *buf) in sshbuf_check_sanity() argument
58 if (__predict_false(buf == NULL || in sshbuf_check_sanity()
59 (!buf->readonly && buf->d != buf->cd) || in sshbuf_check_sanity()
60 buf->refcount < 1 || buf->refcount > SSHBUF_REFS_MAX || in sshbuf_check_sanity()
61 buf->cd == NULL || in sshbuf_check_sanity()
62 buf->max_size > SSHBUF_SIZE_MAX || in sshbuf_check_sanity()
63 buf->alloc > buf->max_size || in sshbuf_check_sanity()
64 buf->size > buf->alloc || in sshbuf_check_sanity()
65 buf->off > buf->size)) { in sshbuf_check_sanity()
[all …]
H A Dsshbuf.h56 struct sshbuf *sshbuf_fromb(struct sshbuf *buf);
65 int sshbuf_froms(struct sshbuf *buf, struct sshbuf **bufp);
70 void sshbuf_free(struct sshbuf *buf);
75 void sshbuf_reset(struct sshbuf *buf);
80 size_t sshbuf_max_size(const struct sshbuf *buf);
86 int sshbuf_set_max_size(struct sshbuf *buf, size_t max_size);
91 size_t sshbuf_len(const struct sshbuf *buf);
96 size_t sshbuf_avail(const struct sshbuf *buf);
101 const u_char *sshbuf_ptr(const struct sshbuf *buf);
107 u_char *sshbuf_mutable_ptr(const struct sshbuf *buf);
[all …]
H A Dsshbuf-getput-basic.c35 sshbuf_get(struct sshbuf *buf, void *v, size_t len) in sshbuf_get() argument
37 const u_char *p = sshbuf_ptr(buf); in sshbuf_get()
40 if ((r = sshbuf_consume(buf, len)) < 0) in sshbuf_get()
48 sshbuf_get_u64(struct sshbuf *buf, u_int64_t *valp) in sshbuf_get_u64() argument
50 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u64()
53 if ((r = sshbuf_consume(buf, 8)) < 0) in sshbuf_get_u64()
61 sshbuf_get_u32(struct sshbuf *buf, u_int32_t *valp) in sshbuf_get_u32() argument
63 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u32()
66 if ((r = sshbuf_consume(buf, 4)) < 0) in sshbuf_get_u32()
74 sshbuf_get_u16(struct sshbuf *buf, u_int16_t *valp) in sshbuf_get_u16() argument
[all …]
/dflybsd-src/crypto/libressl/ssl/
H A Dtls_buffer.c34 static int tls_buffer_resize(struct tls_buffer *buf, size_t capacity);
39 struct tls_buffer *buf = NULL; in tls_buffer_new() local
41 if ((buf = calloc(1, sizeof(struct tls_buffer))) == NULL) in tls_buffer_new()
44 buf->capacity_limit = TLS_BUFFER_CAPACITY_LIMIT; in tls_buffer_new()
46 if (!tls_buffer_resize(buf, init_size)) in tls_buffer_new()
49 return buf; in tls_buffer_new()
52 tls_buffer_free(buf); in tls_buffer_new()
58 tls_buffer_clear(struct tls_buffer *buf) in tls_buffer_clear() argument
60 freezero(buf->data, buf->capacity); in tls_buffer_clear()
62 buf->data = NULL; in tls_buffer_clear()
[all …]
/dflybsd-src/contrib/wpa_supplicant/src/p2p/
H A Dp2p_build.c18 void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) in p2p_buf_add_action_hdr() argument
20 wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); in p2p_buf_add_action_hdr()
21 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_action_hdr()
23 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_action_hdr()
24 wpabuf_put_u8(buf, dialog_token); in p2p_buf_add_action_hdr()
29 void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype, in p2p_buf_add_public_action_hdr() argument
32 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in p2p_buf_add_public_action_hdr()
33 wpabuf_put_u8(buf, WLAN_PA_VENDOR_SPECIFIC); in p2p_buf_add_public_action_hdr()
34 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_public_action_hdr()
36 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_public_action_hdr()
[all …]
/dflybsd-src/contrib/gcc-8.0/libiberty/
H A Dsimple-object-common.h189 simple_object_fetch_big_16 (const unsigned char *buf) in simple_object_fetch_big_16() argument
191 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16()
197 simple_object_fetch_little_16 (const unsigned char *buf) in simple_object_fetch_little_16() argument
199 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16()
205 simple_object_fetch_big_32 (const unsigned char *buf) in simple_object_fetch_big_32() argument
207 return (((unsigned int) buf[0] << 24) in simple_object_fetch_big_32()
208 | ((unsigned int) buf[1] << 16) in simple_object_fetch_big_32()
209 | ((unsigned int) buf[2] << 8) in simple_object_fetch_big_32()
210 | (unsigned int) buf[3]); in simple_object_fetch_big_32()
216 simple_object_fetch_little_32 (const unsigned char *buf) in simple_object_fetch_little_32() argument
[all …]
/dflybsd-src/contrib/gcc-4.7/libiberty/
H A Dsimple-object-common.h182 simple_object_fetch_big_16 (const unsigned char *buf) in simple_object_fetch_big_16() argument
184 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16()
190 simple_object_fetch_little_16 (const unsigned char *buf) in simple_object_fetch_little_16() argument
192 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16()
198 simple_object_fetch_big_32 (const unsigned char *buf) in simple_object_fetch_big_32() argument
200 return (((unsigned int) buf[0] << 24) in simple_object_fetch_big_32()
201 | ((unsigned int) buf[1] << 16) in simple_object_fetch_big_32()
202 | ((unsigned int) buf[2] << 8) in simple_object_fetch_big_32()
203 | (unsigned int) buf[3]); in simple_object_fetch_big_32()
209 simple_object_fetch_little_32 (const unsigned char *buf) in simple_object_fetch_little_32() argument
[all …]
/dflybsd-src/contrib/gdb-7/libiberty/
H A Dsimple-object-common.h183 simple_object_fetch_big_16 (const unsigned char *buf) in simple_object_fetch_big_16() argument
185 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16()
191 simple_object_fetch_little_16 (const unsigned char *buf) in simple_object_fetch_little_16() argument
193 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16()
199 simple_object_fetch_big_32 (const unsigned char *buf) in simple_object_fetch_big_32() argument
201 return (((unsigned int) buf[0] << 24) in simple_object_fetch_big_32()
202 | ((unsigned int) buf[1] << 16) in simple_object_fetch_big_32()
203 | ((unsigned int) buf[2] << 8) in simple_object_fetch_big_32()
204 | (unsigned int) buf[3]); in simple_object_fetch_big_32()
210 simple_object_fetch_little_32 (const unsigned char *buf) in simple_object_fetch_little_32() argument
[all …]
/dflybsd-src/contrib/binutils-2.27/libiberty/
H A Dsimple-object-common.h183 simple_object_fetch_big_16 (const unsigned char *buf) in simple_object_fetch_big_16() argument
185 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16()
191 simple_object_fetch_little_16 (const unsigned char *buf) in simple_object_fetch_little_16() argument
193 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16()
199 simple_object_fetch_big_32 (const unsigned char *buf) in simple_object_fetch_big_32() argument
201 return (((unsigned int) buf[0] << 24) in simple_object_fetch_big_32()
202 | ((unsigned int) buf[1] << 16) in simple_object_fetch_big_32()
203 | ((unsigned int) buf[2] << 8) in simple_object_fetch_big_32()
204 | (unsigned int) buf[3]); in simple_object_fetch_big_32()
210 simple_object_fetch_little_32 (const unsigned char *buf) in simple_object_fetch_little_32() argument
[all …]
/dflybsd-src/contrib/binutils-2.34/libiberty/
H A Dsimple-object-common.h189 simple_object_fetch_big_16 (const unsigned char *buf) in simple_object_fetch_big_16() argument
191 return ((unsigned short) buf[0] << 8) | (unsigned short) buf[1]; in simple_object_fetch_big_16()
197 simple_object_fetch_little_16 (const unsigned char *buf) in simple_object_fetch_little_16() argument
199 return ((unsigned short) buf[1] << 8) | (unsigned short) buf[0]; in simple_object_fetch_little_16()
205 simple_object_fetch_big_32 (const unsigned char *buf) in simple_object_fetch_big_32() argument
207 return (((unsigned int) buf[0] << 24) in simple_object_fetch_big_32()
208 | ((unsigned int) buf[1] << 16) in simple_object_fetch_big_32()
209 | ((unsigned int) buf[2] << 8) in simple_object_fetch_big_32()
210 | (unsigned int) buf[3]); in simple_object_fetch_big_32()
216 simple_object_fetch_little_32 (const unsigned char *buf) in simple_object_fetch_little_32() argument
[all …]
/dflybsd-src/contrib/wpa_supplicant/src/utils/
H A Dwpabuf.c22 static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf) in wpabuf_get_trace() argument
25 ((const u8 *) buf - sizeof(struct wpabuf_trace)); in wpabuf_get_trace()
30 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow() argument
33 struct wpabuf_trace *trace = wpabuf_get_trace(buf); in wpabuf_overflow()
40 buf, (unsigned long) buf->size, (unsigned long) buf->used, in wpabuf_overflow()
49 struct wpabuf *buf = *_buf; in wpabuf_resize() local
54 if (buf == NULL) { in wpabuf_resize()
60 trace = wpabuf_get_trace(buf); in wpabuf_resize()
69 if (buf->used + add_len > buf->size) { in wpabuf_resize()
71 if (buf->flags & WPABUF_FLAG_EXT_DATA) { in wpabuf_resize()
[all …]
H A Dwpabuf.h23 u8 *buf; /* pointer to the head of the buffer */ member
29 int wpabuf_resize(struct wpabuf **buf, size_t add_len);
34 void wpabuf_free(struct wpabuf *buf);
35 void wpabuf_clear_free(struct wpabuf *buf);
36 void * wpabuf_put(struct wpabuf *buf, size_t len);
38 struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len);
39 void wpabuf_printf(struct wpabuf *buf, char *fmt, ...) PRINTF_FORMAT(2, 3);
40 struct wpabuf * wpabuf_parse_bin(const char *buf);
48 static inline size_t wpabuf_size(const struct wpabuf *buf) in wpabuf_size() argument
50 return buf->size; in wpabuf_size()
[all …]
/dflybsd-src/lib/libc/stdtime/
H A Dstrptime.c79 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument
103 while (*buf != 0 && in _strptime()
104 isspace_l((unsigned char)*buf, locale)) in _strptime()
105 buf++; in _strptime()
106 else if (c != *buf++) in _strptime()
117 if (*buf++ != '%') in _strptime()
122 buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); in _strptime()
123 if (buf == NULL) in _strptime()
129 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
134 for (i = 0; len && *buf != 0 && in _strptime()
[all …]
/dflybsd-src/contrib/bmake/
H A Dbuf.c82 Buf_Expand(Buffer *buf) in Buf_Expand() argument
84 buf->cap += buf->cap > 16 ? buf->cap : 16; in Buf_Expand()
85 buf->data = bmake_realloc(buf->data, buf->cap); in Buf_Expand()
90 Buf_AddBytes(Buffer *buf, const char *bytes, size_t bytes_len) in Buf_AddBytes() argument
92 size_t old_len = buf->len; in Buf_AddBytes()
95 if (old_len + bytes_len >= buf->cap) { in Buf_AddBytes()
97 buf->cap += buf->cap > minIncr ? buf->cap : minIncr; in Buf_AddBytes()
98 buf->data = bmake_realloc(buf->data, buf->cap); in Buf_AddBytes()
101 end = buf->data + old_len; in Buf_AddBytes()
102 buf->len = old_len + bytes_len; in Buf_AddBytes()
[all …]
/dflybsd-src/contrib/flex/src/
H A Dbuf.c55 struct Buf *buf_print_strings(struct Buf * buf, FILE* out) in buf_print_strings() argument
59 if(!buf || !out) in buf_print_strings()
60 return buf; in buf_print_strings()
62 for (i=0; i < buf->nelts; i++){ in buf_print_strings()
63 const char * s = ((char**)buf->elts)[i]; in buf_print_strings()
67 return buf; in buf_print_strings()
71 struct Buf *buf_prints (struct Buf *buf, const char *fmt, const char *s) in buf_prints() argument
81 buf = buf_strappend (buf, t); in buf_prints()
83 return buf; in buf_prints()
92 struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno) in buf_linedir() argument
[all …]
/dflybsd-src/usr.sbin/sdpd/
H A Dprofile.c103 uint8_t *buf, uint8_t const * const eob, in common_profile_create_service_record_handle() argument
106 if (buf + 5 > eob) in common_profile_create_service_record_handle()
109 SDP_PUT8(SDP_DATA_UINT32, buf); in common_profile_create_service_record_handle()
110 SDP_PUT32(((provider_t const *) data)->handle, buf); in common_profile_create_service_record_handle()
123 uint8_t *buf, uint8_t const * const eob, in common_profile_create_service_class_id_list() argument
128 if (len <= 0 || len > 0xff || buf + 2 + len > eob) in common_profile_create_service_class_id_list()
131 SDP_PUT8(SDP_DATA_SEQ8, buf); in common_profile_create_service_class_id_list()
132 SDP_PUT8(len, buf); in common_profile_create_service_class_id_list()
135 SDP_PUT8(SDP_DATA_UUID16, buf); in common_profile_create_service_class_id_list()
136 SDP_PUT16(*((uint16_t const *)data), buf); in common_profile_create_service_class_id_list()
[all …]
/dflybsd-src/contrib/wpa_supplicant/src/common/
H A Dgas.c20 struct wpabuf *buf; in gas_build_req() local
22 buf = wpabuf_alloc(100 + size); in gas_build_req()
23 if (buf == NULL) in gas_build_req()
26 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in gas_build_req()
27 wpabuf_put_u8(buf, action); in gas_build_req()
28 wpabuf_put_u8(buf, dialog_token); in gas_build_req()
30 return buf; in gas_build_req()
51 struct wpabuf *buf; in gas_build_resp() local
53 buf = wpabuf_alloc(100 + size); in gas_build_resp()
54 if (buf == NULL) in gas_build_resp()
[all …]
/dflybsd-src/contrib/wpa_supplicant/src/ap/
H A Dgas_serv.c25 static void gas_serv_write_dpp_adv_proto(struct wpabuf *buf) in gas_serv_write_dpp_adv_proto() argument
27 wpabuf_put_u8(buf, WLAN_EID_ADV_PROTO); in gas_serv_write_dpp_adv_proto()
28 wpabuf_put_u8(buf, 8); /* Length */ in gas_serv_write_dpp_adv_proto()
29 wpabuf_put_u8(buf, 0x7f); in gas_serv_write_dpp_adv_proto()
30 wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC); in gas_serv_write_dpp_adv_proto()
31 wpabuf_put_u8(buf, 5); in gas_serv_write_dpp_adv_proto()
32 wpabuf_put_be24(buf, OUI_WFA); in gas_serv_write_dpp_adv_proto()
33 wpabuf_put_u8(buf, DPP_OUI_TYPE); in gas_serv_write_dpp_adv_proto()
34 wpabuf_put_u8(buf, 0x01); in gas_serv_write_dpp_adv_proto()
162 struct wpabuf *buf) in anqp_add_hs_capab_list() argument
[all …]
/dflybsd-src/contrib/tcpdump/
H A Dsmbutil.c184 const u_char *buf, u_int ofs, const u_char *maxbuf) in name_ptr() argument
189 p = buf + ofs; in name_ptr()
207 p = buf + l; in name_ptr()
223 const u_char *buf, u_int ofs, const u_char *maxbuf, char *name) in name_extract() argument
225 const u_char *p = name_ptr(ndo, buf, ofs, maxbuf); in name_extract()
262 const u_char *buf, u_int len) in print_asc() argument
266 fn_print_char(ndo, GET_U_1(buf + i)); in print_asc()
287 smb_data_print(netdissect_options *ndo, const u_char *buf, u_int len) in smb_data_print() argument
295 ND_PRINT("%02X ", GET_U_1(buf + i) & 0xff); in smb_data_print()
300 print_asc(ndo, buf + i - 16, 8); in smb_data_print()
[all …]
H A Dprint-icmp.c283 static char buf[64]; in icmp_tstamp_print() local
289 snprintf(buf, sizeof(buf), "%02u:%02u:%02u.%03u",hrs,min,sec,msec); in icmp_tstamp_print()
290 return buf; in icmp_tstamp_print()
311 char buf[MAXHOSTNAMELEN + 100]; in icmp_print() local
318 str = buf; in icmp_print()
326 (void)snprintf(buf, sizeof(buf), "echo %s, id %u, seq %u", in icmp_print()
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()
365 (void)snprintf(buf, sizeof(buf), in icmp_print()
[all …]
/dflybsd-src/crypto/libressl/apps/nc/
H A Dsocks.c91 proxy_read_line(int fd, char *buf, size_t bufsz) in proxy_read_line() argument
98 if (atomicio(read, fd, buf + off, 1) != 1) in proxy_read_line()
101 if (buf[off] == '\r') in proxy_read_line()
103 if (buf[off] == '\n') { in proxy_read_line()
104 buf[off] = '\0'; in proxy_read_line()
184 unsigned char buf[1024]; in socks_connect() local
215 buf[0] = SOCKS_V5; in socks_connect()
216 buf[1] = 1; in socks_connect()
217 buf[2] = SOCKS_NOAUTH; in socks_connect()
218 cnt = atomicio(vwrite, proxyfd, buf, 3); in socks_connect()
[all …]
/dflybsd-src/contrib/xz/src/common/
H A Dtuklib_integer.h208 read16ne(const uint8_t *buf) in read16ne() argument
212 return *(const uint16_t *)buf; in read16ne()
215 memcpy(&num, buf, sizeof(num)); in read16ne()
222 read32ne(const uint8_t *buf) in read32ne() argument
226 return *(const uint32_t *)buf; in read32ne()
229 memcpy(&num, buf, sizeof(num)); in read32ne()
236 read64ne(const uint8_t *buf) in read64ne() argument
240 return *(const uint64_t *)buf; in read64ne()
243 memcpy(&num, buf, sizeof(num)); in read64ne()
250 write16ne(uint8_t *buf, uint16_t num) in write16ne() argument
[all …]
/dflybsd-src/sys/sys/
H A Dbuf.h67 struct buf;
77 RB_PROTOTYPE2(buf_rb_tree, buf, b_rbnode, rb_buf_compare, off_t);
78 RB_PROTOTYPE2(buf_rb_hash, buf, b_rbhash, rb_buf_compare, off_t);
152 struct buf { struct
153 RB_ENTRY(buf) b_rbnode; /* RB node in vnode clean/dirty tree */
154 RB_ENTRY(buf) b_rbhash; /* RB node in vnode hash tree */
155 TAILQ_ENTRY(buf) b_freelist; /* Free list position if not active. */
156 struct buf *b_cluster_next; /* Next buffer (cluster code) */ argument
367 struct buf **bs_children; /* List of associated buffers. */
403 extern struct buf *buf; /* The buffer headers. */
[all …]
/dflybsd-src/contrib/cvs-1.12/src/
H A Dbuffer.c48 struct buffer *buf; in buf_initialize() local
50 buf = xmalloc (sizeof (struct buffer)); in buf_initialize()
51 buf->data = NULL; in buf_initialize()
52 buf->last = NULL; in buf_initialize()
53 buf->nonblocking = false; in buf_initialize()
54 buf->input = input; in buf_initialize()
55 buf->output = output; in buf_initialize()
56 buf->flush = flush; in buf_initialize()
57 buf->block = block; in buf_initialize()
58 buf->get_fd = get_fd; in buf_initialize()
[all …]
/dflybsd-src/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);
84 char *buf, size_t buflen) in ns_sprintrr() argument
91 name_ctx, origin, buf, buflen); in ns_sprintrr()
106 char *buf, size_t buflen) in ns_sprintrrf() argument
108 const char *obuf = buf; in ns_sprintrrf()
120 T(addstr("\t\t\t", 3, &buf, &buflen)); in ns_sprintrrf()
[all …]

12345678910>>...131