⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlpi.h

📁 VRTX 商用嵌入式实时操作系统
💻 H
📖 第 1 页 / 共 3 页
字号:
		long	dl_disc_prob;	/* probability of provider init DISC */
		long	dl_reset_prob;	/* probability of provider init RESET */
} dl_resilience_t;


/*
 * QOS type definition to be used for negotiation with the
 * remote end of a connection, or a connectionless unitdata request.
 * There are two type definitions to handle the negotiation 
 * process at connection establishment. The typedef dl_qos_range_t
 * is used to present a range for parameters. This is used
 * in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
 * dl_qos_sel_t is used to select a specific value for the QOS
 * parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
 * and DL_INFO_ACK messages to define the selected QOS parameters
 * for a connection.
 *
 * NOTE
 *	A DataLink provider which has unknown values for any of the fields
 *	will use a value of DL_UNKNOWN for all values in the fields.
 *
 * NOTE
 *	A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
 *	provider the user requesting this value doesn't care 
 *	what the QOS parameter is set to. This value becomes the
 *	least possible value in the range of QOS parameters.
 *	The order of the QOS parameter range is then:
 *
 *		DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
 */
#define DL_UNKNOWN		-1
#define DL_QOS_DONT_CARE	-2

/*
 * Every QOS structure has the first 4 bytes containing a type
 * field, denoting the definition of the rest of the structure.
 * This is used in the same manner has the dl_primitive variable
 * is in messages.
 *
 * The following list is the defined QOS structure type values and structures.
 */
#define DL_QOS_CO_RANGE1	0x0101	/* QOS range struct. for Connection modeservice */
#define DL_QOS_CO_SEL1		0x0102	/* QOS selection structure */
#define DL_QOS_CL_RANGE1	0x0103	/* QOS range struct. for connectionless*/
#define DL_QOS_CL_SEL1		0x0104	/* QOS selection for connectionless mode*/

typedef struct {
		ulong		dl_qos_type;
		dl_through_t	dl_rcv_throughput;  /* desired and acceptable*/
		dl_transdelay_t	dl_rcv_trans_delay; /* desired and acceptable*/
		dl_through_t	dl_xmt_throughput;
		dl_transdelay_t	dl_xmt_trans_delay;
		dl_priority_t	dl_priority;	    /* min and max values */
		dl_protect_t	dl_protection;	    /* min and max values */
		long		dl_residual_error;
		dl_resilience_t	dl_resilience;
}	dl_qos_co_range1_t;

typedef struct {
		ulong		dl_qos_type;
		long		dl_rcv_throughput;
		long		dl_rcv_trans_delay;
		long		dl_xmt_throughput;
		long		dl_xmt_trans_delay;
		long		dl_priority;
		long		dl_protection;
		long		dl_residual_error;
		dl_resilience_t	dl_resilience;
}	dl_qos_co_sel1_t;

typedef struct {
		ulong		dl_qos_type;
		dl_transdelay_t	dl_trans_delay;
		dl_priority_t	dl_priority;
		dl_protect_t	dl_protection;
		long		dl_residual_error;
}	dl_qos_cl_range1_t;

typedef struct {
		ulong		dl_qos_type;
		long		dl_trans_delay;
		long		dl_priority;
		long		dl_protection;
		long		dl_residual_error;
}	dl_qos_cl_sel1_t;

/*
 * DLPI interface primitive definitions.
 *
 * Each primitive is sent as a stream message.  It is possible that
 * the messages may be viewed as a sequence of bytes that have the
 * following form without any padding. The structure definition
 * of the following messages may have to change depending on the
 * underlying hardware architecture and crossing of a hardware
 * boundary with a different hardware architecture.
 *
 * Fields in the primitives having a name of the form
 * dl_reserved cannot be used and have the value of
 * binary zero, no bits turned on.
 *
 * Each message has the name defined followed by the
 * stream message type (M_PROTO, M_PCPROTO, M_DATA)
 */

/*
 *	LOCAL MANAGEMENT SERVICE PRIMITIVES
 */

/*
 * DL_INFO_REQ, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;			/* set to DL_INFO_REQ */
} dl_info_req_t;

/*
 * DL_INFO_ACK, M_PCPROTO type
 */
