📄 dlpi.h
字号:
/* * dlpi.h : Data Link Provider Interface * Author : David Grothe * Created On : Tue May 31 21:40:37 1994 * Last Modified By: brian * Last Modified On: 2003/09/18 13:39:54 * Update Count : 1.1.1.2 * RCS Id : dlpi.h,v 1.1.1.2 2003/09/18 13:39:54 brian Exp * Status : (Exp) * Purpose : STREAMS interface to link level and MAC layer drivers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge, * MA 02139, USA. * */#ifndef _DLPI_H#define _DLPI_H 1 /* define several markers */#define DLPI_H 1#define LIS_DLPI_H 1 /* unique to this version of dlpi.h */#ident "@(#) LiS dlpi.h 1.11 9/18/03"/************************************************************************* Reference *************************************************************************** ** This file follows the DLPI specification published by UNIX ** International, version 2.0.0 dated August 20, 1991. ** ** Added changes from DLPI Corrigendum U019 thanks to Ole Husgaard ** <sparre@login.dknet.dk>. ** *************************************************************************//************************************************************************* DLPI Types *************************************************************************** ** Unlike other dlpi.h files, this one defines its own types so that ** it can be used without depending upon system specific types.h files. ** *************************************************************************/#if !defined(_LINUX_TYPES_H) && !defined(_INTTYPES_H)# if defined(__sparcv9) /* 64-bit SPARC compile */ typedef unsigned int dl_ulong ; typedef unsigned short dl_ushort ;# else typedef unsigned long dl_ulong ; typedef unsigned short dl_ushort ;# endif#else typedef uint32_t dl_ulong ; typedef uint16_t dl_ushort ;#endif/************************************************************************* Message Structures *************************************************************************** ** These structures are located in an M_PROTO or an M_PCPROTO message ** starting at b_rptr. Some message types also have an attached ** M_DATA chained through the b_cont field. ** ** 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. ** *************************************************************************//* * Local Management Primitives */typedef struct{ dl_ulong dl_primitive ;} dl_info_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_max_sdu ; dl_ulong dl_min_sdu ; dl_ulong dl_addr_length ; dl_ulong dl_mac_type ; dl_ulong dl_reserved ; dl_ulong dl_current_state ; long dl_sap_length ; /* yes, signed long */ dl_ulong dl_service_mode ; dl_ulong dl_qos_length ; dl_ulong dl_qos_offset ; dl_ulong dl_qos_range_length ; dl_ulong dl_qos_range_offset ; long dl_provider_style ; /* yes, signed long */ dl_ulong dl_addr_offset ; dl_ulong dl_version ; dl_ulong dl_brdcst_addr_length ; dl_ulong dl_brdcst_addr_offset ; dl_ulong dl_growth ;} dl_info_ack_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_ppa ;} dl_attach_req_t ;typedef struct{ dl_ulong dl_primitive ;} dl_detach_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_sap ; dl_ulong dl_max_conind ; dl_ushort dl_service_mode ; dl_ushort dl_conn_mgmt ; dl_ulong dl_xidtest_flg ;} dl_bind_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_sap ; dl_ulong dl_addr_length ; dl_ulong dl_addr_offset ; dl_ulong dl_max_conind ; dl_ulong dl_xidtest_flg ;} dl_bind_ack_t ;typedef struct{ dl_ulong dl_primitive ;} dl_unbind_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_subs_sap_offset ; dl_ulong dl_subs_sap_length ; dl_ulong dl_subs_bind_class ;} dl_subs_bind_req_t ;#define dl_subs_sap_len dl_subs_sap_length /* SCO compatibility */typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_subs_sap_offset ; dl_ulong dl_subs_sap_length ;} dl_subs_bind_ack_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_subs_sap_offset ; dl_ulong dl_subs_sap_length ;} dl_subs_unbind_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_addr_length ; dl_ulong dl_addr_offset ;} dl_enabmulti_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_addr_length ; dl_ulong dl_addr_offset ;} dl_disabmulti_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_level ;} dl_promiscon_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_level ;} dl_promiscoff_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_correct_primitive ;} dl_ok_ack_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_error_primitive ; dl_ulong dl_errno ; dl_ulong dl_unix_errno ;} dl_error_ack_t ;/* * Connection-mode Service Primitives */typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_dest_addr_length ; dl_ulong dl_dest_addr_offset ; dl_ulong dl_qos_length ; dl_ulong dl_qos_offset ; dl_ulong dl_growth ;} dl_connect_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_correlation ; dl_ulong dl_called_addr_length ; dl_ulong dl_called_addr_offset ; dl_ulong dl_calling_addr_length ; dl_ulong dl_calling_addr_offset ; dl_ulong dl_qos_length ; dl_ulong dl_qos_offset ; dl_ulong dl_growth ;} dl_connect_ind_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_correlation ; dl_ulong dl_resp_token ; dl_ulong dl_qos_length ; dl_ulong dl_qos_offset ; dl_ulong dl_growth ;} dl_connect_res_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_resp_addr_length ; dl_ulong dl_resp_addr_offset ; dl_ulong dl_qos_length ; dl_ulong dl_qos_offset ; dl_ulong dl_growth ;} dl_connect_con_t ;typedef struct{ dl_ulong dl_primitive ;} dl_token_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_token ;} dl_token_ack_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_reason ; dl_ulong dl_correlation ;} dl_disconnect_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_originator ; dl_ulong dl_reason ; dl_ulong dl_correlation ;} dl_disconnect_ind_t ;typedef struct{ dl_ulong dl_primitive ;} dl_reset_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_originator ; dl_ulong dl_reason ;} dl_reset_ind_t ;typedef struct{ dl_ulong dl_primitive ;} dl_reset_res_t ;typedef struct{ dl_ulong dl_primitive ;} dl_reset_con_t ;/* * Connectionless-mode Service Primitives */typedef struct{ dl_ulong dl_min ; dl_ulong dl_max ;} dl_priority_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_dest_addr_length ; dl_ulong dl_dest_addr_offset ; dl_priority_t dl_priority ;} dl_unitdata_req_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_dest_addr_length ; dl_ulong dl_dest_addr_offset ; dl_ulong dl_src_addr_length ; dl_ulong dl_src_addr_offset ; dl_ulong dl_group_address ;} dl_unitdata_ind_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_dest_addr_length ; dl_ulong dl_dest_addr_offset ; dl_ulong dl_unix_errno ; dl_ulong dl_errno ;} dl_uderror_ind_t ;typedef struct{ dl_ulong dl_primitive ; dl_ulong dl_qos_length ; dl_ulong dl_qos_offset ;} dl_udqos_req_t ;/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -