ua_securechannel_manager.h 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef UA_CHANNEL_MANAGER_H_
  2. #define UA_CHANNEL_MANAGER_H_
  3. #include "ua_util.h"
  4. #include "ua_server.h"
  5. #include "ua_securechannel.h"
  6. typedef struct UA_SecureChannelManager {
  7. LIST_HEAD(channel_list, channel_list_entry) channels; // doubly-linked list of channels
  8. UA_Int32 maxChannelCount;
  9. UA_DateTime maxChannelLifetime;
  10. UA_MessageSecurityMode securityMode;
  11. UA_DateTime channelLifeTime;
  12. UA_Int32 lastChannelId;
  13. UA_UInt32 lastTokenId;
  14. } UA_SecureChannelManager;
  15. UA_StatusCode UA_SecureChannelManager_init(UA_SecureChannelManager *cm, UA_UInt32 maxChannelCount,
  16. UA_UInt32 tokenLifetime, UA_UInt32 startChannelId,
  17. UA_UInt32 startTokenId);
  18. void UA_SecureChannelManager_deleteMembers(UA_SecureChannelManager *cm);
  19. UA_StatusCode UA_SecureChannelManager_open(UA_SecureChannelManager *cm, UA_Connection *conn,
  20. const UA_OpenSecureChannelRequest *request,
  21. UA_OpenSecureChannelResponse *response);
  22. UA_StatusCode UA_SecureChannelManager_renew(UA_SecureChannelManager *cm, UA_Connection *conn,
  23. const UA_OpenSecureChannelRequest *request,
  24. UA_OpenSecureChannelResponse *response);
  25. UA_SecureChannel * UA_SecureChannelManager_get(UA_SecureChannelManager *cm, UA_UInt32 channelId);
  26. UA_StatusCode UA_SecureChannelManager_close(UA_SecureChannelManager *cm, UA_UInt32 channelId);
  27. #endif /* UA_CHANNEL_MANAGER_H_ */