[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference jamin::iris

Title:IRIS - A Software LAN Analyzer
Notice:IRIS kit now at http://src-www.pa.dec.com/SRC/personal/mitch/iris.html
Moderator:JAMIN::LICHTENBERG
Created:Mon Jun 28 1993
Last Modified:Tue May 13 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:358
Total number of notes:1841

353.0. "Bug in NetWare SAP decoder" by JAMIN::WASSER (John A. Wasser) Wed Mar 26 1997 19:38

The "NetWare Service Advertising Protocol" decoder does not display the
service type in the detail output.  It displays "Operation" but not
the next two bytes which indicate what service type is being queried.

It could also decode some of the values:

	0003 = Print Queue
	0004 = NetWare Server
	0005 = Job Server
	0007 = Print Server
	0009 = Archive Server
	0024 = Remote Bridge Server
	0047 = Advertising Print Server

	0236 = PATHWORKS License Server

T.RTitleUserPersonal
Name
DateLines
353.1Send a trace!PHYLUM::LichtenbergMitch LichtenbergThu Mar 27 1997 16:1853
    
    John,
    
    Email me a trace (you can send it via an Exchange attachment to 
    mitch@pa.dec.com) -- the code looks very wierd, using some strange 
    calculations to figure out how many useful bytes are left in the 
    packet.  (there is code there to display the service type, but for 
    some reason it's not getting called!).
    
    I suspect the calculation of 'len' is invalid in the code below:
    
    
    static int sap_detail_line(word len)
    {
            char name[49];
            int i;
            //
            // Print out a heading
            //
    
            if (len > (word) pdu_getremlength()) {
    		len = (word) pdu_getremlength();
    		}
    
            pdu_heading("NetWare Service Advertising Protocol",len);
    
            pdu_showwordhex("Operation",TRUE);
    
            len = (len-2)/(2+48+4+6+2+2);
    
            while (len) {
                    pdu_blankline();
                    pdu_showwordhex("Service Type",TRUE);
                    pdu_getbytes(0,48,name);
                    name[48] = '\0';
                    for (i=47; i>0; i--) {
                            if (name[i] && !isprint(name[i])) name[i] =  '.';
                            }
                    pdu_sprintf(48,"%-30.30s = '%s'","Server Name",name);
                    pdu_showhexbytes("Network Address",4);
                    pdu_showhexbytes("Node Address",6);
                    pdu_showwordhex("Socket Number",TRUE);
                    pdu_showworddec("Hops to Server",TRUE);
                    len--;
                    }
    
            return 0;
    
    }
    
    
    
353.2JAMIN::WASSERJohn A. WasserMon Mar 31 1997 17:5825
> I suspect the calculation of 'len' is invalid in the code below:
> len = (len-2)/(2+48+4+6+2+2);

	That looks O.K. for calculating the number of services in
	the advertising packet.  The packet contains a two-byte 
	"packet type" followed by 1 to 7 services:

		{
		word	service_type;
		char	service_name[48];
		char	address_network[4];
		char	address_node[6];
		char	address_socket[2];
		word	hops;
		}


	What seems a little strange to me is:

            if (len > (word) pdu_getremlength())
		{
    		len = (word) pdu_getremlength();
    		}

	Could the "len" being passed in be set to a low value?
353.3PHYLUM::LichtenbergMitch LichtenbergFri Apr 04 1997 18:5825
>               <<< Note 353.2 by JAMIN::WASSER "John A. Wasser" >>>
    

> > I suspect the calculation of 'len' is invalid in the code below:
> > len = (len-2)/(2+48+4+6+2+2);
> 
> 	What seems a little strange to me is:
> 
>             if (len > (word) pdu_getremlength())
> 		{
>     		len = (word) pdu_getremlength();
>     		}
> 
> 	Could the "len" being passed in be set to a low value?
> 

    It could be - one way to fix this is for someone to send me a trace 
    that doesn't work - I'll add code to print out the length into the 
    detail window and verify that it is correct.
    
    You can email it from MS-Exchange to "mitch@pa.dec.com", or send me 
    an FTP or DECnet pointer.
    
    /Mitch.
        
353.4JAMIN::WASSERJohn A. WasserMon Apr 07 1997 18:494
> You can email it from MS-Exchange to "mitch@pa.dec.com", or send me 
> an FTP or DECnet pointer.

	What?  No MIME support?
353.5PHYLUM::LichtenbergMitch LichtenbergMon Apr 21 1997 23:3114
    
    John,

    Ahem - Yes, I do have mime support -- that's why you can send it to 
    'mitch@pa.dec.com' -- many people still send me mail on RANGER:: 
    (now JAMIN::), and things get lost that way...
    
    Other people cannot SEND MIME messages, if you're one of them, 
    you'll need to send me a FTP, DECnet, or URL or something.
    
    /Mitch.