/* $Source: /usr/local/kcs/sys.ROSE_800/h/RCS/dlpi_ext.h,v $ * $Revision: 1.9.106.3 $ $Author: indnetwk $ * $State: Exp $ $Locker: indnetwk $ * $Date: 97/09/02 16:21:46 $ */ /* * (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1992. ALL RIGHTS * RESERVED. NO PART OF THIS PROGRAM MAY BE PHOTOCOPIED, * REPRODUCED, OR TRANSLATED TO ANOTHER PROGRAM LANGUAGE WITHOUT * THE PRIOR WRITTEN CONSENT OF HEWLETT PACKARD COMPANY */ #ifndef _SIO_DLPI_EXT_INCLUDED #define _SIO_DLPI_EXT_INCLUDED /***************************************************************************** new primitives *****************************************************************************/ /************* Obsolete definitions for PPA *********************************/ #define DL_HP_FORCE_UNBIND_REQ 0xfc /* for internal use */ #define DL_HP_FORCE_DISCONNECT_REQ 0xfb /* for internal use */ #define DL_HP_TRACE_ON_REQ 0xfa /* for internal use */ #define DL_HP_TRACE_OFF_REQ 0xf9 /* for internal use */ #define DL_HP_TRACE_BUF_REQ 0xf8 /* for internal use */ #define DL_HP_TRACE_BUF_ACK 0xf7 /* for internal use */ #define DL_HP_INFO_REQ 0xf6 /* return info */ #define DL_HP_INFO_ACK 0xf5 /* info */ #define DL_HP_SET_ACK_TO_REQ 0xf4 /* set ACK timeout */ #define DL_HP_SET_P_TO_REQ 0xf3 /* set P timeout */ #define DL_HP_SET_REJ_TO_REQ 0xf2 /* set REJ timeout */ #define DL_HP_SET_BUSY_TO_REQ 0xf1 /* set BUSY timeout */ #define DL_HP_SET_SEND_ACK_TO_REQ 0xf0 /* set send-ack timeout */ #define DL_HP_SET_MAX_RETRIES_REQ 0xef /* set max # of retries (N2) */ #define DL_HP_SET_ACK_THRESH_REQ 0xee /*set # I pkts to rcv b4 ACK (N3)*/ #define DL_HP_SET_LOCAL_WIN_REQ 0xed /* set local window size */ #define DL_HP_SET_REMOTE_WIN_REQ 0xec /* set remote window size */ #define DL_HP_CLEAR_STATS_REQ 0xeb /* zero statistics */ #define DL_HP_SET_LOCAL_BUSY_REQ 0xea /* set the LOCAL_BUSY flag */ #define DL_HP_CLEAR_LOCAL_BUSY_REQ 0xe9 /* clear the LOCAL_BUSY flag */ #define DL_HP_HW_RESET_REQ 0xe8 /* hardware reset */ #define DL_HP_RESET_STATS_REQ 0xe7 /* reset statistics */ #define DL_HP_HW_STATUS_REQ 0xe6 /* get hardware status req */ #define DL_HP_HW_STATUS_ACK 0xe5 /* get hardware status ack */ #define DL_HP_MULTICAST_LIST_REQ 0xe4 /* Reserved for internal use */ #define DL_HP_MULTICAST_LIST_ACK 0xe3 /* Reserved for internal use */ /* TEMPORARY workaround for IBM inactivity timer. */ #define DL_HP_SEND_RR 0x99 /* Send an RR w/ poll bit set */ /************* New definitions for PPA ************************************/ #define DL_HP_PPA_REQ 0xe2 /* REQ all valid PPA's */ #define DL_HP_PPA_ACK 0xe1 /* ACK all valid PPA's */ /************* primitives 0xdf --- 0xd0 reserved for MPE DLPI *************/ #define DL_HP_RAWDATA_REQ 0x0100 /* for internal use */ #define DL_HP_RAWDATA_IND 0x0101 /* for internal use */ #define DL_HP_OK_TO_LOG_SNAP 0x0102 /* for internal use */ /************* New definitions for event notification from the driver */ #define DL_LINK_DOWN_IND 0x103 /* link is down, ip handle it */ #define DL_LINK_UP_IND 0x104 /* link is up, ip handle it */ /************* New mac types ***********************************************/ #define DL_FC 0x10 /* Fibre Channel interface */ #define DL_ATM 0x11 /* ATM AAL5/Raw interface */ #define DL_IPATM 0x12 /* ATM Classical IP interface */ #define DL_X25 0x13 /* X.25 interface */ #define DL_ISDN 0x14 /* ISDN interface */ #define DL_HIPPI 0x15 /* HIPPI interface */ #define DL_100VG 0x16 /* 100 Based VG Ethernet */ #define DL_100VGTPR 0x17 /* 100 Based VG Token Ring */ #define DL_ETH_CSMA 0x18 /* ISO 8802/3 and Ethernet */ #define DL_100BT 0x19 /* 100 Base T */ #define DL_LOWFAT 0x20 /* Lowfat Myrinet card */ /***************************************************************************** new primitive data types *****************************************************************************/ /* DL_HP_MULTICAST_LIST_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; /* DL_HP_MULTICAST_LIST_REQ */ } dl_hp_multicast_list_req_t; /* DL_HP_MULTICAST_LIST_ACK, M_PROTO type */ typedef struct { uint32_t dl_primitive; /* DL_HP_MULTICAST_LIST_ACK */ uint32_t dl_offset; /* offset to the data in multicast ack */ uint32_t dl_length; /* length of data area in bytes */ uint32_t dl_count; /* Total number of 6 byte multicast addresses */ } dl_hp_multicast_list_ack_t; /* DL_HP_PPA_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; /* DL_HP_PPA_REQ */ } dl_hp_ppa_req_t; /* DL_HP_PPA_ACK, M_PROTO type */ typedef struct { uint32_t dl_primitive; /* DL_HP_PPA_ACK */ uint32_t dl_length; /* Length of the Data area in ppa ack. */ uint32_t dl_count; /* Number of PPAs in list */ uint32_t dl_offset; /* Offset of the data in ppa ack. */ } dl_hp_ppa_ack_t; /* info area in DL_HP_PPA_ACK */ typedef struct { uint32_t dl_next_offset; /* Offset of next ppa info structure */ /* from start of info area. */ uint32_t dl_ppa; /* PPA number assigned to LAN interface */ uint8_t dl_hw_path[100]; /* Hardware path of LAN interface */ uint32_t dl_mac_type; /* MAC type of LAN interface */ uint8_t dl_phys_addr[20];/* Station address */ uint32_t dl_addr_length; /* Length of station address */ uint32_t dl_mjr_num; /* Major number of interface driver */ uint8_t dl_name[64]; /* name of driver */ uint32_t dl_instance_num; /* Instance number of device. */ uint32_t dl_mtu; /* MTU. */ /* Hardware state definitions * NOTE: This HDW_DEAD state is equivalent to the LAN_DEAD state in lanc.h. */ #define HDW_DEAD 0x20 /* dead interface card */ uint32_t dl_hdw_state; /* hardware state. */ uint8_t dl_module_id_1[64]; /* Module ID name 1 */ uint8_t dl_module_id_2[64]; /* Module ID name 1 */ uint8_t dl_arpmod_name[64]; /* ARP Helper module name */ uint32_t dl_nmid; /* Network Management ID */ uint32_t dl_reserved1; /* Reserved for future use. */ uint32_t dl_reserved2; /* Reserved for future use. */ } dl_hp_ppa_info_t; /* DL_HP_FORCE_UNBIND_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_force_unbind_req_t; /* DL_HP_FORCE_DISCONNECT_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_force_disconnect_req_t; /* DL_HP_TRACE_ON_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_trace_on_req_t; /* DL_HP_TRACE_OFF_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_trace_off_req_t; /* DL_HP_TRACE_BUF_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_trace_buf_req_t; /* DL_HP_TRACE_BUF_ACK, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_buf_len; /* length of trace buffer */ uint32_t dl_buf_off; /* offset of trace buffer */ } dl_hp_trace_buf_ack_t; /* DL_HP_INFO_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_info_req_t; /* DL_HP_INFO_ACK, M_PROTO type */ typedef struct { uint32_t dl_primitive; /* dlpi stuff */ uint32_t dl_mem_fails; /* # of failed memory allocations */ uint32_t dl_queue_fails; /* # of failed stream enqueues */ /* timer stuff */ uint32_t dl_ack_to; /* length of ACK timer in 1/10 seconds */ uint32_t dl_p_to; /* length of P timer in 1/10 seconds */ uint32_t dl_rej_to; /* length of REJ timer in 1/10 seconds */ uint32_t dl_busy_to; /* length of BUSY timer in 1/10 seconds */ uint32_t dl_send_ack_to; /* length of SEND_ACK timer in 1/10 seconds */ uint32_t dl_ack_to_cnt; /* # of ACK timeouts */ uint32_t dl_p_to_cnt; /* # of P timeouts */ uint32_t dl_rej_to_cnt; /* # of REJ timeouts */ uint32_t dl_busy_to_cnt; /* # of BUSY timeouts */ /* window stuff */ uint32_t dl_local_win; /* local window size */ uint32_t dl_remote_win; /* remote window size */ /* packet stuff */ uint32_t dl_i_pkts_in; /* # of good I packets received */ uint32_t dl_i_pkts_in_oos;/* # of out-of-sequence I packets received */ uint32_t dl_i_pkts_in_drop;/* # of I pkts dropped for lack of resources*/ uint32_t dl_i_pkts_out; /* # of I pkts successfully transmitted */ uint32_t dl_i_pkts_retrans; /* # of I packets re-transmissions */ uint32_t dl_s_pkts_in; /* # of S packets received */ uint32_t dl_s_pkts_out; /* # of S packets transmitted */ uint32_t dl_u_pkts_in; /* # of U packets received */ uint32_t dl_u_pkts_out; /* # of U packets transmitted */ uint32_t dl_bad_pkts; /* # I pkts with bad N(R) or bad ctl */ /* misc stuff */ uint32_t dl_retry_cnt; /* value of RETRY_COUNT variable */ uint32_t dl_max_retry_cnt; /* max value of RETRY_COUNT variable */ uint32_t dl_max_retries; /* maximum allowable # of retries (N2)*/ uint32_t dl_ack_thresh; /* # of I pkts to receive before send ACK (N3)*/ uint32_t dl_remote_busy_cnt; /* # of times REMOTE_BUSY was set */ uint32_t dl_hw_req_fails; /* # of failed requests to driver */ } dl_hp_info_ack_t; /* DL_HP_SET_ACK_TO_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_ack_to; /* length of ACK timer in 1/10 seconds */ } dl_hp_set_ack_to_req_t; /* DL_HP_SET_P_TO_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_p_to; /* length of P timer in 1/10 seconds */ } dl_hp_set_p_to_req_t; /* DL_HP_SET_REJ_TO_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_rej_to; /* length of REJ timer in 1/10 seconds */ } dl_hp_set_rej_to_req_t; /* DL_HP_SET_BUSY_TO_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_busy_to; /* length of BUSY timer in 1/10 seconds */ } dl_hp_set_busy_to_req_t; /* DL_HP_SET_SEND_ACK_TO_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_send_ack_to; /* length of SEND_ACK timer in 1/10 seconds */ } dl_hp_set_send_ack_to_req_t; /* DL_HP_SET_MAX_RETRIES_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_max_retries; /* maximum # of retries (N2) */ } dl_hp_set_max_retries_req_t; /* DL_HP_SET_ACK_THRESH_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_ack_thresh; /* # of I pkts to receive before send ACK (N3)*/ } dl_hp_set_ack_thresh_req_t; /* DL_HP_SET_LOCAL_WIN_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_local_win; /* local window size */ } dl_hp_set_local_win_req_t; /* DL_HP_SET_REMOTE_WIN_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_remote_win; /* remote window size */ } dl_hp_set_remote_win_req_t; /* DL_HP_CLEAR_STATS_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_clear_stats_req_t; /* DL_HP_SET_LOCAL_BUSY_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_set_local_busy_req_t; /* DL_HP_CLEAR_LOCAL_BUSY_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_clear_local_busy_req_t; /* DL_HP_OK_TO_LOG_SNAP, M_PROTO type */ typedef struct { uint32_t dl_primitive; /* DL_HP_OK_TO_LOG_SNAP */ } dl_hp_ok_snap_t; /* DL_HP_RAWDATA_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_rawdata_req_t; /* DL_HP_RAWDATA_IND, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_rawdata_ind_t; /* DL_LINK_DOWN_IND, M_PCPROTO type */ typedef struct { uint32_t dl_primitive; } dl_link_down_ind_t; /* DL_LINK_UP_IND, M_PCPROTO type */ typedef struct { uint32_t dl_primitive; } dl_link_up_ind_t; /* DL_HP_HW_RESET_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_hw_reset_req_t; /* DL_HP_RESET_STATS_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_reset_stats_req_t; /* DL_HP_HW_STATUS_REQ, M_PROTO type */ typedef struct { uint32_t dl_primitive; } dl_hp_hw_status_req_t; /* DL_HP_HW_STATUS_ACK, M_PROTO type */ typedef struct { uint32_t dl_primitive; uint32_t dl_hw_status; } dl_hp_hw_status_ack_t; /***************************************************************************** new size definitions *****************************************************************************/ #define DL_HP_MULTICAST_LIST_REQ_SIZE sizeof(dl_hp_multicast_list_req_t) #define DL_HP_MULTICAST_LIST_ACK_SIZE sizeof(dl_hp_multicast_list_ack_t) #define DL_HP_PPA_REQ_SIZE sizeof(dl_hp_ppa_req_t) #define DL_HP_PPA_ACK_SIZE sizeof(dl_hp_ppa_ack_t) #define DL_HP_PPA_INFO_SIZE sizeof(dl_hp_ppa_info_t) #define DL_HP_FORCE_UNBIND_REQ_SIZE sizeof(dl_hp_force_unbind_req_t) #define DL_HP_FORCE_DISCONNECT_REQ_SIZE sizeof(dl_hp_force_disconnect_req_t) #define DL_HP_TRACE_ON_REQ_SIZE sizeof(dl_hp_trace_on_req_t) #define DL_HP_TRACE_OFF_REQ_SIZE sizeof(dl_hp_trace_off_req_t) #define DL_HP_TRACE_BUF_REQ_SIZE sizeof(dl_hp_trace_buf_req_t) #define DL_HP_TRACE_BUF_ACK_SIZE sizeof(dl_hp_trace_buf_ack_t) #define DL_HP_INFO_REQ_SIZE sizeof(dl_hp_info_req_t) #define DL_HP_INFO_ACK_SIZE sizeof(dl_hp_info_ack_t) #define DL_HP_SET_ACK_TO_REQ_SIZE sizeof(dl_hp_set_ack_to_req_t) #define DL_HP_SET_P_TO_REQ_SIZE sizeof(dl_hp_set_p_to_req_t) #define DL_HP_SET_REJ_TO_REQ_SIZE sizeof(dl_hp_set_rej_to_req_t) #define DL_HP_SET_BUSY_TO_REQ_SIZE sizeof(dl_hp_set_busy_to_req_t) #define DL_HP_SET_SEND_ACK_TO_REQ_SIZE sizeof(dl_hp_set_send_ack_to_req_t) #define DL_HP_SET_MAX_RETRIES_REQ_SIZE sizeof(dl_hp_set_max_retries_req_t) #define DL_HP_SET_ACK_THRESH_REQ_SIZE sizeof(dl_hp_set_ack_thresh_req_t) #define DL_HP_SET_LOCAL_WIN_REQ_SIZE sizeof(dl_hp_set_local_win_req_t) #define DL_HP_SET_REMOTE_WIN_REQ_SIZE sizeof(dl_hp_set_remote_win_req_t) #define DL_HP_CLEAR_STATS_REQ_SIZE sizeof(dl_hp_clear_stats_req_t) #define DL_HP_SET_LOCAL_BUSY_REQ_SIZE sizeof(dl_hp_set_local_busy_req_t) #define DL_HP_CLEAR_LOCAL_BUSY_REQ_SIZE sizeof(dl_hp_clear_local_busy_req_t) #define DL_HP_OK_TO_LOG_SNAP_SIZE sizeof(dl_hp_ok_snap_t) #define DL_HP_RAWDATA_REQ_SIZE sizeof(dl_hp_rawdata_req_t) #define DL_HP_RAWDATA_IND_SIZE sizeof(dl_hp_rawdata_ind_t) #define DL_LINK_DOWN_IND_SIZE sizeof(dl_link_down_ind_t) #define DL_LINK_UP_IND_SIZE sizeof(dl_link_up_ind_t) #define DL_HP_HW_STATUS_REQ_SIZE sizeof(dl_hp_hw_status_req_t) #define DL_HP_HW_STATUS_ACK_SIZE sizeof(dl_hp_hw_status_ack_t) /***************************************************************************** other HP extensions *****************************************************************************/ #define DL_HP_RAWDLS 0x1000 /* service mode for raw access */ /* * HP Reserved Diagnostic control commands for ioctl interface. * NOTE: All transparent ioctl commands are defined with * _IOW('D', ...) or _IOR('D',...). All HP defined non-transparent * ioctl commands are defined as _IOW('E',...) or _IOR('E',...) * and are located in sio/lan_dlpikrn.h. */ #define DLPI_GET_STATUS_BUFFER _IOW('D',1, struct fis) #define DLPI_CLEAR_STATUS_BUFFER _IOW('D',2, struct fis) #define DLPI_PEEK_ADDRESS _IOW('D',3, struct fis) #define DLPI_PEEK_DATA _IOW('D',4, struct fis) #define DLPI_GET_IODC _IOW('D',5, struct fis) #define DLPI_READ_REGISTER _IOW('D',6, struct fis) #define DLPI_RESET_HI _IOW('D',7, struct fis) #define DLPI_SELFTEST _IOW('D',8, struct fis) #define DLPI_LAN_LOOPBACK _IOW('D',9, struct fis) #define DLPI_DOWNLOAD _IOW('D',10, struct fis) #define DLPI_DOWNLOAD_END _IOW('D',11, struct fis) #define DLPI_FLASH_INIT _IOW('D',12, struct fis) #define DLPI_LINK_SPEED _IOW('D',13, struct fis) #define DLPI_MTU_BYTE_SIZE _IOW('D',14, struct fis) #define DLPI_IF_UNIT_NUMBER _IOW('D',15, struct fis) #define DLPI_SET_FUNC_ADDR _IOW('D',16, struct fis) #define DLPI_CLEAR_FUNC_ADDR _IOW('D',17, struct fis) /* The DLPI_SET_MOD_ID allows users to change the module id name to * either lan or snap only. */ #define DLPI_SET_MOD_ID _IOW('D',20, 0) /* The DL_IOC_HDR_INFO is used for fast path negotiation. * This ioctl name was defined by Mentat and therefore doesn't follow * the naming scheme of the other ioctl's. I am defining * DLPI_IOC_HDR_INFO to be consistant with the naming scheme of the * other ioctl's. */ #define DL_IOC_HDR_INFO _IOW('D',21, dl_unitdata_req_t) #define DLPI_IOC_HDR_INFO DL_IOC_HDR_INFO /* DHCP C/S support */ #define DLPI_SET_RIF_ON _IOW('D',22, struct fis) #define DLPI_SET_RIF_OFF _IOW('D',23, struct fis) #define DLPI_RIF_INFO _IOW('D',24, struct fis) /* The DL_IOC_DRIVER_OPTIONS is used to negotiate for Checksum Offload * and Copy on Write. */ typedef struct { uint32_t driver_ops_type; uint32_t driver_ops_type_1; uint32_t driver_ops_type_2; } driver_ops_t; /* Driver options */ #define DRIVER_CKO 0x1 #define DRIVER_COW 0x2 #define DRIVER_LFP 0x4 #define DRIVER_LNP 0x8 #define DL_IOC_DRIVER_OPTIONS _IOW('D',22, driver_ops_t) #define DLPI_IOC_DRIVER_OPTIONS DL_IOC_DRIVER_OPTIONS #define DLPI_SET_NOLOOPBACK _IOW('D',23, driver_ops_t) #define DLPI_NO_SRC_ROUTING _IOW('D',24, driver_ops_t) #define DLPI_GET_SRC_ROUTE_FLAG _IOW('D',25, driver_ops_t) #define DLPI_SET_SRC_ROUTE_FLAG _IOW('D',26, driver_ops_t) /* The following commands are obsolete in 10.0 */ /* These two values should not be used by any applications in 10.0 and beyond.*/ #define DLPI_SET_FUNC_ADDR_OBS _IOW('D',18, struct fis) #define DLPI_CLEAR_FUNC_ADDR_OBS _IOW('D',19, struct fis) /* The following primitives and structures are obsolete in 10.0 */ /* These two values should not be used by any applications in 10.0 and beyond.*/ #define DL_HP_PPA_REQ_OBS 0xfe /* REQ all valid PPA's */ #define DL_HP_PPA_ACK_OBS 0xfd /* ACK all valid PPA's */ #define DL_HP_PPA_REQ_SIZE_OBS sizeof(dl_hp_ppa_req_t_obs) #define DL_HP_PPA_ACK_SIZE_OBS sizeof(dl_hp_ppa_ack_t_obs) #define DL_HP_PPA_INFO_SIZE_OBS sizeof(dl_hp_ppa_info_t_obs) /* DL_HP_PPA_ACK, M_PROTO type */ typedef struct { uint32_t dl_primitive; /* DL_HP_PPA_ACK */ uint32_t dl_length; /* Length of the Data area in ppa ack. */ uint32_t dl_offset; /* Offset of the data in ppa ack. */ } dl_hp_ppa_ack_t_obs; /* info area in DL_HP_PPA_ACK */ typedef struct { uint32_t dl_ppa; /* PPA number assigned to LAN interface */ uint32_t dl_hw_path[5]; /* Hardware path of LAN interface */ uint32_t dl_hw_path_len; /* Hardware path of LAN interface */ uint32_t dl_mac_type; /* MAC type of LAN interface */ uint8_t dl_phys_addr[6];/* Station address */ uint8_t dl_pad[2]; /* name of driver */ uint32_t dl_reserved1; /* Reserved for internal use */ uint32_t dl_reserved2; /* Reserved for internal use */ } dl_hp_ppa_info_t_obs; #endif