Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

722 lines
23 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. nic1394.h
  5. Abstract:
  6. This module defines the structures, macros, and manifests available
  7. to IEE1394-aware network components.
  8. Revision History:
  9. 09/14/1998 JosephJ Created.
  10. --*/
  11. #ifndef _NIC1394_H_
  12. #define _NIC1394_H_
  13. //
  14. // Define USER_MODE in your user-mode app before including this file.
  15. //
  16. #if USER_MODE
  17. typedef USHORT NODE_ADDRESS;
  18. #endif // USER_MODE
  19. ///////////////////////////////////////////////////////////////////////////////////
  20. // ADDRESS FAMILY VERSION INFORMATION
  21. ///////////////////////////////////////////////////////////////////////////////////
  22. //
  23. // The current major and minor version, respectively, of the NIC1394 address family.
  24. //
  25. #define NIC1394_AF_CURRENT_MAJOR_VERSION 5
  26. #define NIC1394_AF_CURRENT_MINOR_VERSION 0
  27. ///////////////////////////////////////////////////////////////////////////////////
  28. // MEDIA PARAMETERS //
  29. ///////////////////////////////////////////////////////////////////////////////////
  30. //
  31. // 1394 FIFO Address, consisting of the 64-bit UniqueID and the
  32. // 48-bit address offset.
  33. //
  34. typedef struct _NIC1394_FIFO_ADDRESS
  35. {
  36. UINT64 UniqueID;
  37. ULONG Off_Low;
  38. USHORT Off_High;
  39. } NIC1394_FIFO_ADDRESS, *PNIC1394_FIFO_ADDRESS;
  40. // enum to identify which of the two modes of transmission on a 1394 is to be used
  41. //
  42. //
  43. typedef enum _NIC1394_ADDRESS_TYPE
  44. {
  45. NIC1394AddressType_Channel, // Indicates this is a channel address
  46. NIC1394AddressType_FIFO, // Indicates this is a FIFO address
  47. NIC1394AddressType_MultiChannel, // Indicates this is multiple-channel address
  48. NIC1394AddressType_Ethernet, // Indicates this is the ethernet emulation VC
  49. } NIC1394_ADDRESS_TYPE, *PNIC1394_ADDRESS_TYPE;
  50. //
  51. // General form of a 1394 destination, which can specify either a 1394 channel or
  52. // a FIFO address. This structure forms part of the 1394 media-specific
  53. // parameters.
  54. //
  55. typedef struct _NIC1394_DESTINATION
  56. {
  57. union
  58. {
  59. UINT Channel; // IEEE1394 channel number.
  60. NIC1394_FIFO_ADDRESS FifoAddress; // IEEE1394 NodeID and address offset.
  61. ULARGE_INTEGER ChannnelMap; // Identifies multiple channels.
  62. };
  63. NIC1394_ADDRESS_TYPE AddressType; // Address- asynch or isoch
  64. } NIC1394_DESTINATION, *PNIC1394_DESTINATION;
  65. //
  66. // Special channels values
  67. //
  68. #define NIC1394_ANY_CHANNEL ((UINT)-1) // miniport should pick channel.
  69. #define NIC1394_BROADCAST_CHANNEL ((UINT)-2) // special broadcast channel.
  70. //
  71. // This is the value of the ParamType field in the CO_SPECIFIC_PARAMETERS structure
  72. // when the Parameters[] field contains IEEE1394 media specific values in the
  73. // structure NIC1394_MEDIA_PARAMETERS.
  74. //
  75. #define NIC1394_MEDIA_SPECIFIC 0x13940000
  76. //
  77. // NOTES:
  78. // The CO_MEDIA_PARAMETERS.Flags field for FIFO vcs must specify either TRANSMIT_VC
  79. // or RECEIVE_VC, not both. If RECEIVE_VC is specified for a FIFO vc, this vc is
  80. // used to receive on a local FIFO. In this case, the Destination.RecvFIFO field
  81. // must be set to all-0s when creating the vc. On activation of the vc,
  82. // this field of the updated media parameters will contain the local nodes unique ID
  83. // and the allocated FIFO address.
  84. //
  85. // Multi-channel VC MUST specify RECEIVE_VC and not TRANSMIT_VC.
  86. // Only one multi-channel VC is supported per adapter.
  87. //
  88. //
  89. // Ethernet VC MUST specify BOTH RECEIVE_VC and TRANSMIT_VC.
  90. // Only one Ethernet VC is supported per adapter.
  91. //
  92. //
  93. // Notes on the Ethernet VC.
  94. // Packets sent and received on this VC are ethernet-style (802.3) packets.
  95. // The nic indicates packets it gets on it's connectionless SEND handler up
  96. // on this VC. The nic indicates packets SENT on this VC up on it's connectionless
  97. // receive handler.
  98. //
  99. //
  100. // 1394 Specific Media parameters - this is the Media specific structure for 1394
  101. // that goes into MediaParameters->MediaSpecific.Parameters.
  102. //
  103. typedef struct _NIC1394_MEDIA_PARAMETERS
  104. {
  105. //
  106. // Identifies destination type (channel or FIFO) and type-specific address.
  107. //
  108. NIC1394_DESTINATION Destination;
  109. //
  110. // Bitmap encoding characteristics of the vc. One or more NIC1394_VCFLAG_*
  111. // values.
  112. //
  113. ULONG Flags;
  114. //
  115. // Maximum size, in bytes, of blocks to be sent on this vc. Must be set to 0
  116. // if this is a recv-only VCs. The miniport will choose a block size that is a
  117. // minimum of this value and the value dictated by the bus speed map.
  118. // Special value (ULONG -1) indicates "maximum possible block size."
  119. UINT MaxSendBlockSize;
  120. //
  121. // One of the SCODE_* constants defined in 1394.h. Indicates
  122. // the maximum speed to be used for blocks sent on this vc. Must be set to 0
  123. // if this is a recv-only VC. The miniport will choose a speed that is a minimum
  124. // of this value and the value dicated by the bus speed map.
  125. // Special value (ULONG -1) indicates "maximum possible speed."
  126. //
  127. // TODO: change to ... MaxSendSpeedCode;
  128. //
  129. UINT MaxSendSpeed;
  130. //
  131. // Size, in bytes, of the largest packet that will be sent or received on
  132. // this VC. The miniport may use this information to set up internal buffers
  133. // for link-layer fragmentation and reassembly. The miniport will
  134. // fail attempts to send packets and will discard received packets if the
  135. // size of these packets is larger than the MTU.
  136. //
  137. UINT MTU;
  138. //
  139. // Amount of bandwidth to reserve, in units of bytes per isochronous frame.
  140. // Applies only for isochronous transmission, and must be set to 0 for
  141. // asynchronous transmission (i.e., if the NIC1394_VCFLAG_ISOCHRONOUS bit is 0).
  142. //
  143. UINT Bandwidth;
  144. //
  145. // One or more NIC1394_FRAMETYPE_* values. The miniport will attempt to send up
  146. // only pkts with these protocols. However it may send other pkts.
  147. // The client should be able to deal with this. Must be set to 0 if
  148. // no framing is used (i.e., if the NIC1394_VCFLAG_FRAMED bit is 0).
  149. //
  150. ULONG RecvFrameTypes;
  151. } NIC1394_MEDIA_PARAMETERS, *PNIC1394_MEDIA_PARAMETERS;
  152. //
  153. // NIC1394_MEDIA_PARAMETERS.Flags bitfield values
  154. //
  155. //
  156. // Indicates VC will be used for isochronous transmission.
  157. //
  158. #define NIC1394_VCFLAG_ISOCHRONOUS (0x1 << 1)
  159. //
  160. // Indicates that the vc is used for framed data. If set, the miniport will
  161. // implement link-level fragmentation and reassembly. If clear, the miniport
  162. // will treat data sent and received on this vc as raw data.
  163. //
  164. #define NIC1394_VCFLAG_FRAMED (0x1 << 2)
  165. //
  166. // Indicates the miniport should allocate the necessary bus resources.
  167. // Currently this only applies for non-broadcast channels, in which case
  168. // the bus resources consist of the network channel number and (for isochronous
  169. // vc's) the bandwidth specified in Bandwidth field.
  170. // This bit does not apply (and should be 0) when creating the broadcast channel
  171. // and either transmit or receive FIFO vcs.
  172. //
  173. #define NIC1394_VCFLAG_ALLOCATE (0x1 << 3)
  174. //
  175. // End of NIC1394_MEDIA_PARAMETERS.Flags bitfield values.
  176. //
  177. //
  178. // NIC1394_MEDIA_PARAMETERS.FrameType bitfield values
  179. //
  180. #define NIC1394_FRAMETYPE_ARP (0x1<<0) // Ethertype 0x806
  181. #define NIC1394_FRAMETYPE_IPV4 (0x1<<1) // Ethertype 0x800
  182. #define NIC1394_FRAMETYPE_IPV4MCAP (0x1<<2) // Ethertype 0x8861
  183. ///////////////////////////////////////////////////////////////////////////////////
  184. // INFORMATIONAL OIDs //
  185. ///////////////////////////////////////////////////////////////////////////////////
  186. //
  187. // the structure for returning basic information about the miniport
  188. // returned in response to OID_NIC1394_LOCAL_NODE_INFO. Associated with
  189. // the address family handle.
  190. //
  191. typedef struct _NIC1394_LOCAL_NODE_INFO
  192. {
  193. UINT64 UniqueID; // This node's 64-bit Unique ID.
  194. ULONG BusGeneration; // 1394 Bus generation ID.
  195. NODE_ADDRESS NodeAddress; // Local nodeID for the current bus
  196. // generation.
  197. USHORT Reserved; // Padding.
  198. UINT MaxRecvBlockSize; // Maximum size, in bytes, of blocks
  199. // that can be read.
  200. UINT MaxRecvSpeed; // Max speed which can be accepted
  201. // -- minimum
  202. // of the max local link speed and
  203. // the max local PHY speed.
  204. // UNITS: SCODE_XXX_RATE
  205. } NIC1394_LOCAL_NODE_INFO, *PNIC1394_LOCAL_NODE_INFO;
  206. //
  207. // The structure for returning basic information about the specified vc
  208. // returned in response to OID_NIC1394_VC_INFO. Associated with
  209. // a vc handle
  210. //
  211. typedef struct _NIC1394_VC_INFO
  212. {
  213. //
  214. // Channel or (unique-ID,offset). In the case of a recv (local) FIFO vc,
  215. // this will be set to the local node's unique ID and address offset.
  216. //
  217. NIC1394_DESTINATION Destination;
  218. } NIC1394_VC_INFO, *PNIC1394_VC_INFO;
  219. //
  220. // The structure for dynamically changing channel characteristics.
  221. //
  222. typedef struct _NIC1394_CHANNEL_CHARACTERISTICS
  223. {
  224. ULARGE_INTEGER ChannelMap; // Must be zero unless specifying a Multi-channel VC.
  225. ULONG Speed; // Same units as NIC1394_MEDIA_PARAMETERS.MaxSendSpeed.
  226. // Special value -1 means "no change in speed."
  227. } NIC1394_CHANNEL_CHARACTERISTICS, *PNIC1394_CHANNEL_CHARACTERISTICS;
  228. ///////////////////////////////////////////////////////////////////////////////////
  229. // INDICATIONS //
  230. ///////////////////////////////////////////////////////////////////////////////////
  231. // Bus Reset
  232. // Params: NIC1394_LOCAL_NODE_INFO
  233. ///////////////////////////////////////////////////////////////////////////////////
  234. // PACKET FORMATS //
  235. ///////////////////////////////////////////////////////////////////////////////////
  236. //
  237. // GASP Header, which prefixes all ip/1394 pkts sent over channels.
  238. // TODO: move this withing NIC1394, because it is not exposed to protocols.
  239. //
  240. typedef struct _NIC1394_GASP_HEADER
  241. {
  242. USHORT source_ID;
  243. USHORT specifier_ID_hi;
  244. UCHAR specifier_ID_lo;
  245. UCHAR version[3];
  246. } NIC1394_GASP_HEADER;
  247. //
  248. // Unfragmented encapsulation header.
  249. //
  250. typedef struct _NIC1394_ENCAPSULATION_HEADER
  251. {
  252. // Set to the 16-bit Node ID of the sending node, in machine-byte order.
  253. // Set to zero if the Node ID of the sender is not known.
  254. //
  255. //
  256. USHORT NodeId;
  257. // The EtherType field is set to the byte-swapped version of one of the
  258. // constants defined immediately below.
  259. //
  260. USHORT EtherType;
  261. // Ethertypes in machine byte order. These values need to be byteswapped
  262. // before they are sent on the wire.
  263. //
  264. #define NIC1394_ETHERTYPE_IP 0x800
  265. #define NIC1394_ETHERTYPE_ARP 0x806
  266. #define NIC1394_ETHERTYPE_MCAP 0x8861
  267. } NIC1394_ENCAPSULATION_HEADER, *PNIC1394_ENCAPSULATION_HEADER;
  268. //
  269. // TODO: get rid of NIC1394_ENCAPSULATION_HEADER
  270. //
  271. typedef
  272. NIC1394_ENCAPSULATION_HEADER
  273. NIC1394_UNFRAGMENTED_HEADER, *PNIC1394_UNFRAGMENTED_HEADER;
  274. //
  275. // FRAGMENTED PACKET FORMATS
  276. //
  277. // TODO: move these to inside NIC1394, because they are only
  278. // used within NIC1394.
  279. //
  280. //
  281. // Fragmented Encapsulation header: first fragment
  282. //
  283. typedef struct _NIC1394_FIRST_FRAGMENT_HEADER
  284. {
  285. // Contains the 2-bit "lf" field and the 12-bit "buffer_size" field.
  286. // Use the macros immediately below to extract the above fields from
  287. // the lfbufsz. This field needs to be byteswapped before it is sent out
  288. // on the wire.
  289. //
  290. USHORT lfbufsz;
  291. #define NIC1394_LF_FROM_LFBUFSZ(_lfbufsz) \
  292. ((_lfbufz) >> 14)
  293. #define NIC1394_BUFFER_SIZE_FROM_LFBUFSZ(_lfbufsz) \
  294. ((_lfbufz) & 0xfff)
  295. #define NIC1394_MAX_FRAGMENT_BUFFER_SIZE 0xfff
  296. //
  297. // specifies what the packet is - an IPV4, ARP, or MCAP packet
  298. //
  299. USHORT EtherType;
  300. // Opaque datagram label. There is no need to byteswap this field before it
  301. // is sent out on the wire.
  302. //
  303. USHORT dgl;
  304. // Must be set to 0
  305. //
  306. USHORT reserved;
  307. } NIC1394_FIRST_FRAGMENT_HEADER, *PNIC1394_FIRST_FRAGMENT_HEADER;
  308. //
  309. // Fragmented Encapsulation header: second and subsequent fragments
  310. //
  311. typedef struct _NIC1394_FRAGMENT_HEADER
  312. {
  313. #if OBSOLETE
  314. ULONG lf:2; // Bits 0-1
  315. ULONG rsv0:2; // Bits 2-3
  316. ULONG buffer_size:12; // Bits 4-15
  317. ULONG rsv1:4; // Bits 16-19
  318. ULONG fragment_offset:12; // Bits 20-31
  319. ULONG dgl:16; // Bits 0-15
  320. ULONG reserved:16; // Bits 16-32
  321. #endif // OBSOLETE
  322. // Contains the 2-bit "lf" field and the 12-bit "buffer_size" field.
  323. // The format is the same as NIC1394_FIRST_FRAGMENT_HEADER.lfbufsz.
  324. //
  325. USHORT lfbufsz;
  326. // Opaque datagram label. There is no need to byteswap this field before it
  327. // is setn out on the wire.
  328. //
  329. USHORT dgl;
  330. // Fragment offset. Must be less than or equal to NIC1394_MAX_FRAGMENT_OFFSET.
  331. // This field needs to be byteswapped before it is sent out on the wire.
  332. //
  333. USHORT fragment_offset;
  334. #define NIC1394_MAX_FRAGMENT_OFFSET 0xfff
  335. } NIC1394_FRAGMENT_HEADER, *PNIC1394_FRAGMENT_HEADER;
  336. // NIC1394_PACKET_STATS maintains information about either send or receive
  337. // packet transmission.
  338. //
  339. typedef struct
  340. {
  341. UINT TotNdisPackets; // Total number of NDIS packets sent/indicated
  342. UINT NdisPacketsFailures;// Number of NDIS packets failed/discarded
  343. UINT TotBusPackets; // Total number of BUS-level reads/writes
  344. UINT BusPacketFailures; // Number of BUS-level failures(sends)/discards(recv)
  345. } NIC1394_PACKET_STATS;
  346. // Types of structres used in OID OID_1394_NICINFO
  347. //
  348. typedef enum
  349. {
  350. NIC1394_NICINFO_OP_BUSINFO,
  351. NIC1394_NICINFO_OP_REMOTENODEINFO,
  352. NIC1394_NICINFO_OP_CHANNELINFO,
  353. NIC1394_NICINFO_OP_RESETSTATS,
  354. } NIC1394_NICINFO_OP;
  355. #define NIC1394_NICINFO_VERSION 2
  356. #define NIC1394_MAX_NICINFO_NODES 64
  357. #define NIC1394_MAX_NICINFO_CHANNELS 64
  358. //
  359. // The buffer used in OID OID_1394_NICINFO has the following common header.
  360. //
  361. typedef struct
  362. {
  363. UINT Version; // Set to NIC1394_NICINFO_VERSION
  364. NIC1394_NICINFO_OP Op; // One of NIC1394_NICINFO_OP_*
  365. } NIC1394_NICINFO_HEADER, *PNIC1394_NICINFO_HEADER;
  366. // NIC1394_BUSINFO is the structure corresponding to NIC1394_NICINFO_OP_BUSINFO.
  367. // It provides a summary of bus-wide information.
  368. //
  369. typedef struct
  370. {
  371. NIC1394_NICINFO_HEADER Hdr; // Hdr.Op == *OP_BUSINFO
  372. //
  373. // General information
  374. //
  375. UINT NumBusResets;
  376. UINT SecondsSinceBusReset;
  377. UINT NumOutstandingIrps;
  378. UINT Flags; // One or more NIC1394_BUSINFO_*
  379. #define NIC1394_BUSINFO_LOCAL_IS_IRM 0x1 // Local node is the IRM
  380. // Local node caps
  381. //
  382. NIC1394_LOCAL_NODE_INFO LocalNodeInfo;
  383. //
  384. // CHANNEL RELATED INFORMATION
  385. //
  386. struct
  387. {
  388. // The bus channel map register
  389. //
  390. UINT64 BusMap; // LSB bit == channel 0
  391. // Bitmap of locally active channels.
  392. // More information about each of these channels may be queried
  393. // using NIC1394_NICINFO_OP_CHANNELINFO.
  394. //
  395. UINT64 ActiveChannelMap;
  396. // BROADCAST CHANNEL
  397. //
  398. UINT Bcr; // Broadcast channels register.
  399. NIC1394_PACKET_STATS BcSendPktStats; // Send stats
  400. NIC1394_PACKET_STATS BcRecvPktStats; // Recv stats
  401. // Aggregated Channel stats
  402. //
  403. NIC1394_PACKET_STATS SendPktStats; // Send stats
  404. NIC1394_PACKET_STATS RecvPktStats; // Recv stats
  405. } Channel;
  406. //
  407. // FIFO RELATED INFORMATION.
  408. //
  409. struct
  410. {
  411. // Address offset of the receive fifo.
  412. //
  413. ULONG Recv_Off_Low;
  414. USHORT Recv_Off_High;
  415. // Aggregated stats across all fifos
  416. //
  417. NIC1394_PACKET_STATS RecvPktStats;
  418. NIC1394_PACKET_STATS SendPktStats;
  419. // Current number and min number of available (free) receive buffers.
  420. //
  421. UINT NumFreeRecvBuffers;
  422. UINT MinFreeRecvBuffers;
  423. // Number of outstanding reassemblies (receive side)
  424. //
  425. UINT NumOutstandingReassemblies;
  426. UINT MaxOutstandingReassemblies;
  427. UINT NumAbortedReassemblies;
  428. } Fifo;
  429. struct
  430. {
  431. //
  432. // To display private information, place format strings in FormatA and
  433. // Format B. The display program will do the following:
  434. // if (FormatA[0]) printf(FormatA, A0, A1, A2, A3);
  435. // if (FormatB[0]) printf(FormatB, B0, B1, B2, B3);
  436. //
  437. #define NIC1394_MAX_PRIVATE_FORMAT_SIZE 80
  438. char FormatA[NIC1394_MAX_PRIVATE_FORMAT_SIZE+1];
  439. char FormatB[NIC1394_MAX_PRIVATE_FORMAT_SIZE+1];
  440. UINT A0;
  441. UINT A1;
  442. UINT A2;
  443. UINT A3;
  444. UINT B0;
  445. UINT B1;
  446. UINT B2;
  447. UINT B3;
  448. } Private;
  449. //
  450. // Information about remote nodes. More information about each of these nodes
  451. // may be queried using *OP_REMOTE_NODEINFO
  452. //
  453. UINT NumRemoteNodes;
  454. UINT64 RemoteNodeUniqueIDS[NIC1394_MAX_NICINFO_NODES];
  455. } NIC1394_BUSINFO, *PNIC1394_BUSINFO;
  456. //
  457. // NIC1394_REMOTENODEINFO is structure corresponding to
  458. // NIC1394_NICINFO_OP_REMOTENODEINFO.
  459. // The structure contains basic information about a specific remote node.
  460. //
  461. typedef struct
  462. {
  463. NIC1394_NICINFO_HEADER Hdr; // Hdr.Op == *OP_REMOTENODEINFO
  464. UINT64 UniqueID; // This node's 64-bit Unique ID.
  465. // THIS IS AN IN PARAM
  466. USHORT NodeAddress; // Local nodeID for the current bus
  467. // generation.
  468. USHORT Reserved; // Padding.
  469. UINT MaxRec; // Remote node's MaxRec value.
  470. UINT EffectiveMaxBlockSize;// Max block size, in bytes,
  471. // used when writing to this node.
  472. // It is based on the minimum
  473. // of the max speed between devices
  474. // and the local and remote maxrecs.
  475. UINT MaxSpeedBetweenNodes;// Max speed which can be accepted
  476. // in units of SCODE_XXX_RATE.
  477. UINT Flags; // One or more NIC1394_REMOTEINFO* consts
  478. #define NIC1394_REMOTEINFO_ACTIVE (0x1<<0)
  479. #define NIC1394_REMOTEINFO_LOADING (0x1<<1)
  480. #define NIC1394_REMOTEINFO_UNLOADING (0x1<<2)
  481. NIC1394_PACKET_STATS SendFifoPktStats; // Fifo Sends to this node
  482. NIC1394_PACKET_STATS RecvFifoPktStats; // Fifo Recvs from this node
  483. NIC1394_PACKET_STATS RecvChannelPktStats;// Channel receives from this node
  484. } NIC1394_REMOTENODEINFO, *PNIC1394_REMOTENODEINFO;
  485. // NIC1394_CHANNELINFO is structure corresponding to
  486. // NIC1394_NICINFO_OP_CHANNELINFO.
  487. // The structure contains basic information about a specific channel.
  488. //
  489. typedef struct
  490. {
  491. NIC1394_NICINFO_HEADER Hdr; // Hdr.Op == *OP_CHANNELINFO
  492. UINT Channel; // Channel number (IN PARAM)
  493. UINT SendAge; // Age in seconds since it's been activated for sends.
  494. UINT RecvAge; // Age in seconds since it's been activated for recvs.
  495. UINT Flags; // One or more NIC1394_CHANNELINFO_* defines below
  496. #define NIC1394_CHANNELINFO_RECEIVE_ENABLED 0x1 // Enabled for receive
  497. #define NIC1394_CHANNELINFO_SEND_ENABLED 0x2 // Enabled for send
  498. #define NIC1394_CHANNELINFO_OWNER 0x4 // This node is the owner
  499. NIC1394_PACKET_STATS SendPktStats; // Send stats
  500. NIC1394_PACKET_STATS RecvPktStats; // Recv stats
  501. } NIC1394_CHANNELINFO, *PNIC1394_CHANNELINFO;
  502. // NIC1394_RESETSTATS is structure corresponding to
  503. // NIC1394_NICINFO_OP_RESETSTATS.
  504. // The structure doesn't contain anything useful -- this OP is used to
  505. // reset NIC statistics.
  506. //
  507. typedef struct
  508. {
  509. NIC1394_NICINFO_HEADER Hdr; // Hdr.Op == *OP_RESETSTATS
  510. } NIC1394_RESETSTATS, *PNIC1394_RESETSTATS;
  511. //
  512. // NIC1394_NICINFO is a union of all the structures that are used with
  513. // OID_1394_NICINFO.
  514. //
  515. typedef union
  516. {
  517. NIC1394_NICINFO_HEADER Hdr;
  518. NIC1394_BUSINFO BusInfo;
  519. NIC1394_REMOTENODEINFO RemoteNodeInfo;
  520. NIC1394_CHANNELINFO ChannelInfo;
  521. NIC1394_RESETSTATS ResetStats;
  522. } NIC1394_NICINFO, *PNIC1394_NICINFO;
  523. // Issues a 1394 bus reset. Used to test the BCM algorithm
  524. #define OID_1394_ISSUE_BUS_RESET 0xFF00C910
  525. // UnUsed - could be used to change channel characteristics
  526. #define OID_1394_CHANGE_CHANNEL_CHARACTERISTICS 0xFF00C911
  527. // used to query statistics and other information from the nic
  528. #define OID_1394_NICINFO 0xFF00C912
  529. // Used by arp1394 to ask the nic if it knows of any ip1394 nodes on the net
  530. #define OID_1394_IP1394_CONNECT_STATUS 0xFF00C913
  531. //Used by the bridge to state that the bridge has opened an adapter
  532. #define OID_1394_ENTER_BRIDGE_MODE 0xFF00C914
  533. // Used by the bridge to state that the bridge is closing an adapter
  534. #define OID_1394_EXIT_BRIDGE_MODE 0xFF00C915
  535. // Used by arp1394 to query the Euid, Source, Mac Map - used in the bridge
  536. #define OID_1394_QUERY_EUID_NODE_MAP 0xFF00C916
  537. typedef enum
  538. {
  539. NIC1394_EVENT_BUS_RESET
  540. } NIC1394_EVENT_CODE;
  541. //
  542. // This is a struct the miniport uses to indicate an event to the protocols (Arp1394)
  543. // It is used to
  544. // 1. Tell the Arp module that the bus has been reset
  545. // and informs it of the new local node address.
  546. //
  547. typedef struct _NIC1394_STATUS_BUFFER
  548. {
  549. UINT Signature; // == NIC1394_MEDIA_SPECIFIC
  550. NIC1394_EVENT_CODE Event;
  551. union
  552. {
  553. struct
  554. {
  555. NODE_ADDRESS LocalNode;
  556. UINT ulGeneration;
  557. }BusReset;
  558. };
  559. } NIC1394_STATUS_BUFFER, *PNIC1394_STATUS_BUFFER;
  560. #endif // _NIC1394_H_