Lines Matching defs:buffer

92 /* Each reallocation adds _PSEARCH_BUF_BLK more bytes to a packed buffer */
131 * packed buffer. See below where the nscd dn2uid cache is described
158 * Where in the buffer the base DN starts. The first
161 * Where in the buffer to add the next data item. The first
164 * Current size of the data area in the packed buffer. This
176 * So the data layout in the data section of the packed buffer is
210 * of the packed buffer. The packed result of the search has up to
229 * Where in the buffer the base DN starts. The first
232 * Where in the buffer to add the next data item. The first
235 * Current size of the data area in the packed buffer. This
246 * packed buffer is as follows:
500 * The expectation is that get receives a properly formed packed buffer
502 * the buffer. psearch performs the actual lookup, while getkey returns
599 /* Find the search key from the packed buffer header. */
601 _nss_ldap_grgetkey(void *buffer, size_t buflen,
604 nss_pheader_t *pbuf = (nss_pheader_t *)buffer;
608 if (buffer == NULL || buflen == 0 || dbop == NULL ||
613 pdbd = (nss_dbd_t *)((char *)buffer + off);
614 *dbnamepp = (char *)buffer + off + pdbd->o_name;
615 arg->key.name = (char *)buffer + pbuf->key_off;
637 * Add a dn2uid data string 'str' to the data area in the packed buffer,
638 * '*bufpp', expand the packed buffer if necessary.
653 /* expand the buffer if not enough room to add the string */
671 /* adjust buffer length */
813 * Perform a dn2uid lookup using the input packed buffer.
816 * in the data area of the packed buffer. See the comments
1054 /* Set up a packed buffer and perform a cache search. */
1061 char *buffer, *bptr;
1087 * Space needed for the packed buffer header:
1091 * Total space needed: packed buffer header size +
1093 * for the consturction of the packed buffer header.
1098 if ((buffer = calloc(buflen, 1)) == NULL)
1101 pbuf = (nss_pheader_t *)buffer;
1104 /* Populate the packed buffer with a request */
1108 bptr = buffer + off;
1138 res = (*cache_get)((void **)&buffer, buflen, getkey, psearch,
1141 *outputp = buffer;
1143 (void) free(buffer);
1158 char *buffer, *cp, *mp, *ep;
1185 &buffer, NULL, NULL);
1193 pbuf = (nss_pheader_t *)buffer;
1194 sptr = buffer + pbuf->data_off;
1213 free(buffer);
1228 &buffer, NULL, NULL);
1236 pbuf = (nss_pheader_t *)buffer;
1237 sptr = buffer + pbuf->data_off;
1270 free(buffer);
1273 free(buffer);
1292 char *buffer = NULL;
1338 _PSEARCH_BUF_BLK, 0, &buffer, _nss_ldap_grgetkey,
1343 pbuf = (nss_pheader_t *)buffer;
1344 pp = buffer + pbuf->data_off;
1387 * Get a work buffer from the stack
1413 if (buffer != NULL)
1414 (void) free(buffer);
1606 char *buffer = NULL;
1633 if ((be->buffer = calloc(1, buflen)) == NULL) {
1637 buffer = be->buffer;
1639 buffer = argp->buf.buffer;
1642 (void) memset(buffer, 0, buflen);
1674 len = snprintf(buffer, buflen, "%s:%s:%s:", gname[0], password, gid[0]);
1675 TEST_AND_ADJUST(len, buffer, buflen, result_grp2str);
1686 * Copy all the members to the output buffer.
1690 list_rc = nss_ldap_list_dump(&memlist, &buffer, &buflen);
1703 be->buflen = strlen(be->buffer);
1709 * there's enough room in the buffer.
1715 *buffer++ = '\0';
1724 len = snprintf(buffer, buflen, "%s%s:%s",
1728 buffer += len;
1820 * beginning of the result data area in the packed buffer.
1823 setup_buf_memberof_res(void *buffer, _memberof_res_t **grespp)
1827 nss_pheader_t *pbuf = (nss_pheader_t *)buffer;
1833 bptr = (char *)buffer + pbuf->data_off;
1862 * Realloc the packed buffer for a memberof search if not
1881 * data in the packed buffer are updated.
2106 char *buffer = NULL;
2132 &buffer, NULL, NULL);
2140 pbuf = (nss_pheader_t *)buffer;
2141 sptr = buffer + pbuf->data_off;
2270 * Otherwise clean up incomplete result data in the buffer
2380 if (buffer != NULL)
2381 free(buffer);
2393 * memberof searches. The search key stored in the packed buffer
2445 char *buffer = NULL;
2482 0, _PSEARCH_BUF_BLK, 0, &buffer,
2488 pbuf = (nss_pheader_t *)buffer;
2489 gp = buffer + pbuf->data_off;
2542 * Get a work buffer from the stack
2579 if (buffer != NULL)
2580 free(buffer);