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.

1573 lines
41 KiB

  1. /*
  2. * cmdtar.h
  3. *
  4. * Copyright (c) 1993 - 1995 by DataBeam Corporation, Lexington, KY
  5. *
  6. * Abstract:
  7. * This is the interface file for the CommandTarget class. This
  8. * is an abstract base class, meaning that it cannot be directly
  9. * instantiated, but rather, exists to be inherited from. It defines
  10. * a set of virtual member functions which will be shared by all classes
  11. * that inherit from this one.
  12. *
  13. * These virtual member function can be thought of as a "language" that
  14. * is used by CommandTarget objects to communicate with one another
  15. * at run-time. This language contains all "MCS commands" (or just
  16. * commands) that are necessary for domain management within an MCS
  17. * provider.
  18. *
  19. * The MCS commands that make up this language have a one-to-one
  20. * correspondence with the Domain Protocol Data Units (Domain MCSPDUs) that
  21. * are defined in T.125. There are also three additional MCS command that
  22. * do not have T.125 counterparts: ChannelLeaveIndication,
  23. * TokenReleaseIndication, and MergeDomainIndication. These are specific
  24. * to this implementation, and used for local traffic only (these do NOT
  25. * correspond to PDUs that travel over any connection). See the
  26. * description of each command at the end of this interface file to see
  27. * what each command does.
  28. *
  29. * The first parameter of all commands is the address of the object
  30. * who is sending it (its "this" pointer). This can be used by the
  31. * recipient of the command to track identity of other CommandTargets
  32. * in the system. Since all CommandTarget classes share the same
  33. * language, the communication between them is bi-directional.
  34. *
  35. * Any class inheriting from this one that wants to receive and process
  36. * a command needs to override the virtual member function corresponding
  37. * to that command. It is only necessary to override those commands that
  38. * a given class expects to receive at run-time (for example, the Channel
  39. * class would never receive a TokenGrabRequest).
  40. *
  41. * See the description of each class that inherits from this one for a
  42. * more complete discussion of how the command language is used.
  43. *
  44. * Caveats:
  45. * None.
  46. *
  47. * Author:
  48. * James P. Galvin, Jr.
  49. */
  50. #ifndef _COMMANDTARGET_
  51. #define _COMMANDTARGET_
  52. #include "clists.h"
  53. /*
  54. * This enumeration defines the valid types of attachments. Note that for
  55. * most operations, the domain class does not distinguish between user
  56. * attachments and MCS connections. They are both lumped under the term
  57. * attachment. There are, however, a few cases where this identity is
  58. * important, so the type is saved as one of the following:
  59. *
  60. * LOCAL_ATTACHMENT
  61. * This attachment type refers to a user attachment.
  62. * REMOTE_ATTACHMENT
  63. * This attachment type refers to an MCS connection (through one or more
  64. * transport connections).
  65. *
  66. * Each attachment in the attachment list is identified as one of these two
  67. * types.
  68. */
  69. /*
  70. * This is a set of container definitions using templates. All containers
  71. * are based on classes in the Rogue Wave Tools.h++ class library.
  72. *
  73. * Each container that is defined here has an associated iterator which is
  74. * not explicitly mentioned. All iterators simply allow the code to walk
  75. * through all items in the container in a very efficient manner.
  76. *
  77. * CAttachmentList
  78. * This is a dictionary of attachments that are hierarchically below the
  79. * current provider. The key to the dictionary is a pointer to an object
  80. * of class CommandTarget. The value is the attachment type, which is
  81. * either local (for user attachments), or remote (for MCS connections).
  82. * CChannelIDList
  83. * This is a list of channel IDs. This is used when it is necessary to
  84. * keep a list of channels to perform some action on (such as deletion)
  85. * that cannot be performed right away.
  86. * CUserIDList (aka CUidList)
  87. * This is a list of user IDs. This is for such things as keeping a list
  88. * of admitted users in a private channel, and keeping a list of inhibitors
  89. * of a token.
  90. * CTokenIDList
  91. * This is a list of token IDs. This is used when it is necessary to
  92. * keep a list of tokens to perform some action on (such as deletion)
  93. * that cannot be performed right away.
  94. */
  95. /*
  96. * These types are used when dealing with MCS channels.
  97. *
  98. * Channel_Type
  99. * This type defines the types of channels that are available in MCS.
  100. * StaticChannelAttributes
  101. * This structure is used to define those attributes that are specific
  102. * to static channels.
  103. * UserChannelAttributes
  104. * This structure is used to define those attributes that are specific
  105. * to user channels.
  106. * PrivateChannelAttributes
  107. * This structure is used to define those attributes that are specific
  108. * to private channels.
  109. * AssignedChannelAttributes
  110. * This structure is used to define those attributes that are specific
  111. * to assigned channels.
  112. * ChannelAttributes
  113. * This structure is used to define the attributes of ANY type of channel.
  114. * It contains a channel type, and a union of the above four types.
  115. * CChannelAttributesList
  116. * This is an S-list of ChannelAttributes structures.
  117. */
  118. typedef enum
  119. {
  120. STATIC_CHANNEL,
  121. USER_CHANNEL,
  122. PRIVATE_CHANNEL,
  123. ASSIGNED_CHANNEL
  124. } Channel_Type;
  125. typedef Channel_Type * PChannelType;
  126. typedef struct
  127. {
  128. ChannelID channel_id;
  129. } StaticChannelAttributes;
  130. typedef struct
  131. {
  132. DBBoolean joined;
  133. UserID user_id;
  134. } UserChannelAttributes;
  135. typedef struct
  136. {
  137. DBBoolean joined;
  138. ChannelID channel_id;
  139. UserID channel_manager;
  140. CUidList *admitted_list;
  141. } PrivateChannelAttributes;
  142. typedef struct
  143. {
  144. ChannelID channel_id;
  145. } AssignedChannelAttributes;
  146. typedef struct
  147. {
  148. Channel_Type channel_type;
  149. union
  150. {
  151. StaticChannelAttributes static_channel_attributes;
  152. UserChannelAttributes user_channel_attributes;
  153. PrivateChannelAttributes private_channel_attributes;
  154. AssignedChannelAttributes assigned_channel_attributes;
  155. } u;
  156. } ChannelAttributes;
  157. typedef ChannelAttributes * PChannelAttributes;
  158. class CChannelAttributesList : public CList
  159. {
  160. DEFINE_CLIST(CChannelAttributesList, PChannelAttributes)
  161. };
  162. /*
  163. * These types are used when dealing with MCS tokens.
  164. *
  165. * TokenState
  166. * This type specifies which state the token is in at any given time.
  167. * GrabbedTokenAttributes
  168. * This structure is used to define those attributes that are specific
  169. * to grabbed tokens.
  170. * InhibitedTokenAttributes
  171. * This structure is used to define those attributes that are specific
  172. * to inhibited tokens.
  173. * GivingTokenAttributes
  174. * This structure is used to define those attributes that are specific
  175. * to giving tokens.
  176. * GivenTokenAttributes
  177. * This structure is used to define those attributes that are specific
  178. * to given tokens.
  179. * TokenAttributes
  180. * This structure is used to define the attributes of ANY token. It
  181. * contains a token state, and a union of the above four types.
  182. * CTokenAttributesList
  183. * This is an S-list of TokenAttributes structures.
  184. */
  185. typedef enum
  186. {
  187. TOKEN_AVAILABLE,
  188. TOKEN_GRABBED,
  189. TOKEN_INHIBITED,
  190. TOKEN_GIVING,
  191. TOKEN_GIVEN
  192. } TokenState;
  193. typedef TokenState * PTokenState;
  194. typedef struct
  195. {
  196. TokenID token_id;
  197. UserID grabber;
  198. } GrabbedTokenAttributes;
  199. typedef struct
  200. {
  201. TokenID token_id;
  202. CUidList *inhibitors;
  203. } InhibitedTokenAttributes;
  204. typedef struct
  205. {
  206. TokenID token_id;
  207. UserID grabber;
  208. UserID recipient;
  209. } GivingTokenAttributes;
  210. typedef struct
  211. {
  212. TokenID token_id;
  213. UserID recipient;
  214. } GivenTokenAttributes;
  215. typedef struct
  216. {
  217. TokenState token_state;
  218. union
  219. {
  220. GrabbedTokenAttributes grabbed_token_attributes;
  221. InhibitedTokenAttributes inhibited_token_attributes;
  222. GivingTokenAttributes giving_token_attributes;
  223. GivenTokenAttributes given_token_attributes;
  224. } u;
  225. } TokenAttributes;
  226. typedef TokenAttributes * PTokenAttributes;
  227. class CTokenAttributesList : public CList
  228. {
  229. DEFINE_CLIST(CTokenAttributesList, PTokenAttributes)
  230. };
  231. /*
  232. * The following structure is passed around between CommandTarget
  233. * objects representing TokenGive requests and indications.
  234. */
  235. typedef struct
  236. {
  237. UserID uidInitiator;
  238. TokenID token_id;
  239. UserID receiver_id;
  240. } TokenGiveRecord;
  241. typedef TokenGiveRecord * PTokenGiveRecord;
  242. /*
  243. * These macros define the values used for domain parameters. The default
  244. * numbers are used upon initialization, to provide valid values. The
  245. * minimum and maximum numbers are used during arbitration, to provide a set
  246. * of limits that are specific to this implementation. Note that because
  247. * this implementation does not use a table driven approach that requires
  248. * up-front allocation of all resources, we do not impose an artificial limit
  249. * on resources. Resources (channels and tokens) will simply be allocated
  250. * as-needed until no more can be allocated (or until arbitrated domain
  251. * parameters have been reached).
  252. */
  253. #define DEFAULT_MAXIMUM_CHANNELS 1024
  254. #define DEFAULT_MAXIMUM_USERS 1024
  255. #define DEFAULT_MAXIMUM_TOKENS 1024
  256. #define DEFAULT_NUMBER_OF_PRIORITIES 3
  257. #define DEFAULT_NUM_PLUGXPRT_PRIORITIES 1
  258. #define DEFAULT_MINIMUM_THROUGHPUT 0
  259. #define DEFAULT_MAXIMUM_DOMAIN_HEIGHT 16
  260. #define DEFAULT_MAXIMUM_PDU_SIZE 4128
  261. #define DEFAULT_PROTOCOL_VERSION 2
  262. #define MINIMUM_MAXIMUM_CHANNELS 1
  263. #define MINIMUM_MAXIMUM_USERS 1
  264. #define MINIMUM_MAXIMUM_TOKENS 1
  265. #define MINIMUM_NUMBER_OF_PRIORITIES 1
  266. #define MINIMUM_NUM_PLUGXPRT_PRIORITIES 1
  267. #define MINIMUM_MINIMUM_THROUGHPUT 0
  268. #define MINIMUM_MAXIMUM_DOMAIN_HEIGHT 1
  269. #define MINIMUM_MAXIMUM_PDU_SIZE 1056
  270. #define MINIMUM_PROTOCOL_VERSION 2
  271. #define MAXIMUM_MAXIMUM_CHANNELS 65535L
  272. #define MAXIMUM_MAXIMUM_USERS 64535L
  273. #define MAXIMUM_MAXIMUM_TOKENS 65535L
  274. #define MAXIMUM_NUMBER_OF_PRIORITIES 4
  275. #define MAXIMUM_NUM_PLUGXPRT_PRIORITIES 1
  276. #define MAXIMUM_MINIMUM_THROUGHPUT 0
  277. #define MAXIMUM_MAXIMUM_DOMAIN_HEIGHT 100
  278. #define MAXIMUM_MAXIMUM_PDU_SIZE (8192 - PROTOCOL_OVERHEAD_X224 - PROTOCOL_OVERHEAD_SECURITY)
  279. #define MAXIMUM_PROTOCOL_VERSION 2
  280. #define PROTOCOL_VERSION_BASIC 1
  281. #define PROTOCOL_VERSION_PACKED 2
  282. /*
  283. * This macro is used to determine how many DataPacket objects to allocate. This class
  284. * is the most often created and destroyed during normal CommandTarget
  285. * traffic.
  286. */
  287. #define ALLOCATE_DATA_PACKET_OBJECTS 128
  288. /*
  289. * ~CommandTarget ()
  290. *
  291. * Functional Description:
  292. * This is a virtual destructor. It does not actually do anything in this
  293. * class. By declaring it as virtual, we guarantee that all destructors
  294. * in derived classes will be executed properly.
  295. *
  296. * Formal Parameters:
  297. * None.
  298. *
  299. * Return Value:
  300. * None.
  301. *
  302. * Side Effects:
  303. * None.
  304. *
  305. * Caveats:
  306. * None.
  307. */
  308. /*
  309. * Void PlumbDomainIndication (
  310. * PCommandTarget originator,
  311. * ULong height_limit)
  312. *
  313. * Functional Description:
  314. * This MCS command is used to insure that a cycle has not been created
  315. * in an MCS domain. It is broadcast downward after the creation of
  316. * a new MCS connection.
  317. *
  318. * Formal Parameters:
  319. * originator (i)
  320. * This is the address of the CommandTarget that issued this command.
  321. * height_limit (i)
  322. * This is the height limit from the originating domain downward.
  323. * It is decremented each time the PDU is forwarded down another
  324. * level.
  325. *
  326. * Return Value:
  327. * None.
  328. *
  329. * Side Effects:
  330. * None.
  331. *
  332. * Caveats:
  333. * None.
  334. */
  335. /*
  336. * Void ErectDomainRequest (
  337. * PCommandTarget originator,
  338. * ULong height_in_domain,
  339. * ULong throughput_interval)
  340. *
  341. * Functional Description:
  342. * This MCS command is used to communicate information upward to the
  343. * Top Provider. That information consists of the height of the current
  344. * provider and the throughput enforcement interval. Only the former is
  345. * supported at this time.
  346. *
  347. * Formal Parameters:
  348. * originator (i)
  349. * This is the address of the CommandTarget that issued this command.
  350. * height_in_domain (i)
  351. * This is the height of the originator in the domain.
  352. * throughput_interval (i)
  353. * This is not currently support, and will always be set to 0.
  354. *
  355. * Return Value:
  356. * None.
  357. *
  358. * Side Effects:
  359. * None.
  360. *
  361. * Caveats:
  362. * None.
  363. */
  364. /*
  365. * Void MergeChannelsRequest (
  366. * PCommandTarget originator,
  367. * CChannelAttributesList *merge_channel_list,
  368. * CChannelIDList *purge_channel_list)
  369. *
  370. * Functional Description:
  371. * This command represents a channel being merged upward.
  372. *
  373. * Formal Parameters:
  374. * originator (i)
  375. * This is the address of the CommandTarget that issued this command.
  376. * merge_channel_list (i)
  377. * This is list of attributes structures, each of which contains the
  378. * attributes of one channel being merged upward.
  379. * purge_channel_list (i)
  380. * This is a list of channels that are to purged from the lower domain.
  381. *
  382. * Return Value:
  383. * None.
  384. *
  385. * Side Effects:
  386. * None.
  387. *
  388. * Caveats:
  389. * None.
  390. */
  391. /*
  392. * Void MergeChannelsConfirm (
  393. * PCommandTarget originator,
  394. * CChannelAttributesList *merge_channel_list,
  395. * CChannelIDList *purge_channel_list)
  396. *
  397. * Functional Description:
  398. * This command represents the response to a previous request for a
  399. * channel to be merged upward.
  400. *
  401. * Formal Parameters:
  402. * originator (i)
  403. * This is the address of the CommandTarget that issued this command.
  404. * merge_channel_list (i)
  405. * This is list of attributes structures, each of which contains the
  406. * attributes of one channel that was successfully merged upward.
  407. * purge_channel_list (i)
  408. * This is a list of channels that are to purged from the lower domain.
  409. *
  410. * Return Value:
  411. * None.
  412. *
  413. * Side Effects:
  414. * None.
  415. *
  416. * Caveats:
  417. * None.
  418. */
  419. /*
  420. * Void PurgeChannelsIndication (
  421. * PCommandTarget originator,
  422. * CUidList *purge_user_list,
  423. * CChannelIDList *purge_channel_list)
  424. *
  425. * Functional Description:
  426. * This command represents a channel being purged from a lower domain
  427. * during a merge operation.
  428. *
  429. * Formal Parameters:
  430. * originator (i)
  431. * This is the address of the CommandTarget that issued this command.
  432. * purge_user_list (i)
  433. * This is a list of user IDs representing users being purged from
  434. * the lower domain during a merge operation.
  435. * purge_channel_list (i)
  436. * This is a list of channel IDs representing channels being purged
  437. * from the lower domain during a merge operation.
  438. *
  439. * Return Value:
  440. * None.
  441. *
  442. * Side Effects:
  443. * None.
  444. *
  445. * Caveats:
  446. * None.
  447. */
  448. /*
  449. * Void MergeTokensRequest (
  450. * PCommandTarget originator,
  451. * CTokenAttributesList *merge_token_list,
  452. * CTokenIDList *purge_token_list)
  453. *
  454. * Functional Description:
  455. * This command represents a token being merged upward.
  456. *
  457. * Formal Parameters:
  458. * originator (i)
  459. * This is the address of the CommandTarget that issued this command.
  460. * merge_token_list (i)
  461. * This is list of attributes structures, each of which contains the
  462. * attributes of one token being merged upward.
  463. * purge_token_list (i)
  464. * This is a list of tokens that are to purged from the lower domain.
  465. *
  466. * Return Value:
  467. * None.
  468. *
  469. * Side Effects:
  470. * None.
  471. *
  472. * Caveats:
  473. * None.
  474. */
  475. /*
  476. * Void MergeTokensConfirm (
  477. * PCommandTarget originator,
  478. * CTokenAttributesList *merge_token_list,
  479. * CTokenIDList *purge_token_list)
  480. *
  481. * Functional Description:
  482. * This command represents the response to a previous request for a
  483. * token merge.
  484. *
  485. * Formal Parameters:
  486. * originator (i)
  487. * This is the address of the CommandTarget that issued this command.
  488. * merge_token_list (i)
  489. * This is list of attributes structures, each of which contains the
  490. * attributes of one token being merged upward.
  491. * purge_token_list (i)
  492. * This is a list of tokens that are to purged from the lower domain.
  493. *
  494. * Return Value:
  495. * None.
  496. *
  497. * Side Effects:
  498. * None.
  499. *
  500. * Caveats:
  501. * None.
  502. */
  503. /*
  504. * Void PurgeTokensIndication (
  505. * PCommandTarget originator,
  506. * CTokenIDList *purge_token_list)
  507. *
  508. * Functional Description:
  509. * This command represents a token being purged from the lower domain
  510. * during a merge operation.
  511. *
  512. * Formal Parameters:
  513. * originator (i)
  514. * This is the address of the CommandTarget that issued this command.
  515. * purge_token_list (i)
  516. * This is a list of tokens that are to purged from the lower domain.
  517. *
  518. * Return Value:
  519. * None.
  520. *
  521. * Side Effects:
  522. * None.
  523. *
  524. * Caveats:
  525. * None.
  526. */
  527. /*
  528. * Void DisconnectProviderUltimatum (
  529. * PCommandTarget originator,
  530. * Reason reason)
  531. *
  532. * Functional Description:
  533. * This command represents an attachment into a domain being destroyed.
  534. * This can be either a user attachment or an MCS connection.
  535. *
  536. * Formal Parameters:
  537. * originator (i)
  538. * This is the address of the CommandTarget that issued this command.
  539. * reason (i)
  540. * The reason for the diconnect.
  541. *
  542. * Return Value:
  543. * None.
  544. *
  545. * Side Effects:
  546. * None.
  547. *
  548. * Caveats:
  549. * None.
  550. */
  551. /*
  552. * Void RejectUltimatum (
  553. * PCommandTarget originator,
  554. * Diagnostic diagnostic,
  555. * PUChar octet_string_address,
  556. * ULong octet_string_length)
  557. *
  558. * Functional Description:
  559. * This MCS command is used to indicate illegal traffic on an MCS
  560. * connection. The default response to this message is to disconnect
  561. * the connection that conveyed it.
  562. *
  563. * Formal Parameters:
  564. * originator (i)
  565. * This is the address of the CommandTarget that issued this command.
  566. * diagnostic (i)
  567. * One of the diagnostic codes elaborating on the cause of the problem.
  568. * octet_string_address (i)
  569. * The address of an optional user data field. This will usually
  570. * contain a copy of the packet that was received in error.
  571. * octet_string_length (i)
  572. * Length of the above field.
  573. *
  574. * Return Value:
  575. * None.
  576. *
  577. * Side Effects:
  578. * None.
  579. *
  580. * Caveats:
  581. * None.
  582. */
  583. /*
  584. * Void AttachUserRequest (
  585. * PCommandTarget originator)
  586. *
  587. * Functional Description:
  588. * This command represents a user request to attach to a domain.
  589. *
  590. * Formal Parameters:
  591. * originator (i)
  592. * This is the address of the CommandTarget that issued this command.
  593. *
  594. * Return Value:
  595. * None.
  596. *
  597. * Side Effects:
  598. * None.
  599. *
  600. * Caveats:
  601. * None.
  602. */
  603. /*
  604. * Void AttachUserConfirm (
  605. * PCommandTarget originator,
  606. * Result result,
  607. * UserID uidInitiator)
  608. *
  609. * Functional Description:
  610. * This command represents the result of a previous request to attach
  611. * to a domain.
  612. *
  613. * Formal Parameters:
  614. * originator (i)
  615. * This is the address of the CommandTarget that issued this command.
  616. * result (i)
  617. * The result of the attach request.
  618. * uidInitiator (i)
  619. * If the result was successful, this will contain the unique user
  620. * ID to be associated with this user.
  621. *
  622. * Return Value:
  623. * None.
  624. *
  625. * Side Effects:
  626. * None.
  627. *
  628. * Caveats:
  629. * None.
  630. */
  631. /*
  632. * Void DetachUserRequest (
  633. * PCommandTarget originator,
  634. * Reason reason,
  635. * CUidList *user_id_list)
  636. *
  637. * Functional Description:
  638. * This command represents a request to detach from a domain.
  639. *
  640. * Formal Parameters:
  641. * originator (i)
  642. * This is the address of the CommandTarget that issued this command.
  643. * reason (i)
  644. * This is the reason for the detachment.
  645. * user_id_list (i)
  646. * A list of user IDs of users who are detaching from the domain.
  647. *
  648. * Return Value:
  649. * None.
  650. *
  651. * Side Effects:
  652. * None.
  653. *
  654. * Caveats:
  655. * None.
  656. */
  657. /*
  658. * Void DetachUserIndication (
  659. * PCommandTarget originator,
  660. * Reason reason,
  661. * CUidList *user_id_list)
  662. *
  663. * Functional Description:
  664. * This command represents a notification that a user has detached from
  665. * the domain.
  666. *
  667. * Formal Parameters:
  668. * originator (i)
  669. * This is the address of the CommandTarget that issued this command.
  670. * reason (i)
  671. * The reason for the detachment.
  672. * user_id_list (i)
  673. * A list of user IDs of users who are detaching from the domain.
  674. *
  675. * Return Value:
  676. * None.
  677. *
  678. * Side Effects:
  679. * None.
  680. *
  681. * Caveats:
  682. * None.
  683. */
  684. /*
  685. * Void ChannelJoinRequest (
  686. * PCommandTarget originator,
  687. * UserID uidInitiator,
  688. * ChannelID channel_id)
  689. *
  690. * Functional Description:
  691. * This command represents a request to join a channel.
  692. *
  693. * Formal Parameters:
  694. * originator (i)
  695. * This is the address of the CommandTarget that issued this command.
  696. * uidInitiator (i)
  697. * The ID of the user who initiated the request.
  698. * channel_id (i)
  699. * The ID of the channel to be joined.
  700. *
  701. * Return Value:
  702. * None.
  703. *
  704. * Side Effects:
  705. * None.
  706. *
  707. * Caveats:
  708. * None.
  709. */
  710. /*
  711. * Void ChannelJoinConfirm (
  712. * PCommandTarget originator,
  713. * Result result,
  714. * UserID uidInitiator,
  715. * ChannelID requested_id,
  716. * ChannelID channel_id)
  717. *
  718. * Functional Description:
  719. * This command represents a response to a previous request to join a
  720. * channel.
  721. *
  722. * Formal Parameters:
  723. * originator (i)
  724. * This is the address of the CommandTarget that issued this command.
  725. * result (i)
  726. * The result of the join request.
  727. * uidInitiator (i)
  728. * The ID of the user who initiated the request.
  729. * requested_id (i)
  730. * This is the ID of the channel that was originally requested (which
  731. * may be 0).
  732. * channel_id (i)
  733. * The ID of the channel being joined.
  734. *
  735. * Return Value:
  736. * None.
  737. *
  738. * Side Effects:
  739. * None.
  740. *
  741. * Caveats:
  742. * None.
  743. */
  744. /*
  745. * Void ChannelLeaveRequest (
  746. * PCommandTarget originator,
  747. * CChannelIDList *channel_id_list)
  748. *
  749. * Functional Description:
  750. * This command represents a request to leave a channel.
  751. *
  752. * Formal Parameters:
  753. * originator (i)
  754. * This is the address of the CommandTarget that issued this command.
  755. * channel_id_list (i)
  756. * A list of channel IDs to be left.
  757. *
  758. * Return Value:
  759. * None.
  760. *
  761. * Side Effects:
  762. * None.
  763. *
  764. * Caveats:
  765. * None.
  766. */
  767. /*
  768. * Void ChannelConveneRequest (
  769. * PCommandTarget originator,
  770. * UserID uidInitiator)
  771. *
  772. * Functional Description:
  773. * This command represents a request to form a new private channel.
  774. *
  775. * Formal Parameters:
  776. * originator (i)
  777. * This is the address of the CommandTarget that issued this command.
  778. * uidInitiator (i)
  779. * This is the initiator of the request. If the request is
  780. * successful, this wil be the channel manager.
  781. *
  782. * Return Value:
  783. * None.
  784. *
  785. * Side Effects:
  786. * None.
  787. *
  788. * Caveats:
  789. * None.
  790. */
  791. /*
  792. * Void ChannelConveneConfirm (
  793. * PCommandTarget originator,
  794. * Result result,
  795. * UserID uidInitiator,
  796. * ChannelID channel_id)
  797. *
  798. * Functional Description:
  799. * This command represents a response to a previous request to create a
  800. * new private channel.
  801. *
  802. * Formal Parameters:
  803. * originator (i)
  804. * This is the address of the CommandTarget that issued this command.
  805. * result (i)
  806. * This indicates whether or not the request was successful.
  807. * uidInitiator (i)
  808. * This is the User ID of the user who requested the creation of the
  809. * new private channel.
  810. * channel_id (i)
  811. * The ID of the new private channel (if the request was successful).
  812. *
  813. * Return Value:
  814. * None.
  815. *
  816. * Side Effects:
  817. * None.
  818. *
  819. * Caveats:
  820. * None.
  821. */
  822. /*
  823. * Void ChannelDisbandRequest (
  824. * PCommandTarget originator,
  825. * UserID uidInitiator,
  826. * ChannelID channel_id)
  827. *
  828. * Functional Description:
  829. * This command represents a request to destroy an existing private
  830. * channel.
  831. *
  832. * Formal Parameters:
  833. * originator (i)
  834. * This is the address of the CommandTarget that issued this command.
  835. * uidInitiator (i)
  836. * This is the User ID of the user who is trying to destroy the private
  837. * channel. If this is not the same as the channel manager, the
  838. * request will be denied.
  839. * channel_id (i)
  840. * The ID of the channel to be destroyed.
  841. *
  842. * Return Value:
  843. * None.
  844. *
  845. * Side Effects:
  846. * None.
  847. *
  848. * Caveats:
  849. * None.
  850. */
  851. /*
  852. * Void ChannelDisbandIndication (
  853. * PCommandTarget originator,
  854. * ChannelID channel_id)
  855. *
  856. * Functional Description:
  857. * This command represents the destruction of an existing private channel.
  858. *
  859. * Formal Parameters:
  860. * originator (i)
  861. * This is the address of the CommandTarget that issued this command.
  862. * channel_id (i)
  863. * The ID of the channel to be destroyed.
  864. *
  865. * Return Value:
  866. * None.
  867. *
  868. * Side Effects:
  869. * None.
  870. *
  871. * Caveats:
  872. * None.
  873. */
  874. /*
  875. * Void ChannelAdmitRequest (
  876. * PCommandTarget originator,
  877. * UserID uidInitiator,
  878. * ChannelID channel_id,
  879. * CUidList *user_id_list)
  880. *
  881. * Functional Description:
  882. * This command represents a request to add new user IDs to an existing
  883. * private channel.
  884. *
  885. * Formal Parameters:
  886. * originator (i)
  887. * This is the address of the CommandTarget that issued this command.
  888. * uidInitiator (i)
  889. * This is the User ID of the user that is trying to expand the list
  890. * of authorized users. If this is not the channel manager, the
  891. * request will fail.
  892. * channel_id (i)
  893. * The ID of the private channel to be affected.
  894. * user_id_list (i)
  895. * This is a container holding the User IDs to be added to the
  896. * authorized user list.
  897. *
  898. * Return Value:
  899. * None.
  900. *
  901. * Side Effects:
  902. * None.
  903. *
  904. * Caveats:
  905. * None.
  906. */
  907. /*
  908. * Void ChannelAdmitIndication (
  909. * PCommandTarget originator,
  910. * UserID uidInitiator,
  911. * ChannelID channel_id,
  912. * CUidList *user_id_list)
  913. *
  914. * Functional Description:
  915. * This command represents the expansion of the authorized user list for a
  916. * private channel.
  917. *
  918. * Formal Parameters:
  919. * originator (i)
  920. * This is the address of the CommandTarget that issued this command.
  921. * uidInitiator (i)
  922. * This identifies the channel manager.
  923. * channel_id (i)
  924. * The ID of the private channel to be affected.
  925. * user_id_list (i)
  926. * This is a container holding the User IDs to be added to the
  927. * authorized user list.
  928. *
  929. * Return Value:
  930. * None.
  931. *
  932. * Side Effects:
  933. * None.
  934. *
  935. * Caveats:
  936. * None.
  937. */
  938. /*
  939. * Void ChannelExpelRequest (
  940. * PCommandTarget originator,
  941. * UserID uidInitiator,
  942. * ChannelID channel_id,
  943. * CUidList *user_id_list)
  944. *
  945. * Functional Description:
  946. * This command represents a request to remove user IDs from an existing
  947. * private channel.
  948. *
  949. * Formal Parameters:
  950. * originator (i)
  951. * This is the address of the CommandTarget that issued this command.
  952. * uidInitiator (i)
  953. * This is the User ID of the user that is trying to shrink the list
  954. * of authorized users. If this is not the channel manager, the
  955. * request will fail.
  956. * channel_id (i)
  957. * The ID of the private channel to be affected.
  958. * user_id_list (i)
  959. * This is a container holding the User IDs to be removed from the
  960. * authorized user list.
  961. *
  962. * Return Value:
  963. * None.
  964. *
  965. * Side Effects:
  966. * None.
  967. *
  968. * Caveats:
  969. * None.
  970. */
  971. /*
  972. * Void ChannelExpelIndication (
  973. * PCommandTarget originator,
  974. * ChannelID channel_id,
  975. * CUidList *user_id_list)
  976. *
  977. * Functional Description:
  978. * This command represents the shrinkage of the authorized user list for a
  979. * private channel.
  980. *
  981. * Formal Parameters:
  982. * originator (i)
  983. * This is the address of the CommandTarget that issued this command.
  984. * channel_id (i)
  985. * The ID of the private channel to be affected.
  986. * user_id_list (i)
  987. * This is a container holding the User IDs to be removed from the
  988. * authorized user list.
  989. *
  990. * Return Value:
  991. * None.
  992. *
  993. * Side Effects:
  994. * None.
  995. *
  996. * Caveats:
  997. * None.
  998. */
  999. /*
  1000. * Void SendDataRequest (
  1001. * PCommandTarget originator,
  1002. * UINT type,
  1003. PDataPacket data_packet)
  1004. *
  1005. * Functional Description:
  1006. * This command represents non-uniform data travelling upward in the
  1007. * domain.
  1008. *
  1009. * Formal Parameters:
  1010. * originator (i)
  1011. * This is the address of the CommandTarget that issued this command.
  1012. * type (i)
  1013. * Normal or uniform send data request
  1014. * data_packet (i)
  1015. * This is a pointer to a DataPacket object containing the channel
  1016. * ID, the User ID of the data sender, segmentation flags, priority of
  1017. * the data packet and a pointer to the packet to be sent.
  1018. *
  1019. * Return Value:
  1020. * None.
  1021. *
  1022. * Side Effects:
  1023. * None.
  1024. *
  1025. * Caveats:
  1026. * None.
  1027. */
  1028. /*
  1029. * Void SendDataIndication (
  1030. * PCommandTarget originator,
  1031. * UINT type,
  1032. * PDataPacket data_packet)
  1033. *
  1034. * Functional Description:
  1035. * This command represents non-uniform data travelling downward in the
  1036. * domain.
  1037. *
  1038. * Formal Parameters:
  1039. * originator (i)
  1040. * This is the address of the CommandTarget that issued this command.
  1041. * type (i)
  1042. * normal or uniform data indication
  1043. * data_packet (i)
  1044. * This is a pointer to a DataPacket object containing the channel
  1045. * ID, the User ID of the data sender, segmentation flags, priority of
  1046. * the data packet and a pointer to the packet to be sent.
  1047. *
  1048. * Return Value:
  1049. * None.
  1050. *
  1051. * Side Effects:
  1052. * None.
  1053. *
  1054. * Caveats:
  1055. * None.
  1056. */
  1057. /*
  1058. * Void UniformSendDataRequest (
  1059. * PCommandTarget originator,
  1060. * PDataPacket data_packet)
  1061. *
  1062. * Functional Description:
  1063. * This command represents uniform data travelling upward in the domain.
  1064. *
  1065. * Formal Parameters:
  1066. * originator (i)
  1067. * This is the address of the CommandTarget that issued this command.
  1068. * data_packet (i)
  1069. * This is a pointer to a DataPacket object containing the channel
  1070. * ID, the User ID of the data sender, segmentation flags, priority of
  1071. * the data packet and a pointer to the packet to be sent.
  1072. *
  1073. * Return Value:
  1074. * None.
  1075. *
  1076. * Side Effects:
  1077. * None.
  1078. *
  1079. * Caveats:
  1080. * None.
  1081. */
  1082. /*
  1083. * Void TokenGrabRequest (
  1084. * PCommandTarget originator,
  1085. * UserID uidInitiator,
  1086. * TokenID token_id)
  1087. *
  1088. * Functional Description:
  1089. * This command represents a request to grab a token.
  1090. *
  1091. * Formal Parameters:
  1092. * originator (i)
  1093. * This is the address of the CommandTarget that issued this command.
  1094. * uidInitiator (i)
  1095. * The ID of the user attempting to grab the token.
  1096. * token_id (i)
  1097. * The ID of the token being grabbed.
  1098. *
  1099. * Return Value:
  1100. * None.
  1101. *
  1102. * Side Effects:
  1103. * None.
  1104. *
  1105. * Caveats:
  1106. * None.
  1107. */
  1108. /*
  1109. * Void TokenGrabConfirm (
  1110. * PCommandTarget originator,
  1111. * Result result,
  1112. * UserID uidInitiator,
  1113. * TokenID token_id,
  1114. * TokenStatus token_status)
  1115. *
  1116. * Functional Description:
  1117. * This command represents a response to a previous request to grab a
  1118. * token.
  1119. *
  1120. * Formal Parameters:
  1121. * originator (i)
  1122. * This is the address of the CommandTarget that issued this command.
  1123. * result (i)
  1124. * The result of the grab operation.
  1125. * uidInitiator (i)
  1126. * The ID of the user attempting to grab the token.
  1127. * token_id (i)
  1128. * The ID of the token being grabbed.
  1129. * token_status (i)
  1130. * The status of the token after processing the request.
  1131. *
  1132. * Return Value:
  1133. * None.
  1134. *
  1135. * Side Effects:
  1136. * None.
  1137. *
  1138. * Caveats:
  1139. * None.
  1140. */
  1141. /*
  1142. * Void TokenInhibitRequest (
  1143. * PCommandTarget originator,
  1144. * UserID uidInitiator,
  1145. * TokenID token_id)
  1146. *
  1147. * Functional Description:
  1148. * This command represents a request to inhibit a token.
  1149. *
  1150. * Formal Parameters:
  1151. * originator (i)
  1152. * This is the address of the CommandTarget that issued this command.
  1153. * uidInitiator (i)
  1154. * The ID of the user attempting to inhibit the token.
  1155. * token_id (i)
  1156. * The ID of the token being inhibited.
  1157. *
  1158. * Return Value:
  1159. * None.
  1160. *
  1161. * Side Effects:
  1162. * None.
  1163. *
  1164. * Caveats:
  1165. * None.
  1166. */
  1167. /*
  1168. * Void TokenInhibitConfirm (
  1169. * PCommandTarget originator,
  1170. * Result result,
  1171. * UserID uidInitiator,
  1172. * TokenID token_id,
  1173. * TokenStatus token_status)
  1174. *
  1175. * Functional Description:
  1176. * This command represents a response to a previous request to inhibit a
  1177. * token.
  1178. *
  1179. * Formal Parameters:
  1180. * originator (i)
  1181. * This is the address of the CommandTarget that issued this command.
  1182. * result (i)
  1183. * The result of the inhibit operation.
  1184. * uidInitiator (i)
  1185. * The ID of the user attempting to inhibit the token.
  1186. * token_id (i)
  1187. * The ID of the token being inhibited.
  1188. * token_status (i)
  1189. * The status of the token after processing the request.
  1190. *
  1191. * Return Value:
  1192. * None.
  1193. *
  1194. * Side Effects:
  1195. * None.
  1196. *
  1197. * Caveats:
  1198. * None.
  1199. */
  1200. /*
  1201. * Void TokenGiveRequest (
  1202. * PCommandTarget originator,
  1203. * PTokenGiveRecord pTokenGiveRec)
  1204. *
  1205. * Functional Description:
  1206. * This command represents a request to give a token to another user.
  1207. *
  1208. * Formal Parameters:
  1209. * originator (i)
  1210. * This is the address of the CommandTarget that issued this command.
  1211. * pTokenGiveRec (i)
  1212. * This is the address of a structure containing the following information:
  1213. * The ID of the user attempting to give away the token.
  1214. * The ID of the token being given.
  1215. * The ID of the user that the token is being given to.
  1216. *
  1217. * Return Value:
  1218. * None.
  1219. *
  1220. * Side Effects:
  1221. * None.
  1222. *
  1223. * Caveats:
  1224. * None.
  1225. */
  1226. /*
  1227. * Void TokenGiveIndication (
  1228. * PCommandTarget originator,
  1229. * PTokenGiveRecord pTokenGiveRec)
  1230. *
  1231. * Functional Description:
  1232. * This command represents notification that a user is trying to give a
  1233. * token to someone else. It is issued by the Top Provider and propagates
  1234. * downward to the recipient.
  1235. *
  1236. * Formal Parameters:
  1237. * originator (i)
  1238. * This is the address of the CommandTarget that issued this command.
  1239. * pTokenGiveRec (i)
  1240. * This is the address of a structure containing the following information:
  1241. * The ID of the user attempting to give away the token.
  1242. * The ID of the token being given.
  1243. * The ID of the user that the token is being given to.
  1244. *
  1245. * Return Value:
  1246. * None.
  1247. *
  1248. * Side Effects:
  1249. * None.
  1250. *
  1251. * Caveats:
  1252. * None.
  1253. */
  1254. /*
  1255. * Void TokenGiveResponse (
  1256. * PCommandTarget originator,
  1257. * Result result,
  1258. * UserID receiver_id,
  1259. * TokenID token_id)
  1260. *
  1261. * Functional Description:
  1262. * This command represents a response to an offer to give away a token.
  1263. * It is issued by the recipient of a give offer, and moves upward to
  1264. * the Top Provider. It contains the result of the give request.
  1265. *
  1266. * Formal Parameters:
  1267. * originator (i)
  1268. * This is the address of the CommandTarget that issued this command.
  1269. * result (i)
  1270. * This parameter indicates whether or not the token was accepted.
  1271. * RESULT_SUCCESSFUL means that it was.
  1272. * receiver_id (i)
  1273. * The ID of the user that the token is being given to.
  1274. * token_id (i)
  1275. * The ID of the token being given.
  1276. *
  1277. * Return Value:
  1278. * None.
  1279. *
  1280. * Side Effects:
  1281. * None.
  1282. *
  1283. * Caveats:
  1284. * None.
  1285. */
  1286. /*
  1287. * Void TokenGiveConfirm (
  1288. * PCommandTarget originator,
  1289. * Result result,
  1290. * UserID uidInitiator,
  1291. * TokenID token_id,
  1292. * TokenStatus token_status)
  1293. *
  1294. * Functional Description:
  1295. * This command represents a response to a previous call to
  1296. * TokenGiveRequest. It flows downward to the original giver letting it
  1297. * know whether or not the token was accepted.
  1298. *
  1299. * Formal Parameters:
  1300. * originator (i)
  1301. * This is the address of the CommandTarget that issued this command.
  1302. * result (i)
  1303. * This parameter indicates whether or not the token was accepted.
  1304. * RESULT_SUCCESSFUL means that it was.
  1305. * uidInitiator (i)
  1306. * The ID of the user attempting to give away a token.
  1307. * token_id (i)
  1308. * The ID of the token being given.
  1309. * token_status (i)
  1310. * The status of the token as a result of the give operation.
  1311. *
  1312. * Return Value:
  1313. * None.
  1314. *
  1315. * Side Effects:
  1316. * None.
  1317. *
  1318. * Caveats:
  1319. * None.
  1320. */
  1321. /*
  1322. * Void TokenPleaseRequest (
  1323. * PCommandTarget originator,
  1324. * UserID uidInitiator,
  1325. * TokenID token_id)
  1326. *
  1327. * Functional Description:
  1328. * This command represents a request to receive a token that is already
  1329. * owned by one or more other users.
  1330. *
  1331. * Formal Parameters:
  1332. * originator (i)
  1333. * This is the address of the CommandTarget that issued this command.
  1334. * uidInitiator (i)
  1335. * The ID of the user that wishes to own the token.
  1336. * token_id (i)
  1337. * The ID of the token that the user wishes to own.
  1338. *
  1339. * Return Value:
  1340. * None.
  1341. *
  1342. * Side Effects:
  1343. * None.
  1344. *
  1345. * Caveats:
  1346. * None.
  1347. */
  1348. /*
  1349. * Void TokenPleaseIndication (
  1350. * PCommandTarget originator,
  1351. * UserID uidInitiator,
  1352. * TokenID token_id)
  1353. *
  1354. * Functional Description:
  1355. * This command represents a request by another user to own the token.
  1356. * This is issued by the Top Provider and flows downward to all current
  1357. * owners of the specified token.
  1358. *
  1359. * Formal Parameters:
  1360. * originator (i)
  1361. * This is the address of the CommandTarget that issued this command.
  1362. * uidInitiator (i)
  1363. * The ID of the user that wishes to own the token.
  1364. * token_id (i)
  1365. * The ID of the token that the user wishes to own.
  1366. *
  1367. * Return Value:
  1368. * None.
  1369. *
  1370. * Side Effects:
  1371. * None.
  1372. *
  1373. * Caveats:
  1374. * None.
  1375. */
  1376. /*
  1377. * Void TokenReleaseRequest (
  1378. * PCommandTarget originator,
  1379. * UserID uidInitiator,
  1380. * TokenID token_id)
  1381. *
  1382. * Functional Description:
  1383. * This command represents a request to release a token.
  1384. *
  1385. * Formal Parameters:
  1386. * originator (i)
  1387. * This is the address of the CommandTarget that issued this command.
  1388. * uidInitiator (i)
  1389. * The ID of the user attempting to release the token.
  1390. * token_id (i)
  1391. * The ID of the token being released.
  1392. *
  1393. * Return Value:
  1394. * None.
  1395. *
  1396. * Side Effects:
  1397. * None.
  1398. *
  1399. * Caveats:
  1400. * None.
  1401. */
  1402. /*
  1403. * Void TokenReleaseIndication (
  1404. * PCommandTarget originator,
  1405. * Reason reason,
  1406. * TokenID token_id)
  1407. *
  1408. * Functional Description:
  1409. * This command represents an indication that a user has lost ownership
  1410. * of a token during a merge operation.
  1411. *
  1412. * Formal Parameters:
  1413. * originator (i)
  1414. * This is the address of the CommandTarget that issued this command.
  1415. * reason (i)
  1416. * This is the reason that the user's ownership of the token is
  1417. * being taken away.
  1418. * token_id (i)
  1419. * The ID of the token being taken away.
  1420. *
  1421. * Return Value:
  1422. * None.
  1423. *
  1424. * Side Effects:
  1425. * None.
  1426. *
  1427. * Caveats:
  1428. * None.
  1429. */
  1430. /*
  1431. * Void TokenReleaseConfirm (
  1432. * PCommandTarget originator,
  1433. * Result result,
  1434. * UserID uidInitiator,
  1435. * TokenID token_id,
  1436. * TokenStatus token_status)
  1437. *
  1438. * Functional Description:
  1439. * This command represents a response to a previous request to release a
  1440. * token.
  1441. *
  1442. * Formal Parameters:
  1443. * originator (i)
  1444. * This is the address of the CommandTarget that issued this command.
  1445. * result (i)
  1446. * The result of the release operation.
  1447. * uidInitiator (i)
  1448. * The ID of the user attempting to release the token.
  1449. * token_id (i)
  1450. * The ID of the token being released.
  1451. * token_status (i)
  1452. * The status of the token after processing the request.
  1453. *
  1454. * Return Value:
  1455. * None.
  1456. *
  1457. * Side Effects:
  1458. * None.
  1459. *
  1460. * Caveats:
  1461. * None.
  1462. */
  1463. /*
  1464. * Void TokenTestRequest (
  1465. * PCommandTarget originator,
  1466. * UserID uidInitiator,
  1467. * TokenID token_id)
  1468. *
  1469. * Functional Description:
  1470. * This command represents a request to test a token.
  1471. *
  1472. * Formal Parameters:
  1473. * originator (i)
  1474. * This is the address of the CommandTarget that issued this command.
  1475. * uidInitiator (i)
  1476. * The ID of the user testing the token.
  1477. * token_id (i)
  1478. * The ID of the token being tested.
  1479. *
  1480. * Return Value:
  1481. * None.
  1482. *
  1483. * Side Effects:
  1484. * None.
  1485. *
  1486. * Caveats:
  1487. * None.
  1488. */
  1489. /*
  1490. * Void TokenTestConfirm (
  1491. * PCommandTarget originator,
  1492. * UserID uidInitiator,
  1493. * TokenID token_id,
  1494. * TokenStatus token_status)
  1495. *
  1496. * Functional Description:
  1497. * This command represents a response to a previous request to test a
  1498. * token.
  1499. *
  1500. * Formal Parameters:
  1501. * originator (i)
  1502. * This is the address of the CommandTarget that issued this command.
  1503. * uidInitiator (i)
  1504. * The ID of the user testing the token.
  1505. * token_id (i)
  1506. * The ID of the token being tested.
  1507. * token_status (i)
  1508. * The status of the token after processing the request.
  1509. *
  1510. * Return Value:
  1511. * None.
  1512. *
  1513. * Side Effects:
  1514. * None.
  1515. *
  1516. * Caveats:
  1517. * None.
  1518. */
  1519. /*
  1520. * Void MergeDomainIndication (
  1521. * PCommandTarget originator,
  1522. * MergeStatus merge_status)
  1523. *
  1524. * Functional Description:
  1525. * This command indicates that the local provider is either entering or
  1526. * leaving a domain merge state.
  1527. *
  1528. * Formal Parameters:
  1529. * originator (i)
  1530. * This is the address of the CommandTarget that issued this command.
  1531. * merge_status (i)
  1532. * This indicates whether the provider is entering or leaving the merge
  1533. * state.
  1534. *
  1535. * Return Value:
  1536. * None.
  1537. *
  1538. * Side Effects:
  1539. * When issued by a domain, it means that no upward traffic should be
  1540. * sent to the domain until, the merge state is complete.
  1541. *
  1542. * Caveats:
  1543. * None.
  1544. */
  1545. #endif