From nms@otdel-1.org  Thu Jan  4 10:20:50 2001
Return-Path: <nms@otdel-1.org>
Received: from otdel-1.org (Draculina.Otdel-1.ORG [195.230.65.30])
	by hub.freebsd.org (Postfix) with ESMTP id DDAFC37B402
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  4 Jan 2001 10:20:49 -0800 (PST)
Received: by otdel-1.org (CommuniGate Pro PIPE 3.4b7)
  with PIPE id 670470; Thu, 04 Jan 2001 21:20:46 +0300
Message-Id: <auto-000000670470@otdel-1.org>
Date: Thu, 04 Jan 2001 21:20:46 +0300
From: nms@otdel-1.org
Reply-To: nms@FreeBSD.ORG
To: FreeBSD-gnats-submit@freebsd.org
Subject: Properties of token-ring protocol must be separated from implementation
X-Send-Pr-Version: 3.2

>Number:         24074
>Category:       kern
>Synopsis:       Properties of token-ring protocol must be separated from implementation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mdodd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 04 10:30:01 PST 2001
>Closed-Date:    Fri Nov 16 04:14:24 UTC 2007
>Last-Modified:  Fri Nov 16 04:14:24 UTC 2007
>Originator:     Nikolai Saoukh
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

	

>Description:

As present src/sys/net/iso88025.h contains token-ring protocol properties and
implementation details. This is the problem for netgraph node implementations.

>How-To-Repeat:

	

>Fix:

--- src/sys/net/iso88025.h.orig	Tue Oct 31 19:18:36 2000
+++ src/sys/net/iso88025.h	Fri Nov  3 17:29:48 2000
@@ -96,27 +96,3 @@
 };
 
-struct iso88025_sockaddr_data {
-	u_char ether_dhost[ISO88025_ADDR_LEN];
-	u_char ether_shost[ISO88025_ADDR_LEN];
-	u_char ac;
-	u_char fc;
-};
-
-/*
- * Structure of a 48-bit iso 802.5 address.
- *  ( We could also add the 16 bit addresses as a union)
- */
-struct	iso88025_addr {
-	u_char octet[ISO88025_ADDR_LEN];
-};
-
-#define ISO88025_MAX_MTU	18000
-#define ISO88025_DEFAULT_MTU	1500
-#define senderr(e) { error = (e); goto bad;}
-
-void	iso88025_ifattach __P((struct ifnet *));
-int	iso88025_ioctl __P((struct ifnet *, int , caddr_t ));
-int	iso88025_output __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *));
-void	iso88025_input __P((struct ifnet *, struct iso88025_header *, struct mbuf *));
-
 #endif


--- src/sys/net/if_iso88025_var.h.orig	Sun Nov  5 14:16:28 2000
+++ src/sys/net/if_iso88025_var.h	Fri Nov  3 17:27:41 2000
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 1998, Larry Lile
+ * All rights reserved.
+ *
+ * For latest sources and information on this driver, please
+ * go to http://anarchy.stdio.com.
+ *
+ * Questions, comments or suggestions should be directed to
+ * Larry Lile <lile@stdio.com>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice unmodified, this list of conditions, and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Information gathered from tokenring@freebsd, /sys/net/ethernet.h and
+ * the Mach token ring driver.
+ */
+
+#ifndef _NET_IF_ISO88025VAR_H_
+#define _NET_IF_ISO88025VAR_H_
+
+struct iso88025_sockaddr_data {
+	u_char ether_dhost[ISO88025_ADDR_LEN];
+	u_char ether_shost[ISO88025_ADDR_LEN];
+	u_char ac;
+	u_char fc;
+};
+
+/*
+ * Structure of a 48-bit iso 802.5 address.
+ *  ( We could also add the 16 bit addresses as a union)
+ */
+struct	iso88025_addr {
+	u_char octet[ISO88025_ADDR_LEN];
+};
+
+#define ISO88025_MAX_MTU	18000
+#define ISO88025_DEFAULT_MTU	1500
+
+void	iso88025_ifattach(struct ifnet *);
+int	iso88025_ioctl(struct ifnet *, int , caddr_t);
+int	iso88025_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *);
+void	iso88025_input(struct ifnet *, struct iso88025_header *, struct mbuf *);
+
+#endif


--- src/sys/net/if_iso88025subr.c.orig	Tue Oct 31 20:43:17 2000
+++ src/sys/net/if_iso88025subr.c	Fri Nov  3 17:28:38 2000
@@ -62,4 +62,5 @@
 
 #include <net/iso88025.h>
+#include <net/if_iso88025_var.h>
 
 #ifdef INET
@@ -81,5 +82,6 @@
 
 #include <sys/kernel.h>
-#include <net/iso88025.h>
+
+#define senderr(e) { error = (e); goto bad;}
 
 void

>Release-Note:
>Audit-Trail:

From: Nikolai Saoukh <nms@otdel-1.org>
To: bug-followup@freebsd.org
Cc:  
Subject: kern/24074: Properties of token-ring protocol must be separated from implementation
Date: Wed, 7 Mar 2001 11:30:58 +0300

 Forgot about the drivers present. Sorry.
 
 --- src/sys/contrib/dev/oltr/if_oltr.c.orig	Wed Mar  7 11:14:33 2001
 +++ src/sys/contrib/dev/oltr/if_oltr.c	Wed Mar  7 11:15:28 2001
 @@ -48,7 +48,7 @@
  #include <net/ethernet.h>
  #include <net/if_dl.h>
  #include <net/if_media.h>
 -#include <net/iso88025.h>
 +#include <net/if_iso88025_var.h>
  
  #if (__FreeBSD_version < 400000)
  #include <bpfilter.h>
State-Changed-From-To: open->closed 
State-Changed-By: mdodd 
State-Changed-When: Wed Mar 7 17:39:08 PST 2001 
State-Changed-Why:  
Committed.  Will MFC later. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24074 
State-Changed-From-To: closed->open 
State-Changed-By: mdodd 
State-Changed-When: Wed Mar 7 17:53:26 PST 2001 
State-Changed-Why:  
Closed wrong PR. 
I'll get around to this one in a bit. 


Responsible-Changed-From-To: freebsd-bugs->mdodd 
Responsible-Changed-By: mdodd 
Responsible-Changed-When: Wed Mar 7 17:53:26 PST 2001 
Responsible-Changed-Why:  
I'll take care of this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24074 
State-Changed-From-To: open->closed 
State-Changed-By: kmacy 
State-Changed-When: Fri Nov 16 04:13:46 UTC 2007 
State-Changed-Why:  

Not considered worth MFCing. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24074 
>Unformatted:
