Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 1998 10:02:54 -0400 (EDT)
From:      "Larry S. Lile" <lile@stdio.com>
To:        "Matthew N. Dodd" <winter@jurai.net>, tokenring@FreeBSD.ORG
Subject:   Re: code updated
Message-ID:  <Pine.SUN.3.91.980422095212.22047A-200000@heathers2.stdio.com>
In-Reply-To: <Pine.SUN.3.91.980422084236.21004A-100000@heathers2.stdio.com>

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

[-- Attachment #1 --]


On Wed, 22 Apr 1998, Larry S. Lile wrote:

> Also I should be putting out a first effort at a /sys/net/is088025.h
> shortly which should contain most of the constants and such for 802.5.

As promised... but would everybody please glance it over and make
sure I haven't made any serious errors.

Larry
lile@stdio.com

PS: File attached inline in uu for those with strange mailers, sorry for
the excess space.

begin 666 iso88025.h
M+RH*("H@0V]P>7)I9VAT("AC*2 Q.3DX+"!,87)R>2!,:6QE"B J($%L;"!R
M:6=H=',@<F5S97)V960N"B J"B J(%)E9&ES=')I8G5T:6]N(&%N9"!U<V4@
M:6X@<V]U<F-E(&%N9"!B:6YA<GD@9F]R;7,L('=I=&@@;W(@=VET:&]U= H@
M*B!M;V1I9FEC871I;VXL(&%R92!P97)M:71T960@<')O=FED960@=&AA="!T
M:&4@9F]L;&]W:6YG(&-O;F1I=&EO;G,*("H@87)E(&UE=#H*("H@,2X@4F5D
M:7-T<FEB=71I;VYS(&]F('-O=7)C92!C;V1E(&UU<W0@<F5T86EN('1H92!A
M8F]V92!C;W!Y<FEG:'0*("H@(" @;F]T:6-E('5N;6]D:69I960L('1H:7,@
M;&ES="!O9B!C;VYD:71I;VYS+"!A;F0@=&AE(&9O;&QO=VEN9PH@*B @("!D
M:7-C;&%I;65R+@H@*B R+B!2961I<W1R:6)U=&EO;G,@:6X@8FEN87)Y(&9O
M<FT@;75S="!R97!R;V1U8V4@=&AE(&%B;W9E(&-O<'ER:6=H= H@*B @("!N
M;W1I8V4L('1H:7,@;&ES="!O9B!C;VYD:71I;VYS(&%N9"!T:&4@9F]L;&]W
M:6YG(&1I<V-L86EM97(@:6X@=&AE"B J(" @(&1O8W5M96YT871I;VX@86YD
M+V]R(&]T:&5R(&UA=&5R:6%L<R!P<F]V:61E9"!W:71H('1H92!D:7-T<FEB
M=71I;VXN"B J"B J(%1(25,@4T]&5%=!4D4@25,@4%)/5DE$140@0ED@5$A%
M($%55$A/4B!!3D0@0T].5%))0E543U)3(&!@05,@25,G)R!!3D0*("H@04Y9
M($584%)%4U,@3U(@24U03$E%1"!705)204Y42453+"!)3D-,541)3D<L($)5
M5"!.3U0@3$E-251%1"!43RP@5$A%"B J($E-4$Q)140@5T%24D%.5$E%4R!/
M1B!-15)#2$%.5$%"24Q)5%D@04Y$($9)5$Y%4U,@1D]2($$@4$%25$E#54Q!
M4B!055)03U-%"B J($%212!$25-#3$%)345$+B @24X@3D\@159%3E0@4TA!
M3$P@5$A%($%55$A/4B!/4B!#3TY44DE"551/4E,@0D4@3$E!0DQ%"B J($9/
M4B!!3ED@1$E214-4+"!)3D1)4D5#5"P@24Y#241%3E1!3"P@4U!%0TE!3"P@
M15A%35!,05)9+"!/4B!#3TY315%514Y424%,"B J($1!34%'15,@*$E.0TQ5
M1$E.1RP@0E54($Y/5"!,24U)5$5$(%1/+"!04D]#55)%345.5"!/1B!354)3
M5$E4551%($=/3T13"B J($]2(%-%4E9)0T53.R!,3U-3($]&(%5312P@1$%4
M02P@3U(@4%)/1DE44SL@3U(@0E5324Y%4U,@24Y415)255!424].*0H@*B!(
M3U=%5D52($-!55-%1"!!3D0@3TX@04Y9(%1(14]262!/1B!,24%"24Q)5%DL
M(%=(151(15(@24X@0T].5%)!0U0L(%-44DE#5 H@*B!,24%"24Q)5%DL($]2
M(%1/4E0@*$E.0TQ51$E.1R!.14=,24=%3D-%($]2($]42$525TE312D@05))
M4TE.1R!)3B!!3ED@5T%9"B J($]55"!/1B!42$4@55-%($]&(%1(25,@4T]&
M5%=!4D4L($5614X@248@041625-%1"!/1B!42$4@4$]34TE"24Q)5%D@3T8*
M("H@4U5#2"!$04U!1T4N"B J"B J("1)9#H@:7-O.#@P,C4N:"QV(#$N,2 Q
M.3DX+S T+S(R(#$S.C0Y.C(P(&QI;&4@17AP("0*("H*("H@26YF;W)M871I
M;VX@9V%T:&5R960@9G)O;2!T;VME;G)I;F= 9G)E96)S9"P@+W-Y<R]N970O
M971H97)N970N:"!A;F0*("H@=&AE($UA8V@@=&]K96X@<FEN9R!D<FEV97(N
M"B J+PH*+RH*("H@1G5N9&%M96YT86P@8V]N<W1A;G1S(')E;&%T:6YG('1O
M(&ES;R X,#(N-0H@*B\*"B-I9FYD968@7TY%5%])4T\X.# R-5](7PHC9&5F
M:6YE(%].151?25-/.#@P,C5?2%\*"B\J"B J(%1H92!N=6UB97(@;V8@8GET
M97,@:6X@86X@:7-O(#@P,BXU("A-04,I(&%D9')E<W,N"B J+PHC9&5F:6YE
M($E33S@X,#(U7T%$1%)?3$5.(" @(" @(#8*"B\J"B J(%1H92!N=6UB97(@
M;V8@8GET97,@:6X@=&AE('1Y<&4@9FEE;&0N"B J("@@9&\@=V4@<F5A;&QY
M(&YE960@=&AI<R!O<B!I<R!E=&AE<E]T>7!E(&IU<W0@971H97)?='EP92 _
M("D*("HO"B-D969I;F4@25-/.#@P,C5?5%E015],14X@(" @(" @,@H*+RH*
M("H@3G5M8F5R(&]F(&)Y=&5S(&YE961E9"!F;W(@<V]U<F-E(')O=71I;F<@
M:6YF;W)M871I;VXN"B J+PHC9&5F:6YE($E33S@X,#(U7U)#1E],14X@(" @
M(" @(#(*(V1E9FEN92!)4T\X.# R-5]2249?3$5.(" @(" @(" Q-@H*+RH*
M("H@5&AE(&QE;F=T:"!O9B!T:&4@8V]M8FEN960@:&5A9&5R+@H@*B\*(V1E
M9FEN92!)4T\X.# R-5](1%)?3$5.(" @(" @(" H25-/.#@P,C5?041$4E],
M14XJ,BM)4T\X.# R-5]465!%7TQ%3BL@7 H@(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @("!)4T\X.# R-5]20T9?3$5.*TE33S@X,#(U7U))1E],
M14XI"@HO*@H@*B!4:&4@;6EN:6UU;2!P86-K970@;&5N9W1H+@H@*B\*(V1E
M9FEN92!)4T\X.# R-5]-24Y?3$5.(" @(" @(" P("\J(%1H:7,@;V9F96YD
M<R!M>2!M;W)A;&ET>2 J+PH*+RH*("H@5&AE(&UA>&EM=6T@<&%C:V5T(&QE
M;F=T:"X*("HO"B-D969I;F4@25-/.#@P,C5?34%87TQ%3B @(" @(" @,3<Y
M-C @(" *"B\J"B J($$@;6%C<F\@=&\@=F%L:61A=&4@82!L96YG=&@@=VET
M: H@*B\*(V1E9FEN92!)4T\X.# R-5])4U]604Q)1%],14XH9F]O*2 @(" @
M(%P*(" @(" @(" H*&9O;RD@/CT@25-/.#@P,C5?34E.7TQ%3B F)B H9F]O
M*2 \/2!)4T\X.# R-5]-05A?3$5.*0H*+RH*("H@25-/(#@P,BXU('!H>7-I
M8V%L(&AE861E<B J+PH@*B\*<W1R=6-T(&ES;S@X,#(U7VAE860@>PH@(" @
M(" @('5?8VAA<B @(&%C.R @(" @+RH@86-C97-S(&-O;G1R;VP@9FEE;&0@
M*B\*(" @(" @("!U7V-H87(@("!F8SL@(" @("\J(&9R86UE(&-O;G1R;VP@
M9FEE;&0@*B\*(" @(" @("!U7V-H87(@("!I<V\X.# R-5]D:&]S=%M)4T\X
M.# R-5]!1$127TQ%3ET[(" @(" O*B!D97-T:6YA=&EO;B!A9&1R97-S("HO
M"B @(" @(" @=5]C:&%R(" @:7-O.#@P,C5?<VAO<W1;25-/.#@P,C5?041$
M4E],14Y=.R @(" @+RH@<V]U<F-E(&%D9')E<W,@*B\*(" @(" @("!U7W-H
M;W)T("!R8V8[(" @("\J(')O=71E(&-O;G1R;VP@9FEE;&0@*B\*(" @(" @
M("!U7W-H;W)T("!R<V5G6SA=.R\J(')O=71I;F<@<F5G:7-T97)S("HO"GT[
M"@HO*@H@*B!)4T\@.# R+C4@3$Q#('-T<G5C='5R92 J+PH@*B\*<W1R=6-T
M('1R7VQL8R!["B @(" @(" @=5]C:&%R(" @9'-A<#L@(" O*B!D97-T:6YA
M=&EO;B!305 @*B\*(" @(" @("!U7V-H87(@("!S<V%P.R @("\J('-O=7)C
M92!305 @*B\*(" @(" @("!U7V-H87(@("!L;&,[(" @("\J($Q,0R!C;VYT
M<F]L(&9I96QD("HO"B @(" @(" @=5]C:&%R(" @<')O=&ED6S-=.R @(" @
M("\J('!R;W1O8V]L(&ED("HO"B @(" @(" @=5]S:&]R=" @971H97)?='EP
M93L@(" @(" O*B!86%@@971H97(@='EP92!F:65L9" J+PI].PH*+RH*("H@
M4W1R=6-T=7)E(&]F(&$@-#@M8FET(&ES;R X,#(N-2!A9&1R97-S+@H@*B @
M*"!792!C;W5L9"!A;'-O(&%D9"!T:&4@,38@8FET(&%D9')E<W-E<R!A<R!A
M('5N:6]N*0H@*B\*<W1R=6-T("!E=&AE<E]A9&1R('L*(" @(" @("!U7V-H
I87(@;V-T971;25-/.#@P,C5?041$4E],14Y=.PI].PH*(V5N9&EF"@IU
 
end



[-- Attachment #2 --]
/*
 * Copyright (c) 1998, Larry Lile
 * All rights reserved.
 *
 * 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.
 *
 * $Id: iso88025.h,v 1.1 1998/04/22 13:49:20 lile Exp $
 *
 * Information gathered from tokenring@freebsd, /sys/net/ethernet.h and
 * the Mach token ring driver.
 */

/*
 * Fundamental constants relating to iso 802.5
 */

#ifndef _NET_ISO88025_H_
#define _NET_ISO88025_H_

/*
 * The number of bytes in an iso 802.5 (MAC) address.
 */
#define ISO88025_ADDR_LEN       6

/*
 * The number of bytes in the type field.
 * ( do we really need this or is ether_type just ether_type ? )
 */
#define ISO88025_TYPE_LEN       2

/*
 * Number of bytes needed for source routing information.
 */
#define ISO88025_RCF_LEN        2
#define ISO88025_RIF_LEN        16

/*
 * The length of the combined header.
 */
#define ISO88025_HDR_LEN        (ISO88025_ADDR_LEN*2+ISO88025_TYPE_LEN+ \
                                 ISO88025_RCF_LEN+ISO88025_RIF_LEN)

/*
 * The minimum packet length.
 */
#define ISO88025_MIN_LEN        0 /* This offends my morality */

/*
 * The maximum packet length.
 */
#define ISO88025_MAX_LEN        17960   

/*
 * A macro to validate a length with
 */
#define ISO88025_IS_VALID_LEN(foo)      \
        ((foo) >= ISO88025_MIN_LEN && (foo) <= ISO88025_MAX_LEN)

/*
 * ISO 802.5 physical header */
 */
struct iso88025_head {
        u_char   ac;     /* access control field */
        u_char   fc;     /* frame control field */
        u_char   iso88025_dhost[ISO88025_ADDR_LEN];     /* destination address */
        u_char   iso88025_shost[ISO88025_ADDR_LEN];     /* source address */
        u_short  rcf;    /* route control field */
        u_short  rseg[8];/* routing registers */
};

/*
 * ISO 802.5 LLC structure */
 */
struct tr_llc {
        u_char   dsap;   /* destination SAP */
        u_char   ssap;   /* source SAP */
        u_char   llc;    /* LLC control field */
        u_char   protid[3];      /* protocol id */
        u_short  ether_type;      /* XXX ether type field */
};

/*
 * Structure of a 48-bit iso 802.5 address.
 *  ( We could also add the 16 bit addresses as a union)
 */
struct  ether_addr {
        u_char octet[ISO88025_ADDR_LEN];
};

#endif


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.980422095212.22047A-200000>