From perlsta@fang.cs.sunyit.edu  Sun Feb 22 02:16:10 1998
Received: from fang.cs.sunyit.edu (perlsta@fang.cs.sunyit.edu [192.52.220.66])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA12949
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 Feb 1998 02:16:09 -0800 (PST)
          (envelope-from perlsta@fang.cs.sunyit.edu)
Received: (from perlsta@localhost) by fang.cs.sunyit.edu (8.8.5/8.7.3) id GAA13839; Sun, 22 Feb 1998 06:17:57 GMT
Message-Id: <199802220617.GAA13839@fang.cs.sunyit.edu>
Date: Sun, 22 Feb 1998 06:17:57 GMT
From: perlsta@cs.sunyit.edu
Reply-To: perlsta@cs.sunyit.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: some problems in /usr/inlcude/net/*
X-Send-Pr-Version: 3.2

>Number:         5815
>Category:       misc
>Synopsis:       possible breakage in header files?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 22 02:20:01 PST 1998
>Closed-Date:    Sun Apr 26 05:07:21 PDT 1998
>Last-Modified:  Sun Apr 26 05:07:35 PDT 1998
>Originator:     Alfred Perlstein
>Release:        FreeBSD 3.0-current i386
>Organization:
student at SunyIT
>Environment:
3.0-current
	

>Description:
	the header file /usr/include/net/sl_var.h is broken (sort of)
	the 2.2-stable version of this file has part of a structure #ifdef'd out if NET is undefined, however it is flagged with a /* XXX */ meaning bad, like so:

#ifdef INET                             /* XXX */
        struct  slcompress sc_comp;     /* tcp compression data */
#endif  

	however the newer file in 3.0-current doesn't have the surrounding #ifdef/#endif, this causes some sort of problems because now programs must include "slcompress.h" to have the "struct slcompress" defined... slcompress.h also has problems:

at the top of slcompress.h there is a line:
#define MAX_HDR MLEN            /* XXX 4bsd-ism: should really be 128 */   

and later on:
struct cstate {
        struct cstate *cs_next; /* next most recently used cstate (xmit only) */
        u_short cs_hlen;        /* size of hdr (receive only) */
        u_char cs_id;           /* connection # associated with this state */
        u_char cs_filler;
        union {
                char csu_hdr[MAX_HDR];
                struct ip csu_ip;       /* ip/tcp hdr from most recent packet */
        } slcs_u;
};               

the problem is that MLEN seems undeclared anywhere else.    
as well as the fact that "struct ip" is also declared within another header file...
(arrrrrgh!)
i don't know what fix to suggest as i'm sure this was all done for a reason, but it does need some sort of reworking cause it's causeing problems.



>How-To-Repeat:
try to compile "trafshow" from the ports:  /usr/ports/net/trafshow
	

>Fix:
hmmmmm, but back the "incorrect" #ifdef in if_slvar.h from 2.2-stable
otherwise i'm clueless about how to fix.
	

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->bde 
Responsible-Changed-By: jkh 
Responsible-Changed-When: Sun Feb 22 02:22:12 PST 1998 
Responsible-Changed-Why:  
Bruce is Mr. Header files. 
Responsible-Changed-From-To: bde->freebsd-ports 
Responsible-Changed-By: bde 
Responsible-Changed-When: Sat Feb 28 22:11:05 PST 1998 
Responsible-Changed-Why:  
The bug is probably in trafshow.  trafshow probably shouldn't include 
if_slvar.h, since it doesn't seem to be actually used. 
State-Changed-From-To: open->closed 
State-Changed-By: jseger 
State-Changed-When: Sun Apr 26 05:07:21 PDT 1998 
State-Changed-Why:  
Fixed in latest trafshow port. 
>Unformatted:
Alfred Perlstein
