#ifndef _SYS_LLC1_H
#define _SYS_LLC1_H
#ifdef __cplusplus
extern "C" {
#endif
struct llc_stats {
long llcs_nobuffer;
long llcs_multixmt;
long llcs_multircv;
long llcs_brdcstxmt;
long llcs_brdcstrcv;
long llcs_blocked;
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
typedef struct llc1_multicast_addr {
int llcm_refcnt;
unsigned char llcm_addr[ETHERADDRL];
} llc_mcast_t;
#define LLC1_MAX_MULTICAST 16
typedef
struct llc_mac_info {
struct llc_mac_info *llcp_next, *llcp_prev;
long llcp_flags;
long llcp_maxpkt;
long llcp_minpkt;
long llcp_type;
long llcp_addrlen;
unsigned char llcp_macaddr[ETHERADDRL];
unsigned char llcp_broadcast[ETHERADDRL];
queue_t *llcp_queue;
long llcp_lindex;
long llcp_ppa;
long llcp_sap;
mblk_t *llcp_data;
queue_t *llcp_lqtop;
mblk_t *llcp_mb;
long llcp_nstreams;
llc_mcast_t *llcp_mcast;
struct llc_stats llcp_stats;
kstat_t *llcp_kstatp;
uint_t llcp_iocid;
} llc_mac_info_t;
#define LLC1_LINKED 0x0001
#define LLC1_AVAILABLE 0x0002
#define LLC1_INFO_WAIT 0x0004
#define LLC1_DEF_PPA 0x0008
#define LLC1_RAW_WAIT 0x0010
#define LLC1_USING_RAW 0x0020
#define LLC1_AUTO_XID 0x0040
#define LLC1_AUTO_TEST 0x0080
#define LLC1_BINDING 0x0100
typedef struct llc1 {
struct llc1 *llc_next, *llc_prev;
mblk_t *llc_mb;
long llc_state;
long llc_style;
long llc_minor;
long llc_type;
long llc_sap;
uchar_t llc_snap[5];
long llc_waiting_for;
long llc_flags;
long llc_multicnt;
llc_mcast_t **llc_mcast;
queue_t *llc_qptr;
kmutex_t llc_lock;
struct llc_mac_info *llc_mac_info;
struct llc_stats *llc_stats;
} llc1_t;
#define LLC_RAW 0x0001
#define LLC_FAST 0x0002
#define LLC_PROM 0x0004
#define LLC_SNAP 0x0008
#define LLC_SNAP_OID 0x0010
typedef struct llc1device {
long llc1_status;
krwlock_t llc1_rwlock;
int llc1_minors;
int llc1_multisize;
llc_mac_info_t *llc1_mac_next, *llc1_mac_prev;
int llc1_ndevice;
int llc1_nextppa;
llc1_t *llc1_str_next, *llc1_str_prev;
} llc1dev_t;
#define LLC1_ATTACHED 0x0001
#define LLCTRACE 0x0001
#define LLCERRS 0x0002
#define LLCRECV 0x0004
#define LLCSEND 0x0008
#define LLCPROT 0x0010
#define LLCE_OK -1
#define LLCE_NOBUFFER 0x1001
#define LLC1IDNUM 0x8022
#define LLC1_HIWATER 32000
#define LLC1_LOWATER 4096
#define LLC1_DEFMAX 4096
struct llcaddr {
unsigned char llca_addr[ETHERADDRL];
unsigned char llca_sap;
};
#define LLCADDR(p, offset) ((struct llcaddr *)(((caddr_t)(p))+(offset)))
struct llcsaddr {
unsigned char llca_saddr[ETHERADDRL];
unsigned short llca_ssap;
};
#define LLCSADDR(p, offset) ((struct llcsaddr *)(((caddr_t)(p))+(offset)))
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 {
uchar_t snap_oid[3];
uchar_t snap_type[2];
};
#define LLC_UI 0x3
#define LLC_XID 0xAF
#define LLC_TEST 0xE3
#define LLC_P 0x10
#define LLC_XID_FMTID 0x81
#define LLC_SERVICES 0x01
#define LLC_GLOBAL_SAP 0XFF
#define LLC_NULL_SAP 0x00
#define LLC_SNAP_SAP 0xAA
#define LLC_GROUP_ADDR 0x01
#define LLC_RESPONSE 0x01
#define LLC_NOVELL_SAP -1
#define LLC_XID_INFO_SIZE 3
#define LLC_XID_CLASS_I (0x01)
#define LLC_XID_CLASS_II (0x03)
#define LLC_XID_CLASS_III (0x05)
#define LLC_XID_CLASS_IV (0x07)
#define LLC_XID_TYPE_1 (0x01)
#define LLC_XID_TYPE_2 (0x02)
#define LLC_XID_TYPE_3 (0x04)
#define LLC1_CSMACD_HDR_SIZE (2*ETHERADDRL+2)
#define ismulticast(cp) ((*(caddr_t)(cp)) & 0x01)
#define L_GETPPA (('L'<<8)|1)
#define L_SETPPA (('L'<<8)|2)
#define L_GETSTATS (('L'<<8)|5)
#define L_ZEROSTATS (('L'<<8)|6)
#define LI_SPPA 0x02
struct ll_snioc {
uchar_t lli_type;
uchar_t lli_spare[3];
int lli_ppa;
int lli_index;
};
struct qelem {
struct qelem *q_forw;
struct qelem *q_back;
};
#ifdef __cplusplus
}
#endif
#endif