Lines Matching defs:trh
126 struct tftproot_handle trh;
186 memset(&trh, 0, sizeof(trh));
187 trh.trh_nd = nd;
188 trh.trh_block = 1;
190 if ((error = tftproot_getfile(&trh, l)) != 0) {
206 tftproot_getfile(struct tftproot_handle *trh, struct lwp *l)
237 memcpy(&sin, &trh->trh_nd->nd_root.ndm_saddr, sizeof(sin));
243 namelen = strlen(trh->trh_nd->nd_bootfile) + 1;
263 (void)strncpy(cp, trh->trh_nd->nd_bootfile, namelen);
271 inet_ntoa(sin.sin_addr), trh->trh_nd->nd_bootfile);
280 if ((trh->trh_block % TFTPROOT_PROGRESS) == 0)
289 tftproot_recv, NULL, &m_serv, trh, l)) != 0) {
302 tftp->th_block = htons(trh->trh_block);
308 if (trh->trh_flags & TRH_FINISHED)
311 trh->trh_block++;
333 __func__, __LINE__, trh->trh_len, trh->trh_base));
334 md_root_setconf(trh->trh_base, trh->trh_len);
351 struct tftproot_handle *trh = ctx;
429 trh->trh_flags |= TRH_FINISHED;
433 if (ntohs(tftp->th_block) != trh->trh_block) {
435 __func__, __LINE__, trh->trh_block, ntohs(tftp->th_block)));
442 newlen = trh->trh_len + (m->m_pkthdr.len - hdrlen);
443 if ((trh->trh_base = realloc(trh->trh_base,
454 (char *)trh->trh_base + trh->trh_len);
455 trh->trh_len = newlen;