hexdump(buf, buf_len, "Unknown> ");
break;
}
- if (debug)
- fprintf(stderr, "LAN < %s\n", out);
+ if (verbose) {
+ int i;
+
+ printf("LAN < ");
+ for (i = 0; i < outpos-out; i++)
+ printf("%c", out[i]);
+ }
w = write(fd, out, outpos-out);
if (w <= 0) {
inpos = buf;
- if (debug)
- fprintf(stderr, "\nLAN > %s", buf);
-
while (inpos < inend) {
uint8_t *instart = inpos;
if (last == 0)
continue;
+ if (verbose) {
+ printf("LAN > ");
+ for (i = 0; i < last; i++)
+ printf("%c", instart[i]);
+ printf("\n");
+ }
+
memset(out, 0, sizeof(out));
*outpos++ = *inpos++;
parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), 0);
parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), FLAG_LENGTH_BYTE);
break;
+ case 'Y':
+ parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), 0);
+ parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), 0);
+ parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), FLAG_LENGTH_BYTE);
+ break;
default:
parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), FLAG_IGNORE_COMMAS);
break;