drivers/net/fddi/skfp/h/smt.h

Source file repositories/reference/linux-study-clean/drivers/net/fddi/skfp/h/smt.h

File Facts

System
Linux kernel
Corpus path
drivers/net/fddi/skfp/h/smt.h
Extension
.h
Size
23279 bytes
Lines
877
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct smt_sid {
	u_char	sid_oem[2] ;			/* implementation spec. */
	struct fddi_addr sid_node ;		/* node address */
} ;

typedef u_char	t_station_id[8] ;

/*
 * note on alignment :
 * sizeof(struct smt_header) = 32
 * all parameters are long aligned
 * if struct smt_header starts at offset 0, all longs are aligned correctly
 * (FC starts at offset 3)
 */
_packed struct smt_header {
	struct fddi_addr    	smt_dest ;	/* destination address */
	struct fddi_addr	smt_source ;	/* source address */
	u_char			smt_class ;	/* NIF, SIF ... */
	u_char			smt_type ;	/* req., response .. */
	u_short			smt_version ;	/* version id */
	u_int			smt_tid ;	/* transaction ID */
	struct smt_sid		smt_sid ;	/* station ID */
	u_short			smt_pad ;	/* pad with 0 */
	u_short			smt_len ;	/* length of info field */
} ;
#define SWAP_SMTHEADER	"662sl8ss"

#if	0
/*
 * MAC FC values
 */
#define FC_SMT_INFO	0x41		/* SMT info */
#define FC_SMT_NSA	0x4f		/* SMT Next Station Addressing */
#endif


/*
 * type codes
 */
#define SMT_ANNOUNCE	0x01		/* announcement */
#define SMT_REQUEST	0x02		/* request */
#define SMT_REPLY	0x03		/* reply */

/*
 * class codes
 */
#define SMT_NIF		0x01		/* neighbor information frames */
#define SMT_SIF_CONFIG	0x02		/* station information configuration */
#define SMT_SIF_OPER	0x03		/* station information operation */
#define SMT_ECF		0x04		/* echo frames */
#define SMT_RAF		0x05		/* resource allocation */
#define SMT_RDF		0x06		/* request denied */
#define SMT_SRF		0x07		/* status report */
#define SMT_PMF_GET	0x08		/* parameter management get */
#define SMT_PMF_SET	0x09		/* parameter management set */
#define SMT_ESF		0xff		/* extended service */

#define SMT_MAX_ECHO_LEN	4458	/* max length of SMT Echo */
#if	defined(CONC) || defined(CONC_II)
#define SMT_TEST_ECHO_LEN	50	/* test length of SMT Echo */
#else
#define SMT_TEST_ECHO_LEN	SMT_MAX_ECHO_LEN	/* test length */
#endif

#define SMT_MAX_INFO_LEN	(4352-20)	/* max length for SMT info */


/*
 * parameter types
 */

struct smt_para {
	u_short	p_type ;		/* type */
	u_short	p_len ;			/* length of parameter */
} ;

#define PARA_LEN	(sizeof(struct smt_para))

#define SMTSETPARA(p,t)		(p)->para.p_type = (t),\
				(p)->para.p_len = sizeof(*(p)) - PARA_LEN

/*
 * P01 : Upstream Neighbor Address, UNA
 */
#define SMT_P_UNA	0x0001		/* upstream neighbor address */
#define SWAP_SMT_P_UNA	"s6"

struct smt_p_una {
	struct smt_para	para ;		/* generic parameter header */
	u_short	una_pad ;

Annotation

Implementation Notes