fddimib.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:10k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /******************************************************************************
  2.  *
  3.  * (C)Copyright 1998,1999 SysKonnect,
  4.  * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 2 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * The information in this file is provided "AS IS" without warranty.
  12.  *
  13.  ******************************************************************************/
  14. /*
  15.  * FDDI MIB
  16.  */
  17. /*
  18.  * typedefs
  19.  */
  20. typedef u_long Counter ;
  21. typedef u_char TimeStamp[8] ;
  22. typedef struct fddi_addr LongAddr ;
  23. typedef u_long Timer_2 ;
  24. typedef u_long Timer ;
  25. typedef u_short ResId ;
  26. typedef u_short SMTEnum ;
  27. typedef u_char SMTFlag ;
  28. typedef struct {
  29. Counter count ;
  30. TimeStamp timestamp ;
  31. } SetCountType ;
  32. /*
  33.  * bits for bit string "available_path"
  34.  */
  35. #define MIB_PATH_P (1<<0)
  36. #define MIB_PATH_S (1<<1)
  37. #define MIB_PATH_L (1<<2)
  38. /*
  39.  * bits for bit string PermittedPaths & RequestedPaths (SIZE(8))
  40.  */
  41. #define MIB_P_PATH_LOCAL (1<<0)
  42. #define MIB_P_PATH_SEC_ALTER (1<<1)
  43. #define MIB_P_PATH_PRIM_ALTER (1<<2)
  44. #define MIB_P_PATH_CON_ALTER (1<<3)
  45. #define MIB_P_PATH_SEC_PREFER (1<<4)
  46. #define MIB_P_PATH_PRIM_PREFER (1<<5)
  47. #define MIB_P_PATH_CON_PREFER (1<<6)
  48. #define MIB_P_PATH_THRU (1<<7)
  49. /*
  50.  * enum current path
  51.  */
  52. #define MIB_PATH_ISOLATED 0
  53. #define MIB_PATH_LOCAL 1
  54. #define MIB_PATH_SECONDARY 2
  55. #define MIB_PATH_PRIMARY 3
  56. #define MIB_PATH_CONCATENATED 4
  57. #define MIB_PATH_THRU 5
  58. /*
  59.  * enum PMDClass
  60.  */
  61. #define MIB_PMDCLASS_MULTI 0
  62. #define MIB_PMDCLASS_SINGLE1 1
  63. #define MIB_PMDCLASS_SINGLE2 2
  64. #define MIB_PMDCLASS_SONET 3
  65. #define MIB_PMDCLASS_LCF 4
  66. #define MIB_PMDCLASS_TP 5
  67. #define MIB_PMDCLASS_UNKNOWN 6
  68. #define MIB_PMDCLASS_UNSPEC 7
  69. /*
  70.  * enum SMTStationStatus
  71.  */
  72. #define MIB_SMT_STASTA_CON 0
  73. #define MIB_SMT_STASTA_SEPA 1
  74. #define MIB_SMT_STASTA_THRU 2
  75. struct fddi_mib {
  76. /*
  77.  * private
  78.  */
  79. u_char fddiPRPMFPasswd[8] ;
  80. struct smt_sid fddiPRPMFStation ;
  81. #ifdef ESS
  82. /*
  83.  * private variables for static allocation of the
  84.  * End Station Support
  85.  */
  86. u_long fddiESSPayload ; /* payload for static alloc */
  87. u_long fddiESSOverhead ; /* frame ov for static alloc */
  88. u_long fddiESSMaxTNeg ; /* maximum of T-NEG */
  89. u_long fddiESSMinSegmentSize ; /* min size of the sync frames */
  90. u_long fddiESSCategory ; /* category for the Alloc req */
  91. short fddiESSSynchTxMode ; /* send all LLC frames as sync */
  92. #endif /* ESS */
  93. #ifdef SBA
  94. /*
  95.  * private variables for the Synchronous Bandwidth Allocator
  96.  */
  97. char fddiSBACommand ; /* holds the parsed SBA cmd */
  98. u_char fddiSBAAvailable ; /* SBA allocatable value */
  99. #endif /* SBA */
  100. /*
  101.  * SMT standard mib
  102.  */
  103. struct smt_sid fddiSMTStationId ;
  104. u_short fddiSMTOpVersionId ;
  105. u_short fddiSMTHiVersionId ;
  106. u_short fddiSMTLoVersionId ;
  107. u_char fddiSMTManufacturerData[32] ;
  108. u_char fddiSMTUserData[32] ;
  109. u_short fddiSMTMIBVersionId ;
  110. /*
  111.  * ConfigGrp
  112.  */
  113. u_char fddiSMTMac_Ct ;
  114. u_char fddiSMTNonMaster_Ct ;
  115. u_char fddiSMTMaster_Ct ;
  116. u_char fddiSMTAvailablePaths ;
  117. u_short fddiSMTConfigCapabilities ;
  118. u_short fddiSMTConfigPolicy ;
  119. u_short fddiSMTConnectionPolicy ;
  120. u_short fddiSMTTT_Notify ;
  121. u_char fddiSMTStatRptPolicy ;
  122. u_long fddiSMTTrace_MaxExpiration ;
  123. u_short fddiSMTPORTIndexes[NUMPHYS] ;
  124. u_short fddiSMTMACIndexes ;
  125. u_char fddiSMTBypassPresent ;
  126. /*
  127.  * StatusGrp
  128.  */
  129. SMTEnum fddiSMTECMState ;
  130. SMTEnum fddiSMTCF_State ;
  131. SMTEnum fddiSMTStationStatus ;
  132. u_char fddiSMTRemoteDisconnectFlag ;
  133. u_char fddiSMTPeerWrapFlag ;
  134. /*
  135.  * MIBOperationGrp
  136.  */
  137. TimeStamp fddiSMTTimeStamp ;
  138. TimeStamp fddiSMTTransitionTimeStamp ;
  139. SetCountType fddiSMTSetCount ;
  140. struct smt_sid fddiSMTLastSetStationId ;
  141. struct fddi_mib_m {
  142. u_short fddiMACFrameStatusFunctions ;
  143. Timer_2 fddiMACT_MaxCapabilitiy ;
  144. Timer_2 fddiMACTVXCapabilitiy ;
  145. /* ConfigGrp */
  146. u_char fddiMACMultiple_N ; /* private */
  147. u_char fddiMACMultiple_P ; /* private */
  148. u_char fddiMACDuplicateAddressCond ;/* private */
  149. u_char fddiMACAvailablePaths ;
  150. u_short fddiMACCurrentPath ;
  151. LongAddr fddiMACUpstreamNbr ;
  152. LongAddr fddiMACDownstreamNbr ;
  153. LongAddr fddiMACOldUpstreamNbr ;
  154. LongAddr fddiMACOldDownstreamNbr ;
  155. SMTEnum fddiMACDupAddressTest ;
  156. u_short fddiMACRequestedPaths ;
  157. SMTEnum fddiMACDownstreamPORTType ;
  158. ResId fddiMACIndex ;
  159. /* AddressGrp */
  160. LongAddr fddiMACSMTAddress ;
  161. /* OperationGrp */
  162. Timer_2 fddiMACT_Min ; /* private */
  163. Timer_2 fddiMACT_ReqMIB ;
  164. Timer_2 fddiMACT_Req ; /* private */
  165. Timer_2 fddiMACT_Neg ;
  166. Timer_2 fddiMACT_MaxMIB ;
  167. Timer_2 fddiMACT_Max ; /* private */
  168. Timer_2 fddiMACTvxValueMIB ;
  169. Timer_2 fddiMACTvxValue ; /* private */
  170. Timer_2 fddiMACT_Pri0 ;
  171. Timer_2 fddiMACT_Pri1 ;
  172. Timer_2 fddiMACT_Pri2 ;
  173. Timer_2 fddiMACT_Pri3 ;
  174. Timer_2 fddiMACT_Pri4 ;
  175. Timer_2 fddiMACT_Pri5 ;
  176. Timer_2 fddiMACT_Pri6 ;
  177. /* CountersGrp */
  178. Counter fddiMACFrame_Ct ;
  179. Counter fddiMACCopied_Ct ;
  180. Counter fddiMACTransmit_Ct ;
  181. Counter fddiMACToken_Ct ;
  182. Counter fddiMACError_Ct ;
  183. Counter fddiMACLost_Ct ;
  184. Counter fddiMACTvxExpired_Ct ;
  185. Counter fddiMACNotCopied_Ct ;
  186. Counter fddiMACRingOp_Ct ;
  187. Counter fddiMACSMTCopied_Ct ; /* private */
  188. Counter fddiMACSMTTransmit_Ct ; /* private */
  189. /* private for delta ratio */
  190. Counter fddiMACOld_Frame_Ct ;
  191. Counter fddiMACOld_Copied_Ct ;
  192. Counter fddiMACOld_Error_Ct ;
  193. Counter fddiMACOld_Lost_Ct ;
  194. Counter fddiMACOld_NotCopied_Ct ;
  195. /* FrameErrorConditionGrp */
  196. u_short fddiMACFrameErrorThreshold ;
  197. u_short fddiMACFrameErrorRatio ;
  198. /* NotCopiedConditionGrp */
  199. u_short fddiMACNotCopiedThreshold ;
  200. u_short fddiMACNotCopiedRatio ;
  201. /* StatusGrp */
  202. SMTEnum fddiMACRMTState ;
  203. SMTFlag fddiMACDA_Flag ;
  204. SMTFlag fddiMACUNDA_Flag ;
  205. SMTFlag fddiMACFrameErrorFlag ;
  206. SMTFlag fddiMACNotCopiedFlag ;
  207. SMTFlag fddiMACMA_UnitdataAvailable ;
  208. SMTFlag fddiMACHardwarePresent ;
  209. SMTFlag fddiMACMA_UnitdataEnable ;
  210. } m[NUMMACS] ;
  211. #define MAC0 0
  212. struct fddi_mib_a {
  213. ResId fddiPATHIndex ;
  214. u_long fddiPATHSbaPayload ;
  215. u_long fddiPATHSbaOverhead ;
  216. /* fddiPATHConfiguration is built on demand */
  217. /* u_long fddiPATHConfiguration ; */
  218. Timer fddiPATHT_Rmode ;
  219. u_long fddiPATHSbaAvailable ;
  220. Timer_2 fddiPATHTVXLowerBound ;
  221. Timer_2 fddiPATHT_MaxLowerBound ;
  222. Timer_2 fddiPATHMaxT_Req ;
  223. } a[NUMPATHS] ;
  224. #define PATH0 0
  225. struct fddi_mib_p {
  226. /* ConfigGrp */
  227. SMTEnum fddiPORTMy_Type ;
  228. SMTEnum fddiPORTNeighborType ;
  229. u_char fddiPORTConnectionPolicies ;
  230. struct {
  231. u_char T_val ;
  232. u_char R_val ;
  233. } fddiPORTMacIndicated ;
  234. SMTEnum fddiPORTCurrentPath ;
  235. /* must be 4: is 32 bit in SMT format
  236.  * indices :
  237.  * 1 none
  238.  * 2 tree
  239.  * 3 peer
  240.  */
  241. u_char fddiPORTRequestedPaths[4] ;
  242. u_short fddiPORTMACPlacement ;
  243. u_char fddiPORTAvailablePaths ;
  244. u_char fddiPORTConnectionCapabilities ;
  245. SMTEnum fddiPORTPMDClass ;
  246. ResId fddiPORTIndex ;
  247. /* OperationGrp */
  248. SMTEnum fddiPORTMaint_LS ;
  249. SMTEnum fddiPORTPC_LS ;
  250. u_char fddiPORTBS_Flag ;
  251. /* ErrorCtrsGrp */
  252. Counter fddiPORTLCTFail_Ct ;
  253. Counter fddiPORTEBError_Ct ;
  254. Counter fddiPORTOldEBError_Ct ;
  255. /* LerGrp */
  256. Counter fddiPORTLem_Reject_Ct ;
  257. Counter fddiPORTLem_Ct ;
  258. u_char fddiPORTLer_Estimate ;
  259. u_char fddiPORTLer_Cutoff ;
  260. u_char fddiPORTLer_Alarm ;
  261. /* StatusGrp */
  262. SMTEnum fddiPORTConnectState ;
  263. SMTEnum fddiPORTPCMState ; /* real value */
  264. SMTEnum fddiPORTPCMStateX ; /* value for MIB */
  265. SMTEnum fddiPORTPC_Withhold ;
  266. SMTFlag fddiPORTHardwarePresent ;
  267. u_char fddiPORTLerFlag ;
  268. u_char fddiPORTMultiple_U ; /* private */
  269. u_char fddiPORTMultiple_P ; /* private */
  270. u_char fddiPORTEB_Condition ; /* private */
  271. } p[NUMPHYS] ;
  272. struct {
  273. Counter fddiPRIVECF_Req_Rx ; /* ECF req received */
  274. Counter fddiPRIVECF_Reply_Rx ; /* ECF repl received */
  275. Counter fddiPRIVECF_Req_Tx ; /* ECF req transm */
  276. Counter fddiPRIVECF_Reply_Tx ; /* ECF repl transm */
  277. Counter fddiPRIVPMF_Get_Rx ; /* PMF Get rec */
  278. Counter fddiPRIVPMF_Set_Rx ; /* PMF Set rec */
  279. Counter fddiPRIVRDF_Rx ; /* RDF received */
  280. Counter fddiPRIVRDF_Tx ; /* RDF transmitted */
  281. } priv ;
  282. } ;
  283. /*
  284.  * OIDs for statistics
  285.  */
  286. #define SMT_OID_CF_STATE 1 /* fddiSMTCF_State */
  287. #define SMT_OID_PCM_STATE_A 2 /* fddiPORTPCMState port A */
  288. #define SMT_OID_PCM_STATE_B 17 /* fddiPORTPCMState port B */
  289. #define SMT_OID_RMT_STATE 3 /* fddiMACRMTState */
  290. #define SMT_OID_UNA 4 /* fddiMACUpstreamNbr */
  291. #define SMT_OID_DNA 5 /* fddiMACOldDownstreamNbr */
  292. #define SMT_OID_ERROR_CT 6 /* fddiMACError_Ct */
  293. #define SMT_OID_LOST_CT 7 /* fddiMACLost_Ct */
  294. #define SMT_OID_LEM_CT 8 /* fddiPORTLem_Ct */
  295. #define SMT_OID_LEM_CT_A 11 /* fddiPORTLem_Ct port A */
  296. #define SMT_OID_LEM_CT_B 12 /* fddiPORTLem_Ct port B */
  297. #define SMT_OID_LCT_FAIL_CT 9 /* fddiPORTLCTFail_Ct */
  298. #define SMT_OID_LCT_FAIL_CT_A 13 /* fddiPORTLCTFail_Ct port A */
  299. #define SMT_OID_LCT_FAIL_CT_B 14 /* fddiPORTLCTFail_Ct port B */
  300. #define SMT_OID_LEM_REJECT_CT 10 /* fddiPORTLem_Reject_Ct */
  301. #define SMT_OID_LEM_REJECT_CT_A 15 /* fddiPORTLem_Reject_Ct port A */
  302. #define SMT_OID_LEM_REJECT_CT_B 16 /* fddiPORTLem_Reject_Ct port B */
  303. /*
  304.  * SK MIB
  305.  */
  306. #define SMT_OID_ECF_REQ_RX 20 /* ECF requests received */
  307. #define SMT_OID_ECF_REPLY_RX 21 /* ECF replies received */
  308. #define SMT_OID_ECF_REQ_TX 22 /* ECF requests transmitted */
  309. #define SMT_OID_ECF_REPLY_TX 23 /* ECF replies transmitted */
  310. #define SMT_OID_PMF_GET_RX 24 /* PMF get requests received */
  311. #define SMT_OID_PMF_SET_RX 25 /* PMF set requests received */
  312. #define SMT_OID_RDF_RX 26 /* RDF received */
  313. #define SMT_OID_RDF_TX 27 /* RDF transmitted */