[jcifs] Strange jetDirect printer behavior

Michael B Allen mba2000 at ioplex.com
Fri May 19 02:39:12 GMT 2006

On Thu, 18 May 2006 22:08:03 +0000 (UTC)
Mike Davidson <mike.davidson at raritan.com> wrote:

> questionName=GC-EXCHANGE<00>,questionType=0x0020,questionClass=IN,
> recordName=null,recordType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
> And here is the incoming response packet from the JetDirect printer:
> -----------------------------------------------------------------
> questionType=0x0000,questionClass=IN,recordName=GC-EXCHANGE<00>,
> recordType=0x0021,recordClass=IN,ttl=0,rDataLength=65,
> addrEntry=GC-EXCHANGE<00>/]
> -----------------------------------------------------------------
> The resulting NbtAddress object has an IP address of!!!  Based 
> on RFC 1002, jCIFS appears to be parsing the response packet which is of 
> type NBSTAT as if it was an NB packet and incorrectly interpreting the 
> "PIC5" portion of the printer's name as the IP address of 'WINXP1'.  
> So my question is this...to address the jCIFS portion of the issue I'm 
> proposing that the NameServiceClient.getByName() method be modified so 
> that only responses which have a recordType of 0x0020 (NB) be accepted 
> and parsed. Is this reasonable?

Yup. The record should be decoded correctly based on the type. As for
whether or not the answer supplied should be ignored is less clear.

I'll add this to The List but a patch would help expidite the fix.


More information about the jcifs mailing list