typedef struct {
	ulong		dl_primitive;  		/* set to DL_INFO_ACK */
	ulong		dl_max_sdu;		/* Max bytes in a DLSDU */
	ulong		dl_min_sdu;		/* Min bytes in a DLSDU */
	ulong		dl_addr_length;		/* length of DLSAP address */
	ulong		dl_mac_type;		/* type of medium supported*/
	ulong		dl_reserved;		/* value set to zero */
	ulong		dl_current_state;	/* state of DLPI interface */
	long		dl_sap_length;		/*current length of SAP part of
							dlsap address */
	ulong		dl_service_mode;	/* CO, CL or ACL */
	ulong		dl_qos_length;		/* length of qos values */
	ulong		dl_qos_offset;		/* offset from beg. of block*/
	ulong		dl_qos_range_length;	/* available range of qos */
	ulong		dl_qos_range_offset;	/* offset from beg. of block*/
	ulong		dl_provider_style;	/* style1 or style2 */
	ulong 		dl_addr_offset;		/* offset of the dlsap addr */
	ulong		dl_version;		/* version number */
	ulong		dl_brdcst_addr_length;	/* length of broadcast addr */
	ulong		dl_brdcst_addr_offset;	/* offset from beg. of block*/
	ulong		dl_growth;		/* set to zero */
} dl_info_ack_t;

/*
 * DL_ATTACH_REQ, M_PROTO type
 */
typedef struct {
	ulong		dl_primitive;		/* set to DL_ATTACH_REQ*/
	ulong		dl_ppa;			/* id of the PPA */
} dl_attach_req_t;

/*
 * DL_DETACH_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;			/* set to DL_DETACH_REQ */
} dl_detach_req_t;

/*
 * DL_BIND_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* set to DL_BIND_REQ */
	ulong	dl_sap;			/* info to identify dlsap addr*/
	ulong	dl_max_conind;		/* max # of outstanding con_ind*/
	ushort	dl_service_mode;	/* CO, CL or ACL */	
	ushort	dl_conn_mgmt;		/* if non-zero, is con-mgmt stream*/
	ulong	dl_xidtest_flg;		/* if set to 1 indicates automatic 
					   initiation of test and xid frames */
} dl_bind_req_t;

/*
 * DL_BIND_ACK, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_BIND_ACK */
	ulong	dl_sap;			/* DLSAP addr info */
	ulong	dl_addr_length;		/* length of complete DLSAP addr */
	ulong	dl_addr_offset;		/* offset from beginning of M_PCPROTO*/
	ulong	dl_max_conind;		/* allowed max. # of con-ind */
	ulong	dl_xidtest_flg;		/* responses supported by provider*/
} dl_bind_ack_t;

/*
 * DL_SUBS_BIND_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_SUBS_BIND_REQ */
	ulong 	dl_subs_sap_offset;	/* offset of subs_sap */
	ulong	dl_subs_sap_length;	/* length of subs_sap */
	ulong	dl_subs_bind_class;	/* peer or hierarchical */
} dl_subs_bind_req_t;

/*
 * DL_SUBS_BIND_ACK, M_PCPROTO type
 */
typedef struct {
	ulong dl_primitive;		/* DL_SUBS_BIND_ACK */
	ulong dl_subs_sap_offset;	/* offset of subs_sap */
	ulong dl_subs_sap_length;	/* length of subs_sap */
} dl_subs_bind_ack_t;

/*
 * DL_UNBIND_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_UNBIND_REQ */
} dl_unbind_req_t;

/*
 * DL_SUBS_UNBIND_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_SUBS_UNBIND_REQ */
	ulong 	dl_subs_sap_offset;	/* offset of subs_sap */
	ulong	dl_subs_sap_length;	/* length of subs_sap */
} dl_subs_unbind_req_t;

/*
 * DL_OK_ACK, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_OK_ACK */
	ulong	dl_correct_primitive;	/* primitive being acknowledged */
} dl_ok_ack_t;

/*
 * DL_ERROR_ACK, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_ERROR_ACK */
	ulong	dl_error_primitive;	/* primitive in error */
	ulong	dl_errno;		/* DLPI error code */
	ulong	dl_unix_errno;		/* UNIX system error code */
} dl_error_ack_t;

/*
 * DL_ENABMULTI_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_ENABMULTI_REQ */
	ulong	dl_addr_length;		/* length of multicast address */
	ulong	dl_addr_offset;		/* offset from beg. of M_PROTO block*/
} dl_enabmulti_req_t;

/*
 * DL_DISABMULTI_REQ, M_PROTO type
 */

typedef struct {
	ulong	dl_primitive;		/* DL_DISABMULTI_REQ */
	ulong	dl_addr_length;		/* length of multicast address */
	ulong	dl_addr_offset;		/* offset from beg. of M_PROTO block*/
} dl_disabmulti_req_t;

