Lines Matching defs:stp
170 smb_struct_t *stp = &shp->sh_structs[i];
205 stp->smbst_hdr = hp;
206 stp->smbst_str = s;
207 stp->smbst_end = p;
208 stp->smbst_next = shp->sh_hash[h];
209 stp->smbst_strtab = smb_alloc(sizeof (uint16_t) * n);
210 stp->smbst_strtablen = n;
212 if (n != 0 && stp->smbst_strtab == NULL)
215 shp->sh_hash[h] = stp;
219 for (n = 0, p = s; n < stp->smbst_strtablen; p++) {
221 stp->smbst_strtab[n++] =
222 (uint16_t)(s - stp->smbst_str);
296 smb_export(const smb_struct_t *stp, smbios_struct_t *sp)
298 const smb_header_t *hdr = stp->smbst_hdr;
303 sp->smbstr_size = (size_t)(stp->smbst_end - (uchar_t *)hdr);
311 const smb_struct_t *stp = smb_lookup_id(shp, id);
313 if (stp == NULL)
317 (void) smb_export(stp, sp);
325 const smb_struct_t *stp = smb_lookup_type(shp, type);
327 if (stp == NULL)
331 (void) smb_export(stp, sp);
369 const smb_struct_t *stp = shp->sh_hash[id & (shp->sh_hashlen - 1)];
380 for (; stp != NULL; stp = stp->smbst_next) {
381 if (stp->smbst_hdr->smbh_hdl == id)
385 if (stp == NULL)
388 return (stp);
392 smb_strptr(const smb_struct_t *stp, uint_t i)
394 if (i == 0 || i > stp->smbst_strtablen)
397 return ((char *)stp->smbst_str + stp->smbst_strtab[i - 1]);