Sync defines with NetBSD.

Define FDDI_ADDR_LEN and use it.
This commit is contained in:
mdodd 2002-03-29 08:27:48 +00:00
parent a236d39b78
commit f5718efee5

View File

@ -39,15 +39,6 @@
#ifndef _NETINET_IF_FDDI_H_
#define _NETINET_IF_FDDI_H_
/*
* Structure of an 100Mb/s FDDI header.
*/
struct fddi_header {
u_char fddi_fc;
u_char fddi_dhost[6];
u_char fddi_shost[6];
};
#define FDDIIPMTU 4352
#define FDDIMTU 4470
#define FDDIMIN 3
@ -56,7 +47,17 @@ struct fddi_header {
#define FDDIFC_L 0x40 /* 0b01000000 */
#define FDDIFC_F 0x30 /* 0b00110000 */
#define FDDIFC_Z 0x0F /* 0b00001111 */
#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */
#define FDDIFC_ZZZZ 0x0F /* Control bits */
/*
* FDDI Frame Control values. (48-bit addressing only).
*/
#define FDDIFC_VOID 0x40 /* Void frame */
#define FDDIFC_NRT 0x80 /* Nonrestricted token */
#define FDDIFC_RT 0xc0 /* Restricted token */
#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */
#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */
#define FDDIFC_LLC_ASYNC 0x50
#define FDDIFC_LLC_PRIO0 0
#define FDDIFC_LLC_PRIO1 1
@ -66,8 +67,25 @@ struct fddi_header {
#define FDDIFC_LLC_PRIO5 5
#define FDDIFC_LLC_PRIO6 6
#define FDDIFC_LLC_PRIO7 7
#define FDDIFC_LLC_SYNC 0xd0
#define FDDIFC_LLC_SYNC 0xd0
#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */
#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */
#define FDDIFC_SMT 0x40
#define FDDIFC_SMT_INFO 0x41 /* SMT Info */
#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */
#define FDDIFC_MAC 0xc0 /* MAC frame */
#define FDDI_ADDR_LEN 6
#define FDDI_HDR_LEN (sizeof(struct fddi_header))
/*
* Structure of an 100Mb/s FDDI header.
*/
struct fddi_header {
u_char fddi_fc;
u_char fddi_dhost[FDDI_ADDR_LEN];
u_char fddi_shost[FDDI_ADDR_LEN];
};
#if defined(_KERNEL)
#define fddibroadcastaddr etherbroadcastaddr
@ -82,6 +100,5 @@ void fddi_input(struct ifnet *, struct fddi_header *, struct mbuf *);
int fddi_output(struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *);
#endif
#endif
#endif /* _KERNEL */
#endif /* _NET_FDDI_H_ */