On Feb 11, 2004, at 6:29 AM, Rolf Fiedler wrote:
I added a wiretap for the EyeSDN USB S0, a ISDN probe/call recording
device attached to the PC using USB.
Checked in, with some changes to get rid of unused variables, fix up
some of the error returns, and return an error string for
WTAP_ERR_BAD_RECORD (the APIs for wiretap have changed since 0.10.0a,
so that for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and
WTAP_ERR_BAD_RECORD, an error string is returned; that string is
displayed in the alert box for those errors, making it easier for the
user to see the error and report it).
There's one unused-variable warning left:
eyesdn.c:86: warning: `eyesdn_rec_magic' defined but not used
Are there flag characters at the *beginning* of frames, or just at the
*end* of frames?
Also, is the data in the record *header* escaped?
"parse_eyesdn_rec_hdr()" uses 'esc_read()" to read the header.
And, in "parse_eyesdn_rec_hdr()", the record header is read into an
array of "char", and the bytes from it are extracted into numbers;
that's done by casting the bytes to "unsigned long", but I think that a
byte with the 8th bit set will be sign-extended on most if not all
platforms (are there any compilers for modern UNIX systems where "char"
is unsigned?), and then the resulting sign-extended integer will be
cast to "unsigned long", so a byte of 0xff will, I think, be turned
into 0xffffffff on platforms with 32-bit longs and 0xffffffffffffffff
on platforms with 64-bit longs.
Is that what's intended?