/*
 * DL_PROMISCON_REQ, M_PROTO type
 */

typedef struct {
	ulong	dl_primitive;		/* DL_PROMISCON_REQ */
	ulong	dl_level;		/* physical,SAP level or ALL multicast*/
} dl_promiscon_req_t;

/*
 * DL_PROMISCOFF_REQ, M_PROTO type
 */

typedef struct {
	ulong 	dl_primitive;		/* DL_PROMISCOFF_REQ */
	ulong	dl_level;		/* Physical,SAP level or ALL multicast*/
} dl_promiscoff_req_t;

/*
 *	Primitives to get and set the Physical address
 */

/*
 * DL_PHYS_ADDR_REQ, M_PROTO type
 */
typedef	struct {
	ulong	dl_primitive;		/* DL_PHYS_ADDR_REQ */
	ulong	dl_addr_type;		/* factory or current physical addr */
} dl_phys_addr_req_t;

/*
 * DL_PHYS_ADDR_ACK, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_PHYS_ADDR_ACK */
	ulong	dl_addr_length;		/* length of the physical addr */
	ulong	dl_addr_offset;		/* offset from beg. of block */
} dl_phys_addr_ack_t;

/*
 * DL_SET_PHYS_ADDR_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_SET_PHYS_ADDR_REQ */
	ulong	dl_addr_length;		/* length of physical addr */
	ulong	dl_addr_offset;		/* offset from beg. of block */
} dl_set_phys_addr_req_t;

/*
 *	Primitives to get statistics
 */

/*
 * DL_GET_STATISTICS_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_GET_STATISTICS_REQ */
} dl_get_statistics_req_t;

/*
 * DL_GET_STATISTICS_ACK, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_GET_STATISTICS_ACK */
	ulong	dl_stat_length;		/* length of statistics structure*/
	ulong	dl_stat_offset;		/* offset from beg. of block */
} dl_get_statistics_ack_t;

/*
 *	CONNECTION-ORIENTED SERVICE PRIMITIVES
 */

/*
 * DL_CONNECT_REQ, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_CONNECT_REQ */
	ulong	dl_dest_addr_length;	/* len. of dlsap addr*/
	ulong	dl_dest_addr_offset;	/* offset */
	ulong	dl_qos_length;		/* len. of QOS parm val*/
	ulong	dl_qos_offset;		/* offset */
	ulong	dl_growth;		/* set to zero */
} dl_connect_req_t;

/*
 * DL_CONNECT_IND, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_CONNECT_IND */
	ulong	dl_correlation;		/* provider's correlation token*/
	ulong	dl_called_addr_length;  /* length of called address */
	ulong	dl_called_addr_offset;	/* offset from beginning of block */
	ulong	dl_calling_addr_length;	/* length of calling address */
	ulong	dl_calling_addr_offset;	/* offset from beginning of block */
	ulong	dl_qos_length;		/* length of qos structure */
	ulong	dl_qos_offset;		/* offset from beginning of block */
	ulong	dl_growth;		/* set to zero */
} dl_connect_ind_t;

/*
 * DL_CONNECT_RES, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;	/* DL_CONNECT_RES */
	ulong	dl_correlation; /* provider's correlation token */
	ulong	dl_resp_token;	/* token associated with responding stream */
	ulong	dl_qos_length;  /* length of qos structure */
	ulong	dl_qos_offset;	/* offset from beginning of block */
	ulong	dl_growth;	/* set to zero */
} dl_connect_res_t;

/*
 * DL_CONNECT_CON, M_PROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_CONNECT_CON*/
	ulong	dl_resp_addr_length;	/* length of responder's address */
	ulong	dl_resp_addr_offset;	/* offset from beginning of block*/
	ulong	dl_qos_length;		/* length of qos structure */
	ulong	dl_qos_offset;		/* offset from beginning of block*/
	ulong	dl_growth;		/* set to zero */
} dl_connect_con_t;

/*
 * DL_TOKEN_REQ, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;		/* DL_TOKEN_REQ */
} dl_token_req_t;

/*
 * DL_TOKEN_ACK, M_PCPROTO type
 */
typedef struct {
	ulong	dl_primitive;	/* DL_TOKEN_ACK */
	ulong	dl_token;	/* Connection response token associated
					   with the stream */
}dl_token_ack_t;

/*
 * DL_DISCONNECT_REQ, M_PROTO type
 */
typedef struct {
	ulong		dl_primitive;	/* DL_DISCONNECT_REQ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -