Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Jan 2001 21:20:46 +0300
From:      nms@otdel-1.org
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/24074: Properties of token-ring protocol must be separated from implementation
Message-ID:  <auto-000000670470@otdel-1.org>
Resent-Message-ID: <200101041830.f04IU2Q75462@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         24074
>Category:       kern
>Synopsis:       Properties of token-ring protocol must be separated from implementation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 04 10:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?auto-000000670470>