Deleted Added
full compact
fddi.h (92725) fddi.h (93372)
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.com)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)if_fddi.h 8.1 (Berkeley) 6/10/93
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.com)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)if_fddi.h 8.1 (Berkeley) 6/10/93
36 * $FreeBSD: head/sys/net/fddi.h 92725 2002-03-19 21:54:18Z alfred $
36 * $FreeBSD: head/sys/net/fddi.h 93372 2002-03-29 08:27:48Z mdodd $
37 */
38
39#ifndef _NETINET_IF_FDDI_H_
40#define _NETINET_IF_FDDI_H_
41
37 */
38
39#ifndef _NETINET_IF_FDDI_H_
40#define _NETINET_IF_FDDI_H_
41
42/*
43 * Structure of an 100Mb/s FDDI header.
44 */
45struct fddi_header {
46 u_char fddi_fc;
47 u_char fddi_dhost[6];
48 u_char fddi_shost[6];
49};
50
51#define FDDIIPMTU 4352
52#define FDDIMTU 4470
53#define FDDIMIN 3
54
55#define FDDIFC_C 0x80 /* 0b10000000 */
56#define FDDIFC_L 0x40 /* 0b01000000 */
57#define FDDIFC_F 0x30 /* 0b00110000 */
58#define FDDIFC_Z 0x0F /* 0b00001111 */
42#define FDDIIPMTU 4352
43#define FDDIMTU 4470
44#define FDDIMIN 3
45
46#define FDDIFC_C 0x80 /* 0b10000000 */
47#define FDDIFC_L 0x40 /* 0b01000000 */
48#define FDDIFC_F 0x30 /* 0b00110000 */
49#define FDDIFC_Z 0x0F /* 0b00001111 */
50#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */
51#define FDDIFC_ZZZZ 0x0F /* Control bits */
59
52
53/*
54 * FDDI Frame Control values. (48-bit addressing only).
55 */
56#define FDDIFC_VOID 0x40 /* Void frame */
57#define FDDIFC_NRT 0x80 /* Nonrestricted token */
58#define FDDIFC_RT 0xc0 /* Restricted token */
59#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */
60#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */
60#define FDDIFC_LLC_ASYNC 0x50
61#define FDDIFC_LLC_PRIO0 0
62#define FDDIFC_LLC_PRIO1 1
63#define FDDIFC_LLC_PRIO2 2
64#define FDDIFC_LLC_PRIO3 3
65#define FDDIFC_LLC_PRIO4 4
66#define FDDIFC_LLC_PRIO5 5
67#define FDDIFC_LLC_PRIO6 6
68#define FDDIFC_LLC_PRIO7 7
61#define FDDIFC_LLC_ASYNC 0x50
62#define FDDIFC_LLC_PRIO0 0
63#define FDDIFC_LLC_PRIO1 1
64#define FDDIFC_LLC_PRIO2 2
65#define FDDIFC_LLC_PRIO3 3
66#define FDDIFC_LLC_PRIO4 4
67#define FDDIFC_LLC_PRIO5 5
68#define FDDIFC_LLC_PRIO6 6
69#define FDDIFC_LLC_PRIO7 7
69#define FDDIFC_LLC_SYNC 0xd0
70#define FDDIFC_LLC_SYNC 0xd0
71#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */
72#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */
70#define FDDIFC_SMT 0x40
73#define FDDIFC_SMT 0x40
74#define FDDIFC_SMT_INFO 0x41 /* SMT Info */
75#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */
76#define FDDIFC_MAC 0xc0 /* MAC frame */
71
77
78#define FDDI_ADDR_LEN 6
79#define FDDI_HDR_LEN (sizeof(struct fddi_header))
80
81/*
82 * Structure of an 100Mb/s FDDI header.
83 */
84struct fddi_header {
85 u_char fddi_fc;
86 u_char fddi_dhost[FDDI_ADDR_LEN];
87 u_char fddi_shost[FDDI_ADDR_LEN];
88};
89
72#if defined(_KERNEL)
73#define fddibroadcastaddr etherbroadcastaddr
74#define fddi_ipmulticast_min ether_ipmulticast_min
75#define fddi_ipmulticast_max ether_ipmulticast_max
76#define fddi_addmulti ether_addmulti
77#define fddi_delmulti ether_delmulti
78#define fddi_sprintf ether_sprintf
79
80void fddi_ifattach(struct ifnet *);
81void fddi_input(struct ifnet *, struct fddi_header *, struct mbuf *);
82int fddi_output(struct ifnet *,
83 struct mbuf *, struct sockaddr *, struct rtentry *);
84
90#if defined(_KERNEL)
91#define fddibroadcastaddr etherbroadcastaddr
92#define fddi_ipmulticast_min ether_ipmulticast_min
93#define fddi_ipmulticast_max ether_ipmulticast_max
94#define fddi_addmulti ether_addmulti
95#define fddi_delmulti ether_delmulti
96#define fddi_sprintf ether_sprintf
97
98void fddi_ifattach(struct ifnet *);
99void fddi_input(struct ifnet *, struct fddi_header *, struct mbuf *);
100int fddi_output(struct ifnet *,
101 struct mbuf *, struct sockaddr *, struct rtentry *);
102
85#endif
86
87#endif
103#endif /* _KERNEL */
104#endif /* _NET_FDDI_H_ */