Lines Matching refs:trh
128 struct tftproot_handle trh;
184 memset(&trh, 0, sizeof(trh));
185 trh.trh_nd = nd;
186 trh.trh_block = 1;
188 if ((error = tftproot_getfile(&trh, l)) != 0) {
204 tftproot_getfile(struct tftproot_handle *trh, struct lwp *l)
239 memcpy(sin, &trh->trh_nd->nd_root.ndm_saddr, sizeof(*sin));
245 namelen = strlen(trh->trh_nd->nd_bootfile) + 1;
264 (void)strncpy(cp, trh->trh_nd->nd_bootfile, namelen);
271 sin = (struct sockaddr_in *)&trh->trh_nd->nd_root.ndm_saddr;
273 inet_ntoa(sin->sin_addr), trh->trh_nd->nd_bootfile);
282 if ((trh->trh_block % TFTPROOT_PROGRESS) == 0)
291 tftproot_recv, NULL, &m_serv, trh, l)) != 0) {
304 tftp->th_block = htons(trh->trh_block);
310 if (trh->trh_flags & TRH_FINISHED)
313 trh->trh_block++;
334 __func__, __LINE__, trh->trh_len, trh->trh_base));
335 md_root_setconf(trh->trh_base, trh->trh_len);
355 struct tftproot_handle *trh = ctx;
432 trh->trh_flags |= TRH_FINISHED;
436 if (ntohs(tftp->th_block) != trh->trh_block) {
438 __func__, __LINE__, trh->trh_block, ntohs(tftp->th_block)));
445 newlen = trh->trh_len + (m->m_pkthdr.len - hdrlen);
446 if ((trh->trh_base = realloc(trh->trh_base,
457 (char *)trh->trh_base + trh->trh_len);
458 trh->trh_len = newlen;