llc1.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* llc1 - an LLC Class 1 MUX compatible with SunConnect LLC2 uses DLPI
* interface.
*
* Copyrighted as an unpublished work.
* Copyright 1992-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_LLC1_H
#define _SYS_LLC1_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
struct llc_stats {
long llcs_nobuffer;
long llcs_multixmt;
long llcs_multircv; /* multicast but note broadcast */
long llcs_brdcstxmt;
long llcs_brdcstrcv;
long llcs_blocked; /* discard due to upstream being flow */
/* controlled */
long llcs_pktxmt;
long llcs_pktrcv;
long llcs_bytexmt;
long llcs_bytercv;
long llcs_xidxmt;
long llcs_xidrcv;
long llcs_testxmt;
long llcs_testrcv;
long llcs_ierrors;
long llcs_oerrors;
};
#define LLCS_NOBUFFER 0
#define LLCS_MULTIXMT 1
#define LLCS_MULTIRCV 2
#define LLCS_BRDCSTXMT 3
#define LLCS_BRDCSTRCV 4
#define LLCS_BLOCKED 5
#define LLCS_PKTXMT 6
#define LLCS_PKTRCV 7
#define LLCS_BYTEXMT 8
#define LLCS_BYTERCV 9
#define LLCS_XIDXMT 10
#define LLCS_XIDRCV 11
#define LLCS_TESTXMT 12
#define LLCS_TESTRCV 13
#define LLCS_IERRORS 14
#define LLCS_OERRORS 15
/* multicast structures */
typedef struct llc1_multicast_addr {
int llcm_refcnt; /* number of streams referring to */
/* entry */
unsigned char llcm_addr[ETHERADDRL];
} llc_mcast_t;
typedef
struct llc_mac_info {
long llcp_flags;
long llcp_maxpkt;
long llcp_minpkt;
long llcp_type;
long llcp_addrlen; /* usually 6 but could be 2 */
unsigned char llcp_macaddr[ETHERADDRL];
unsigned char llcp_broadcast[ETHERADDRL];
long llcp_lindex; /* link index for unlink */
long llcp_ppa; /* the PPA number */
long llcp_sap; /* when doing auto bind on lower */
/* stream */
long llcp_nstreams;
struct llc_stats llcp_stats;
/* flags for mac info (link) status */
typedef struct llc1 {
long llc_state;
long llc_style;
long llc_minor;
long llc_type;
long llc_sap;
long llc_waiting_for; /* DL request to lower layer */
long llc_flags; /* flags used for controlling things */
long llc_multicnt; /* number of multicast addresses for */
/* stream */
/* enabled */
struct llc_mac_info *llc_mac_info;
} llc1_t;
/* llc_flag bits */
typedef struct llc1device {
long llc1_status;
int llc1_minors;
int llc1_multisize;
/* layers */
int llc1_ndevice; /* number of devices linked */
int llc1_nextppa; /* number to use for next PPA default */
} llc1dev_t;
/* initialized */
/*
* definitions for debug tracing
*/
/*
* other definitions
*/
/*
* definitions for module_info
*/
#define LLC1IDNUM 0x8022
/* address format for unitdata */
struct llcaddr {
unsigned char llca_addr[ETHERADDRL];
unsigned char llca_sap;
};
struct llcsaddr {
unsigned char llca_saddr[ETHERADDRL];
unsigned short llca_ssap;
};
/*
* 802.2 specific declarations
*/
struct llchdr {
unsigned char llc_dsap;
unsigned char llc_ssap;
unsigned char llc_ctl;
};
struct llchdr_xid {
unsigned char llcx_format;
unsigned char llcx_class;
unsigned char llcx_window;
};
struct snaphdr {
};
#define LLC_UI 0x3
#define LLC_XID 0xAF
#define LLC_TEST 0xE3
#define LLC_NULL_SAP 0x00
/* Types can be or'd together */
/*
* special ioctl calls for SunSelect LLC2 conformance
*/
struct ll_snioc {
int lli_ppa;
int lli_index;
};
/*
*/
struct qelem {
/* rest of structure */
};
#ifdef __cplusplus
}
#endif
#endif /* _SYS_LLC1_H */