phase2.h revision 15885
115885Sjulian/*
215885Sjulian * Copyright (c) 1990,1991 Regents of The University of Michigan.
315885Sjulian * All Rights Reserved.
415885Sjulian */
515885Sjulian
615885Sjulian# if defined( ultrix ) || defined( BSD4_4 )
715885Sjulian#include <net/if_llc.h>
815885Sjulian#  if defined( __FreeBSD__ )
915885Sjulian#define llc_org_code llc_un.type_snap.org_code
1015885Sjulian#define llc_ether_type llc_un.type_snap.ether_type
1115885Sjulian#  endif __FreeBSD__
1215885Sjulian# else ultrix BSD4_4
1315885Sjulian
1415885Sjulian#ifdef sun
1515885Sjulian#include <net/if_ieee802.h>
1615885Sjulian#endif sun
1715885Sjulian
1815885Sjulian/*
1915885Sjulian * Copyright (c) 1988 Regents of the University of California.
2015885Sjulian * All rights reserved.
2115885Sjulian *
2215885Sjulian *      @(#)if_llc.h	7.2 (Berkeley) 6/28/90
2315885Sjulian */
2415885Sjulian
2515885Sjulian/*
2615885Sjulian * IEEE 802.2 Link Level Control headers, for use in conjunction with
2715885Sjulian * 802.{3,4,5} media access control methods.
2815885Sjulian *
2915885Sjulian * Headers here do not use bit fields due to shortcommings in many
3015885Sjulian * compilers.
3115885Sjulian */
3215885Sjulian
3315885Sjulianstruct llc {
3415885Sjulian	u_char	llc_dsap;
3515885Sjulian	u_char	llc_ssap;
3615885Sjulian	union {
3715885Sjulian	    struct {
3815885Sjulian		u_char control;
3915885Sjulian		u_char format_id;
4015885Sjulian		u_char class;
4115885Sjulian		u_char window_x2;
4215885Sjulian	    } type_u;
4315885Sjulian	    struct {
4415885Sjulian		u_char num_snd_x2;
4515885Sjulian		u_char num_rcv_x2;
4615885Sjulian	    } type_i;
4715885Sjulian	    struct {
4815885Sjulian		u_char control;
4915885Sjulian		u_char num_rcv_x2;
5015885Sjulian	    } type_s;
5115885Sjulian	    struct {
5215885Sjulian		u_char control;
5315885Sjulian		u_char org_code[3];
5415885Sjulian		u_short ether_type;
5515885Sjulian	    } type_snap;
5615885Sjulian	} llc_un;
5715885Sjulian};
5815885Sjulian#define llc_control llc_un.type_u.control
5915885Sjulian#define llc_fid llc_un.type_u.format_id
6015885Sjulian#define llc_class llc_un.type_u.class
6115885Sjulian#define llc_window llc_un.type_u.window_x2
6215885Sjulian#define llc_org_code llc_un.type_snap.org_code
6315885Sjulian#define llc_ether_type llc_un.type_snap.ether_type
6415885Sjulian
6515885Sjulian#define LLC_UI		0x3
6615885Sjulian#define LLC_UI_P	0x13
6715885Sjulian#define LLC_XID		0xaf
6815885Sjulian#define LLC_XID_P	0xbf
6915885Sjulian#define LLC_TEST	0xe3
7015885Sjulian#define LLC_TEST_P	0xf3
7115885Sjulian
7215885Sjulian#define LLC_ISO_LSAP	0xfe
7315885Sjulian#define LLC_SNAP_LSAP	0xaa
7415885Sjulian
7515885Sjulian# endif ultrix BSD4_4
7615885Sjulian
7715885Sjulian#if defined( sun ) || defined( ibm032 )
7815885Sjulian#define SIOCPHASE1	_IOW(i, 100, struct ifreq)	/* AppleTalk phase 1 */
7915885Sjulian#define SIOCPHASE2	_IOW(i, 101, struct ifreq)	/* AppleTalk phase 2 */
8015885Sjulian#endif sun ibm032
8115885Sjulian
8215885Sjulian#if defined( ultrix ) || defined( BSD4_4 ) || defined( _IBMR2 )
8315885Sjulian#define SIOCPHASE1	_IOW('i', 100, struct ifreq)	/* AppleTalk phase 1 */
8415885Sjulian#define SIOCPHASE2	_IOW('i', 101, struct ifreq)	/* AppleTalk phase 2 */
8515885Sjulian#endif ultrix BSD4_4 _IBMR2
86