Lines Matching refs:uip
176 } uip = { .vnet_header = { 0 } }; in serial_to_tun() local
191 if(inbufptr >= sizeof(uip.inbuf)) { in serial_to_tun()
215 if(uip.inbuf[0] == '!') { in serial_to_tun()
216 if(uip.inbuf[1] == 'M') { in serial_to_tun()
221 macs[pos++] = uip.inbuf[2 + i]; in serial_to_tun()
239 } else if(uip.inbuf[0] == '?') { in serial_to_tun()
240 if(uip.inbuf[1] == 'P') { in serial_to_tun()
266 } else if(uip.inbuf[0] == DEBUG_LINE_MARKER) { in serial_to_tun()
267 fwrite(uip.inbuf + 1, inbufptr - 1, 1, stdout); in serial_to_tun()
268 } else if(is_sensible_string(uip.inbuf, inbufptr)) { in serial_to_tun()
271 fwrite(uip.inbuf, inbufptr, 1, stdout); in serial_to_tun()
282 for(i = 0; i < sizeof(uip.vnet_header); i++) in serial_to_tun()
283 printf(" %02x",uip.vnet_header[i]); in serial_to_tun()
286 printf(" %02x",uip.inbuf[i]); in serial_to_tun()
290 for(i = 0; i < sizeof(uip.vnet_header); i++) { in serial_to_tun()
291 printf("%02x", uip.vnet_header[i]); in serial_to_tun()
297 printf("%02x", uip.inbuf[i]); in serial_to_tun()
309 total_size += sizeof(uip.vnet_header); in serial_to_tun()
313 if (write(outfd, (void *) &uip, total_size) == total_size) in serial_to_tun()
316 if(write(outfd, (void *) uip.inbuf, total_size) == total_size) in serial_to_tun()
351 uip.inbuf[inbufptr++] = c; in serial_to_tun()
357 if(is_sensible_string(uip.inbuf, inbufptr)) { in serial_to_tun()
359 fwrite(uip.inbuf, inbufptr, 1, stdout); in serial_to_tun()
620 } uip; in tun_to_serial() local
623 if((size = read(infd, uip.inbuf, 2000)) == -1) err(1, "tun_to_serial: read"); in tun_to_serial()
625 write_to_serial(outfd, uip.inbuf, size); in tun_to_serial()