• Home
  • Raw
  • Download

Lines Matching refs:datlen

146     size_t datlen);
323 evbuffer_chain_insert_new(struct evbuffer *buf, size_t datlen) in evbuffer_chain_insert_new() argument
326 if ((chain = evbuffer_chain_new(datlen)) == NULL) in evbuffer_chain_insert_new()
1031 evbuffer_remove(struct evbuffer *buf, void *data_out, size_t datlen) in evbuffer_remove() argument
1035 n = evbuffer_copyout(buf, data_out, datlen); in evbuffer_remove()
1045 evbuffer_copyout(struct evbuffer *buf, void *data_out, size_t datlen) in evbuffer_copyout() argument
1057 if (datlen >= buf->total_len) in evbuffer_copyout()
1058 datlen = buf->total_len; in evbuffer_copyout()
1060 if (datlen == 0) in evbuffer_copyout()
1068 nread = datlen; in evbuffer_copyout()
1070 while (datlen && datlen >= chain->off) { in evbuffer_copyout()
1073 datlen -= chain->off; in evbuffer_copyout()
1076 EVUTIL_ASSERT(chain || datlen==0); in evbuffer_copyout()
1079 if (datlen) { in evbuffer_copyout()
1081 EVUTIL_ASSERT(datlen <= chain->off); in evbuffer_copyout()
1082 memcpy(data, chain->buffer + chain->misalign, datlen); in evbuffer_copyout()
1096 size_t datlen) in evbuffer_remove_buffer() argument
1109 if (datlen == 0 || dst == src) { in evbuffer_remove_buffer()
1120 if (datlen >= src->total_len) { in evbuffer_remove_buffer()
1121 datlen = src->total_len; in evbuffer_remove_buffer()
1123 result = (int)datlen; /*XXXX should return ev_ssize_t*/ in evbuffer_remove_buffer()
1128 while (chain->off <= datlen) { in evbuffer_remove_buffer()
1134 datlen -= chain->off; in evbuffer_remove_buffer()
1162 evbuffer_add(dst, chain->buffer + chain->misalign, datlen); in evbuffer_remove_buffer()
1163 chain->misalign += datlen; in evbuffer_remove_buffer()
1164 chain->off -= datlen; in evbuffer_remove_buffer()
1165 nread += datlen; in evbuffer_remove_buffer()
1545 evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen) in evbuffer_add() argument
1558 if (datlen > EV_SIZE_MAX - buf->total_len) { in evbuffer_add()
1567 chain = evbuffer_chain_new(datlen); in evbuffer_add()
1578 if (remain >= datlen) { in evbuffer_add()
1582 data, datlen); in evbuffer_add()
1583 chain->off += datlen; in evbuffer_add()
1584 buf->total_len += datlen; in evbuffer_add()
1585 buf->n_add_for_cb += datlen; in evbuffer_add()
1588 evbuffer_chain_should_realign(chain, datlen)) { in evbuffer_add()
1592 memcpy(chain->buffer + chain->off, data, datlen); in evbuffer_add()
1593 chain->off += datlen; in evbuffer_add()
1594 buf->total_len += datlen; in evbuffer_add()
1595 buf->n_add_for_cb += datlen; in evbuffer_add()
1607 if (datlen > to_alloc) in evbuffer_add()
1608 to_alloc = datlen; in evbuffer_add()
1622 datlen -= remain; in evbuffer_add()
1624 memcpy(tmp->buffer, data, datlen); in evbuffer_add()
1625 tmp->off = datlen; in evbuffer_add()
1627 buf->n_add_for_cb += datlen; in evbuffer_add()
1638 evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen) in evbuffer_prepend() argument
1648 if (datlen > EV_SIZE_MAX - buf->total_len) { in evbuffer_prepend()
1655 chain = evbuffer_chain_new(datlen); in evbuffer_prepend()
1672 if ((size_t)chain->misalign >= datlen) { in evbuffer_prepend()
1674 memcpy(chain->buffer + chain->misalign - datlen, in evbuffer_prepend()
1675 data, datlen); in evbuffer_prepend()
1676 chain->off += datlen; in evbuffer_prepend()
1677 chain->misalign -= datlen; in evbuffer_prepend()
1678 buf->total_len += datlen; in evbuffer_prepend()
1679 buf->n_add_for_cb += datlen; in evbuffer_prepend()
1684 (char*)data + datlen - chain->misalign, in evbuffer_prepend()
1689 datlen -= (size_t)chain->misalign; in evbuffer_prepend()
1695 if ((tmp = evbuffer_chain_new(datlen)) == NULL) in evbuffer_prepend()
1703 tmp->off = datlen; in evbuffer_prepend()
1704 EVUTIL_ASSERT(datlen <= tmp->buffer_len); in evbuffer_prepend()
1705 tmp->misalign = tmp->buffer_len - datlen; in evbuffer_prepend()
1707 memcpy(tmp->buffer + tmp->misalign, data, datlen); in evbuffer_prepend()
1708 buf->total_len += datlen; in evbuffer_prepend()
1736 size_t datlen) in evbuffer_chain_should_realign() argument
1738 return chain->buffer_len - chain->off >= datlen && in evbuffer_chain_should_realign()
1746 evbuffer_expand_singlechain(struct evbuffer *buf, size_t datlen) in evbuffer_expand_singlechain() argument
1772 if (CHAIN_SPACE_LEN(chain) >= datlen) { in evbuffer_expand_singlechain()
1789 if (evbuffer_chain_should_realign(chain, datlen)) { in evbuffer_expand_singlechain()
1804 (datlen < EVBUFFER_CHAIN_MAX && in evbuffer_expand_singlechain()
1805 EVBUFFER_CHAIN_MAX - datlen >= chain->off)) { in evbuffer_expand_singlechain()
1808 if (chain->next && CHAIN_SPACE_LEN(chain->next) >= datlen) { in evbuffer_expand_singlechain()
1824 size_t length = chain->off + datlen; in evbuffer_expand_singlechain()
1846 result = evbuffer_chain_insert_new(buf, datlen); in evbuffer_expand_singlechain()
1851 EVUTIL_ASSERT(CHAIN_SPACE_LEN(result) >= datlen); in evbuffer_expand_singlechain()
1859 _evbuffer_expand_fast(struct evbuffer *buf, size_t datlen, int n) in _evbuffer_expand_fast() argument
1871 chain = evbuffer_chain_new(datlen); in _evbuffer_expand_fast()
1898 if (avail >= datlen) { in _evbuffer_expand_fast()
1914 tmp = evbuffer_chain_new(datlen - avail); in _evbuffer_expand_fast()
1945 EVUTIL_ASSERT(datlen >= avail); in _evbuffer_expand_fast()
1946 tmp = evbuffer_chain_new(datlen - avail); in _evbuffer_expand_fast()
1969 evbuffer_expand(struct evbuffer *buf, size_t datlen) in evbuffer_expand() argument
1974 chain = evbuffer_expand_singlechain(buf, datlen); in evbuffer_expand()
2742 const void *data, size_t datlen, in evbuffer_add_reference() argument
2754 chain->buffer_len = datlen; in evbuffer_add_reference()
2755 chain->off = datlen; in evbuffer_add_reference()
2769 outbuf->n_add_for_cb += datlen; in evbuffer_add_reference()